#########################################################
#### Database configuration options for PhiloLogic5 #####
#########################################################
#### All variables must be in valid Python syntax #######
#########################################################
#### Edit with extra care: an invalid          ##########
#### configuration could break your database.  ##########
#########################################################


metadata_fields = [
    "filename",
    "title",
    "create_date",
    "year",
    "head",
    "vol",
    "n",
    "id",
    "src_domain",
    "macro_domain",
    "pred_domain",
    "manicule",
    "philo_doc_id",
    "philo_div1_id",
]

metadata_hierarchy = [
    ["filename", "title", "create_date", "year", "options", "philo_doc_id"],
    [
        "head",
        "vol",
        "n",
        "id",
        "src_domain",
        "macro_domain",
        "pred_domain",
        "manicule",
        "philo_div1_id",
    ],
    ["who", "speaker", "resp", "philo_div2_id"],
    ["facs", "philo_div3_id"],
]

metadata_types = {
    "filename": "doc",
    "title": "doc",
    "create_date": "doc",
    "year": "doc",
    "options": "doc",
    "head": "div",
    "vol": "div",
    "n": "div",
    "id": "div",
    "src_domain": "div",
    "macro_domain": "div",
    "pred_domain": "div",
    "manicule": "div",
    "who": "para",
    "speaker": "para",
    "resp": "para",
    "facs": "graphic",
    "philo_doc_id": "doc",
    "philo_div1_id": "div1",
    "philo_div2_id": "div2",
    "philo_div3_id": "div3",
}

# This defines whether text and metadata were converted to an ASCII representation
# Don't change this value post-database load.
ascii_conversion = True

normalized_fields = []

# This defines the default navigation element in your database
default_object_level = "doc"

# This defines whether all terms in the index have been lowercased. If so, input searches will be lowercased
lowercase_index = True

# If set to True, this enabled debugging messages to be printed out to the Apache error log
debug = False

# The secret value is a random string to be used to generate a secure cookie for access control. The string value can be anything.
secret = ""

# The overflow_words variable is a set of words which are not indexed in the database, but stored as blobs in the data/overflow_words directory.
overflow_words = set()

metadata_sql_types = {
    "philo_type": "text",
    "philo_id": "text",
    "philo_name": "text",
    "philo_seq": "text",
    "year": "int",
    "filename": "text",
    "title": "text",
    "create_date": "text",
    "head": "text",
    "vol": "text",
    "n": "text",
    "id": "text",
    "src_domain": "text",
    "macro_domain": "text",
    "pred_domain": "text",
    "manicule": "text",
    "philo_doc_id": "text",
    "philo_div1_id": "text",
}

token_regex = "[\\p{L}\\p{M}\\p{N}]+|[&\\p{L};]+"

word_attributes = []

