####################################################
#### Web configuration options for PhiloLogic5 #####
####################################################
### All variables must be in valid Python syntax ###
####################################################


# The dbname variable is the title name in the HTML header
dbname = "Édition numérique du Dictionnaire Universel François & Latin, vulgairement appellé Dictionnaire de Trévoux"

# Configure access control with True or False.
# Note that if you want access control, you have to provide a logins.txt file inside your /data directory,
# otherwise access will remain open.
access_control = False

# Location of access file which contains authorized/unauthorized IPs and domain names
access_file = ""

# If set, link_to_home_page should be a string starting with "http://" pointing to a separate home page for the database
link_to_home_page = "http://trevoux.huma-num.fr"

# The search_reports variable sets which search report is viewable in the search form
# Available reports are concordance, kwic, aggregation, collocation, and time_series
search_reports = ["concordance", "kwic", "aggregation", "collocation", "time_series"]

# The metadata variable sets which metadata field is viewable in the search form
metadata = [
    #"create_date",
    "year",
    "vol",
    #"title",
    #"options",
    "head",
    #"n",
    #"id",
    "src_domain",
    "macro_domain",
    "pred_domain",
    "manicule",
    #"div_date",
    #"who",
    #"speaker",
    #"resp",
    #"facs",
]

# The metadata_aliases variable allows to display a metadata variable under a different name in the HTML
# For example, you could rename the who metadata to Speaker, and the create_date variable to Date like so:
# metadata_aliases = {'who': 'Speaker', 'create_date', 'Date'}
metadata_aliases = {'year':'Edition', 'title': 'Volume','vol': 'Volume', "head":"Entry", "src_domain":"Domain Marker", "macro_domain":"Broad Category", "pred_domain":"AI-Predicted Domain", "manicule": "Manicule"}

# The metadata_input_style variable defines whether to use an text input field, a dropdown menu or checkboxes for any given
# metadata field. All fields are set by default to text. Note that dropdowns only allow you to select one value, whereas checkboxes allow you to select more than one.# If using a dropdown menu, you need to set it to "dropdown" and populate the metadata_choice_values variable. If using checkboxes, set to "checkboxes", and populate# the metadata_choice_values variable
metadata_input_style = {
    "title": "text",
    "create_date": "text",
    "year": "text",
    "options": "text",
    "head": "text",
    "type": "text",
    "src_domain": "text",
    "macro_domain": "text",
    "pred_domain": "text",
    "manicule" : "text",
    "n": "text",
    "id": "text",
    "vol": "text",
    "div_date": "text",
    "who": "text",
    "speaker": "text",
    "resp": "text",
    "facs": "text",
}

# The metadata_choice_values variable defines what values to display in the metadata dropdown. It defaults to an empty dict.
# If no value is provided for a metadata field which has an input type of dropdown, no value will be displayed. You should
# provide a list of strings with labels and values for metadata.
# ex: {"title": [{"label": "Contrat Social", "value": "Du Contrat Social"}, {"label": "Emile", "value": "Emile, ou de l'éducation"}]}
metadata_choice_values = {"year":[{"label": "1743", "value": "1743"},],
"manicule":[{"label": "True", "value": "True"}, {"label": "False", "value": "False"}],
"macro_domain":[{'label': 'Agriculture - Économie rustique',
  'value': 'Agriculture - Économie rustique'},
 {'label': 'Anatomie', 'value': 'Anatomie'},
 {'label': 'Antiquité', 'value': 'Antiquité'},
 {'label': 'Architecture', 'value': 'Architecture'},
 {'label': 'Arts mécaniques - Manufactures',
  'value': 'Arts mécaniques - Manufactures'},
 {'label': 'Beaux-arts', 'value': 'Beaux-arts'},
 {'label': 'Belles-lettres', 'value': 'Belles-lettres'},
 {'label': 'Blason', 'value': 'Blason'},
 {'label': 'Chasse-pêche', 'value': 'Chasse-pêche'},
 {'label': 'Chimie', 'value': 'Chimie'},
 {'label': 'Commerce', 'value': 'Commerce'},
 {'label': 'Droit Jurisprudence', 'value': 'Droit Jurisprudence'},
 {'label': 'Grammaire', 'value': 'Grammaire'},
 {'label': 'Géographie', 'value': 'Géographie'},
 {'label': 'Histoire', 'value': 'Histoire'},
 {'label': 'Histoire naturelle', 'value': 'Histoire naturelle'},
 {'label': 'Jeu', 'value': 'Jeu'},
 {'label': 'Marine', 'value': 'Marine'},
 {'label': 'Maréchalerie - Manège', 'value': 'Maréchalerie - Manège'},
 {'label': 'Mathématiques', 'value': 'Mathématiques'},
 {'label': 'Mesure', 'value': 'Mesure'},
 {'label': 'Militaire', 'value': 'Militaire'},
 {'label': 'Monnaie', 'value': 'Monnaie'},
 {'label': 'Musique', 'value': 'Musique'},
 {'label': 'Médailles', 'value': 'Médailles'},
 {'label': 'Médecine', 'value': 'Médecine'},
 {'label': 'Métiers [alimentation]', 'value': 'Métiers [alimentation]'},
 {'label': 'Métiers [autres]', 'value': 'Métiers [autres]'},
 {'label': 'Métiers [bois]', 'value': 'Métiers [bois]'},
 {'label': 'Métiers [cuir, peaux]', 'value': 'Métiers [cuir, peaux]'},
 {'label': 'Métiers [métal, minéral, dérivés]',
  'value': 'Métiers [métal, minéral, dérivés]'},
 {'label': 'Métiers [papier]', 'value': 'Métiers [papier]'},
 {'label': 'Métiers [tissu, habit]', 'value': 'Métiers [tissu, habit]'},
 {'label': 'Pharmacie', 'value': 'Pharmacie'},
 {'label': 'Philosophie', 'value': 'Philosophie'},
 {'label': 'Religion', 'value': 'Religion'},
 {'label': 'Sciences physico-mathématiques',
  'value': 'Sciences physico-mathématiques'},
 {'label': 'Superstition', 'value': 'Superstition'},
 {'label': 'Voyage', 'value': 'Voyage'}],
 "pred_domain":[{'label': 'Agriculture - Économie rustique',
  'value': 'Agriculture - Économie rustique'},
 {'label': 'Anatomie', 'value': 'Anatomie'},
 {'label': 'Antiquité', 'value': 'Antiquité'},
 {'label': 'Architecture', 'value': 'Architecture'},
 {'label': 'Arts mécaniques - Manufactures',
  'value': 'Arts mécaniques - Manufactures'},
 {'label': 'Beaux-arts', 'value': 'Beaux-arts'},
 {'label': 'Belles-lettres', 'value': 'Belles-lettres'},
 {'label': 'Blason', 'value': 'Blason'},
 {'label': 'Chasse-pêche', 'value': 'Chasse-pêche'},
 {'label': 'Chimie', 'value': 'Chimie'},
 {'label': 'Commerce', 'value': 'Commerce'},
 {'label': 'Droit Jurisprudence', 'value': 'Droit Jurisprudence'},
 {'label': 'Grammaire', 'value': 'Grammaire'},
 {'label': 'Géographie', 'value': 'Géographie'},
 {'label': 'Histoire', 'value': 'Histoire'},
 {'label': 'Histoire naturelle', 'value': 'Histoire naturelle'},
 {'label': 'Jeu', 'value': 'Jeu'},
 {'label': 'Marine', 'value': 'Marine'},
 {'label': 'Maréchalerie - Manège', 'value': 'Maréchalerie - Manège'},
 {'label': 'Mathématiques', 'value': 'Mathématiques'},
 {'label': 'Mesure', 'value': 'Mesure'},
 {'label': 'Militaire', 'value': 'Militaire'},
 {'label': 'Monnaie', 'value': 'Monnaie'},
 {'label': 'Musique', 'value': 'Musique'},
 {'label': 'Médailles', 'value': 'Médailles'},
 {'label': 'Médecine', 'value': 'Médecine'},
 {'label': 'Métiers [alimentation]', 'value': 'Métiers [alimentation]'},
 {'label': 'Métiers [autres]', 'value': 'Métiers [autres]'},
 {'label': 'Métiers [bois]', 'value': 'Métiers [bois]'},
 {'label': 'Métiers [cuir, peaux]', 'value': 'Métiers [cuir, peaux]'},
 {'label': 'Métiers [métal, minéral, dérivés]',
  'value': 'Métiers [métal, minéral, dérivés]'},
 {'label': 'Métiers [papier]', 'value': 'Métiers [papier]'},
 {'label': 'Métiers [tissu, habit]', 'value': 'Métiers [tissu, habit]'},
 {'label': 'Pharmacie', 'value': 'Pharmacie'},
 {'label': 'Philosophie', 'value': 'Philosophie'},
 {'label': 'Religion', 'value': 'Religion'},
 {'label': 'Sciences physico-mathématiques',
  'value': 'Sciences physico-mathématiques'},
 {'label': 'Superstition', 'value': 'Superstition'},
 {'label': 'Voyage', 'value': 'Voyage'}],
}

# The word_property_aliases variable allows to display a word property variable under a different name in the HTML
# For example, you could rename the lemma metadata to Lemma, and the pos variable to Part of Speech like so:
# word_property_aliases = {'lemma': 'Lemma', 'pos': 'Part of Speech'}
word_property_aliases = {}

# The autocomplete variable determines which fields have autocomplete enabled. Note that the value 'q' is for term autocomplete
autocomplete = ["q"]

# The facets variable sets which metadata field can be used as a facet
# The object format is a list of metadata like the following: ['author', 'title', 'year'}
# The dict key should describe what the facets will do, and the dict value, which has to be a list,
# should list the metadata to be used for the frequency counts
facets = [
    "title",
    "create_date",
    "year",
    "options",
    "head",
    "type",
    "src_domain",
    "macro_domain",
    "pred_domain",
    "manicule",
    "n",
    "id",
    "vol",
    "div_date",
    "who",
    "speaker",
    "resp",
    "facs",
]

# The words_facets variable functions much like the facets variable, but describes metadata attached to words,
# such as lemma or part of speech. The object format is a list of metadata like the following: ['lemma', 'pos'}
words_facets = []

# If set to True, disable display of table of contents and go straight to the text. Useful when texts have no internal structure.
skip_table_of_contents = False

# The concordance_length variable sets the length in bytes of each concordance result
concordance_length = 300

# The search_examples variable defines which examples should be provided for each searchable field in the search form.
# If None is the value, or there are any missing examples, defaults will be generated at runtime by picking the first
# result for any given field. If you wish to change these default values, you should configure them here like so:
# search_examples = {"author": "Jean-Jacques Rousseau", "title": "Du contrat social"}
search_examples = {
    #"title": "AGRIÈRE",
    "year": 1743,
    "head": "ABAEUZ",
    "vol": "1",
    "src_domain": "Coutume",
    "macro_domain": "Droit Jurisprudence",
    "pred_domain": "Droit Jurisprudence",
    "manicule": "true",
}

# The word_attributes variable defines word attributes filters for use in the collocation report to allow searching
# only on a combination of one or more word attribute. Shows up in the search form under the collocation report only.
word_attributes = {}

# The results_summary variable determins which fields get stats displayed at the top of concordance/KWIC results.
results_summary = [
    #{"field": "author", "object_level": "doc"},
    {"field": "year", "object_level": "doc"},
    {"field": "title", "object_level": "doc"},
    {"field": "macro_domain", "object_level": "div1"},
    {"field": "pred_domain", "object_level": "div1"},
]

# The respect_text_line_breaks variable determines if line breaks in the source file should be displayed as line breaks in the browser
# This is really useful for displaying plain text files since they have no XML or DOM structure. Should otherwise be False for TEI/XML
respect_text_line_breaks = False

# The stopwords variable defines a file path containing a list of words (one word per line) used for filtering out words
# in the collocation report. If only a filename is provided, it will look for the file in the /data directory.
# The file must be located in the defined path. If the file is not found,
# no option for using a stopword list will be displayed in collocation searches.
stopwords = ""

# Define how individual metadata is displayed. The citations variable is reused by default for citations in individual reports.
# You can define styling with a dictionary of valid CSS property/value such as those in the default values.
# prefix and suffix keywords define what precedes and follows each field. You can use HTML for these strings.
# The link key enables linking for that metadata field. It links to the table of contents for title and filename,
# and to a regular query for all other metadata fields.
citations = {
    "author": {
        "field": "author",
        "object_level": "doc",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "type": {
        "field": "type",
        "object_level": "doc",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    
    "title": {
        "field": "title",
        "object_level": "doc",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {
            "font-variant": "small-caps",
            "font-style": "italic",
            "font-weight": 700,
        },
    },
    "year": {
        "field": "year",
        "object_level": "doc",
        "prefix": "",
        "suffix": "",
        "link": False,
        "style": {},
    },
    "pub_place": {
        "field": "pub_place",
        "object_level": "doc",
        "prefix": "",
        "suffix": "",
        "link": False,
        "style": {},
    },
    "publisher": {
        "field": "publisher",
        "object_level": "doc",
        "prefix": "",
        "suffix": "",
        "link": False,
        "style": {},
    },
    "collection": {
        "field": "collection",
        "object_level": "doc",
        "prefix": "",
        "suffix": ",&nbsp;",
        "link": False,
        "style": {},
    },
    "div1_src_domain": {
        "field": "src_domain",
        "object_level": "div1",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "div1_macro_domain": {
        "field": "macro_domain",
        "object_level": "div1",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "div1_pred_domain": {
        "field": "pred_domain",
        "object_level": "div1",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "div1_head": {
        "field": "head",
        "object_level": "div1",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "div2_head": {
        "field": "head",
        "object_level": "div2",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "div3_head": {
        "field": "head",
        "object_level": "div3",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "div1_date": {
        "field": "div_date",
        "object_level": "div1",
        "prefix": "",
        "suffix": "",
        "link": False,
        "style": {},
    },
    "div2_date": {
        "field": "div_date",
        "object_level": "div2",
        "prefix": "",
        "suffix": "",
        "link": False,
        "style": {},
    },
    "div3_date": {
        "field": "div_date",
        "object_level": "div3",
        "prefix": "",
        "suffix": "",
        "link": False,
        "style": {},
    },
    "speaker": {
        "field": "speaker",
        "object_level": "para",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "resp": {
        "field": "resp",
        "object_level": "para",
        "prefix": "",
        "suffix": "",
        "link": True,
        "style": {"font-variant": "small-caps"},
    },
    "page": {
        "style": {},
        "suffix": "",
        "object_level": "page",
        "field": "n",
        "prefix": "page ",
        "link": True,
    },
}

# The aggregation_config variable drives the aggregation report: which fields can be used to group concordances,# and whether you can further break down these counts by a particular metadata field.
aggregation_config = [
    {
        "field": "author",
        "object_level": "doc",
        "field_citation": [citations["author"]],
        "break_up_field": "title",
        "break_up_field_citation": [
            citations["title"],
            citations["pub_place"],
            citations["publisher"],
            citations["collection"],
            citations["year"],
        ],
    },
    {
        "field": "title",
        "object_level": "doc",
        "field_citation": [
            citations["title"],
            citations["pub_place"],
            citations["publisher"],
            citations["collection"],
            citations["year"],
        ],
        "break_up_field": None,
        "break_up_field_citation": None,
    },
]
# The dictionary variable enables a different search interface with the headword as a starting point. It is turned off by default
dictionary = True

# The dictionary_bibliography variable enables a different a bibliography report where entries are displayed
# in their entirety and grouped under the same title. It is turned off by default
dictionary_bibliography = False

# If set to True, this option creates a dropdown menu to select searching within only a single volume or title.
# This replaces the title field in the search form.
# You need to configure the dictionary_selection_options variable below to define your options.
dictionary_selection = False

# If dictionary_selection is set to True, you need to populate this variable as in the following:
# [{"label": "DAF 1932", "title": "Dictionnaire de l'Académie Française 1932"}]
# Each volume is represented as an object containing the label which is displayed in the search form
# and a title value which should either be the exact string stored in the SQL table, or a ripgrep expression
# such as "Dictionnaire de Littre.*" if you wish to match more than one title.
dictionary_selection_options = []

# The landing_page_browsing variable defines what type of landing page. There are 4 built-in reports available: 'default',
# 'dictionary', 'simple', or 'toc'. You can otherwise supply a relative path to a custom HTML template. Note that this path is relative
# to the database root. The only constraint for custom templates is that the HTML must be encapsulated inside a div
landing_page_browsing = "dictionary"

# The landing_page_browsing variable allows for configuration of navigation by metadata within the landing page.
# You can choose any document-level metadata (such as author, title, date, genre...) for browsing
# and define two different types of queries to group your data: ranges and exact matches, i.e. "A-D" or "Comedy".
# You can define styling with a dictionary of valid CSS property/value such as those in the default values.
# begin and end keywords define what precedes and follows each field. You can use HTML for these strings.
default_landing_page_browsing = [
    {
        "label": "Author",
        "group_by_field": "author",
        "display_count": True,
        "queries": ["A-D", "E-I", "J-M", "N-R", "S-Z"],
        "is_range": True,
        "citation": [citations["author"]],
    },
    {
        "label": "Title",
        "group_by_field": "title",
        "display_count": False,
        "queries": ["A-D", "E-I", "J-M", "N-R", "S-Z"],
        "is_range": True,
        "citation": [citations["author"], citations["title"], citations["year"]],
    },
]
# The default landing page display variable allows you to load content by default. It is configured
# in the same way as default_landing_page_display objects except that you need to define just one
# range (the one you wish to display) as a string, such as 'A-D'. An empty dict will disable the feature.
default_landing_page_display = {}

# This variable defines the citation for the simple landing page.
simple_landing_citation = [
    citations["author"],
    citations["title"],
    citations["year"],
    citations["div1_src_domain"],
    citations["div1_macro_domain"],
    citations["div1_pred_domain"],
    #citations["pub_place"],
    #citations["publisher"],
    #citations["collection"],
]
# If landing_page_browsing is set to dictionary, the dico_letter_range variable allows you to define set of letters corresponding to the first letter of a headword. This generates a set of buttons
# for browsing the database available on the landing page. The default represents the entire roman alphabet. An empty list hides the table.
dico_letter_range = [
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z",
]

dico_edition_range = [
    "1743",
]

# The concordance_citation variable define how and in what field order citations are displayed in concordance reports.
# You can define styling with a dictionary of valid CSS property/value such as those in the default values.
# See comments for the citations variable for how to configure citations
concordance_citation = [
    citations["author"],
    citations["title"],
    citations["year"],
    citations["div1_head"],
    citations["div1_src_domain"],
    citations["div1_macro_domain"],
    citations["div1_pred_domain"],
    #citations["div2_head"],
    #citations["div2_date"],
    #citations["div3_head"],
    #citations["div3_date"],
    #citations["speaker"],
    #citations["resp"],
    citations["page"],
]
# The bibligraphy_citation variable define how and in what field order citations are displayed in bibliography reports.
# You can define styling with a dictionary of valid CSS property/value such as those in the default values.
# See comments for the citations variable for how to configure citations
bibliography_citation = [
    citations["author"],
    citations["title"],
    citations["year"],
    citations["div1_head"],
    citations["div1_src_domain"],
    citations["div1_macro_domain"],
    citations["div1_pred_domain"],
    #citations["div2_head"],
    #citations["div3_head"],
    #citations["speaker"],
    #citations["resp"],
    citations["page"],
]
# The table_of_contents_citation variable define how and in what field order citations are displayed within the table of content
# In most cases, this should remain empty, except in the cases of div elements with different metadata values
#table_of_contents_citation = [
#    citations["author"],
#    citations["title"],
#    citations["year"],
#    citations["pub_place"],
#    citations["publisher"],
#    citations["collection"],
#]
table_of_contents_citation = [
    citations["title"],
    citations["year"],
    citations["div1_src_domain"],
    citations["div1_macro_domain"],
    citations["div1_pred_domain"],
]
# The navigation_citation variable define how and in what field order citations are displayed in navigation reports.
# You can define styling with a dictionary of valid CSS property/value such as those in the default values.
# See comments for the citations variable for how to configure citations
navigation_citation = [
    citations["author"],
    citations["title"],
    citations["year"],
    citations["div1_src_domain"],
    citations["div1_macro_domain"],
    citations["div1_pred_domain"],
    #citations["pub_place"],
    #citations["publisher"],
    #citations["collection"],
]
# The kwic_bibliography_fields variable  defines which bibliography fields will be displayed in the KWIC view. It should be
# modified with extra care in conjunction with the concordance_citation function located in reports/concordance.py.
# If the variable is an empty list, filename will be used.
kwic_bibliography_fields = ["title"]

# The concordance_biblio_sorting variable allows you to pick wich metadata field can be used for sorting concordance or bibliography results.
# It is a list of tuples where multiple metadata fields can be used for sorting, such as [('author', 'title'), ('year', 'author', 'title')].
# Note that these fields must belong to the same object type, such as "doc" or "div".
concordance_biblio_sorting = []

# The kwic_metadata_sorting_fields variable allows you to pick wich metadata field can be used for sorting KWIC results.
kwic_metadata_sorting_fields = ["title"]

# The collocation_fields_to_compare variable defines which metadata fields are used to compare collocation results.
# It is a list of metadata fields, such as ['author', 'title'].
collocation_fields_to_compare = ["author", "title"]

# The time_series_year_field variable defines which metadata field to use for time series.
time_series_year_field = "year"

# The time_series_interval variable defines the default year span used for time series.
time_series_interval = 10

# The time_series_start_end_date variable defines the default start and end dates for time series when no dates are provided.
time_series_start_end_date = {"start_date": 1743, "end_date": 1743}

# This defines whether the page images should be viewed in a non-PhiloLogic instance
external_page_images = False

# The page_images_url_root variable defines a root URL where pages images can be fetched when a filename is provided inside a page tag.
# Note that the page image filename must be inside a fac or id attribute such as:
# <pb fac="filename.jpg"> or <pb id="filename.jpg">
# So a URL of http://my-server.com/images/ will resolve to http://my-server.com/images/filename.jpg.
page_images_url_root = "https://gallica.bnf.fr/iiif/ark:/12148/"

# The page_image_extension value is useful when the image name does not have an extension defined in the markup.
# For instance, given <pb n="1" fac="image1">, you could define the extension as ".jpeg" and the browser would fetch
# the image at http://some-url/image1.jpeg (where some-url is defined in the above page_images_url_root variable).
page_image_extension = ""

# The logo variable defines the location of an image to display on the landing page, just below the
# search form. It can be a relative URL, or an absolute link, in which case you want to make sure
# it starts with http://. If no logo is defined, no picture will be displayed.
logo = ""

# The header_in_toc variable defines whether to display a button to show the header in the table of contents
header_in_toc = False

# You can define a custom HTML template for the search syntax pop-up window, in which case you need to supply the
# relative path to the template. Note that this path is relative to the database root. The only constraint
# for custom templates is that the HTML must be encapsulated inside a div
search_syntax_template = "default"

# A list of pattern with replacement to be run on individual concordances before sending to browser
# It is constructed as a list of tuples where the first element is the pattern to be matched
# and the second element is the replacement
# e.g.: [("<note>", "<span>"), ("</note>", "</span>")]
concordance_formatting_regex = []

# A list of pattern with replacement to be run on individual kwic concordances before sending to browser
# It is constructed as a list of tuples where the first element is the pattern to be matched
# and the second element is the replacement
# e.g.: [("<note>", "<span>"), ("</note>", "</span>")]
kwic_formatting_regex = []

# A list of pattern with replacement to be run on text objects before sending to browser
# It is constructed as a list of tuples where the first element is the pattern to be matched
# and the second element is the replacement
# e.g.: [("<note>", "<span>"), ("</note>", "</span>")]
navigation_formatting_regex = []

# Dictionary lookup function. You select a word in running text and hit D, and it'll query an external dictionary and return
# definitions. You need to provide the URL root of the dictionary. If keywords is false, the word selected is just appened to
# the URL. Otherwise, if set to True, you need to configure the dictionary_lookup_keywords variable below to construct the full URL.
dictionary_lookup = {"url_root": "", "keywords": False}

# This defines what keyword/values are appended to the root URL for dico lookup. The immutable_key_values defines key/values which are hardcoded
# The variable_key_values defines a key/value pair where the key is the URL key, and the value is a corresponding metadata field value from the text
# currently displayed. The selected_keyword corresponds to the URL key for the word selected in the text.
dictionary_lookup_keywords = {
    "immutable_key_values": {},
    "variable_key_values": {},
    "selected_keyword": "",
}

# A list of pattern with replacement to be run on all incoming queries
# It is constructed as a list of tuples where the first element is the regex pattern to be matched
# and the second element is the replacement
# e.g.: [(" OR ", " | "), ("-", " ")]
query_parser_regex = [
    ("-", " "),
    (" OR ", " | "),
    ("'", " "),
    (";", ""),
    (",", ""),
    ("!", ""),
    ("\u3000", " "),
    ("｜", "|"),
    ("”", '"'),
    ("－", "-"),
    ("＊", "*"),
]

# The link should start with http:// or https://. This will display an error report link in the header and in document navigation
report_error_link = ""

# The academic citation use to cite this database. The citation is build with the citation defined (from metadata values) + the collection (which can be HTML)
# e.g.: {"collection": 'ARTFL-FRANTEXT, University of Chicago', "citation": [citations["author"], citations["title"], citations["year"]]}
# You can define a custom URL (not the URL of the database itself).
academic_citation = {"collection": "", "citation": [], "custom_url": ""}

ascii_conversion = True

