-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
80 lines (65 loc) · 1.63 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
""" config.py
Main "hard" configuration for Ostracion,
i.e. the non-settable-in-the-app part (usually never changed).
"""
import os
basedir = os.path.abspath(os.path.dirname(__file__))
# hard-constants
# for short names/descriptions (e.g. role IDs, role descriptions)
maxShortIdentifierLength = 32
# for one-liner on-DB identifiers (box names, file descriptions, usernames etc)
maxIdentifierLength = 2040
# for in-DB large blobs such as the markdown for info-page
maxStoredTextLength = 65536
# "find" tool, threshold for similarity search
similarityScoreThreshold = 0.15
# allowed characters for usernames
usernameCharacterSet = set(
'1234567890qwertyuiopasdfghjklzxcvbnmPOIUYTREWQLKJHGFDSAMNBVCXZ_-.@'
)
# show root box as icon in breadcrumbs
breadcrumbShowRootAsIcon = True
# root box nice naming
rootBoxNiceTitle = 'Root'
rootBoxNiceName = 'root'
# reasonably unchanged definitions
lowercaseAlphabet = set('qwertyuiopasdfghjklzxcvbnm')
# version
ostracionVersion = '1.1.0'
# directories
templateDirectory = os.path.join(
basedir,
'ostracion_app',
'templates',
)
resourceDirectory = os.path.join(
basedir,
'ostracion_app',
'resources',
)
managedImagesDirectory = os.path.join(
basedir,
'ostracion_app',
'managed_files',
)
staticDirectory = os.path.join(
basedir,
'ostracion_app',
'static',
)
defaultAppImageDirectory = os.path.join(
resourceDirectory,
'default_app_images',
)
# relative URI path
staticFileIconsRootPath = os.path.join(
'static',
'file_icons',
)
# database access
dbFullName = os.path.join(
basedir,
'ostracion_app',
'db',
'ostracion.db',
)