44from tqdm import tqdm
55from ianalyzer_readers .xml_tag import Tag , CurrentTag , TransformTag
66
7- from django .conf import settings
87from addcorpus .python_corpora .corpus import XMLCorpusDefinition , FieldDefinition
98from ianalyzer_readers .extract import Metadata , XML , Pass , Order , Backup , Combined
109import corpora .dbnl .utils as utils
1514class DBNL (XMLCorpusDefinition ):
1615 title = 'DBNL'
1716 description = 'Dutch literature and publications on literary or linguistic studies, from the Middle Ages to the 19th century'
18- data_directory = settings .DBNL_DATA
17+ es_index = 'dbnl' # default setting for development
18+
1919 min_date = datetime (year = 1200 , month = 1 , day = 1 )
2020 max_date = datetime (year = 1890 , month = 12 , day = 31 )
21- es_index = getattr ( settings , 'DBNL_ES_INDEX' , 'dbnl' )
21+
2222 image = 'dbnl.png'
2323 description_page = 'dbnl.md'
2424 citation_page = 'citation.md'
@@ -39,7 +39,7 @@ class DBNL(XMLCorpusDefinition):
3939 language_field = 'language_code'
4040
4141 def sources (self , start = None , end = None ):
42- metadata_corpus = DBNLMetadata ()
42+ metadata_corpus = DBNLMetadata (data_directory = self . data_directory )
4343 all_metadata = utils .index_by_id (metadata_corpus .documents ())
4444
4545 print ('Extracting XML files...' )
@@ -394,7 +394,7 @@ def _xml_files(self):
394394 has_content = FieldDefinition (
395395 name = 'has_content' ,
396396 display_name = 'Content available' ,
397- description = f'Whether the contents of this book are available on { settings . SITE_NAME } ' ,
397+ description = f'Whether the contents of this book are available on Textcavator ' ,
398398 extractor = Metadata ('has_xml' ),
399399 es_mapping = bool_mapping (),
400400 search_filter = BooleanFilter (
0 commit comments