-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
52 lines (39 loc) · 1.38 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
from pathlib import Path
# Directory for user-specific data (e.g. the database)
def get_user_data_dir():
return Path.home()/"bucephalus"
# Directory for library files, default stencils for bucvac, and so forth
def get_install_dir():
return Path(__file__).parent.parent
# File holding default keys used by bucadd and bucvac; edited by bucdef
def get_defaults_file_path():
return get_user_data_dir()/"defaults.json"
# File holding recently added/modified articles
def get_recent_file_path():
return get_user_data_dir()/"recent.json"
# File holding details of article pinned to front page
def get_pinned_file_path():
return get_user_data_dir()/"pinned.json"
# Search paths for bucvac stencils, in search order.
def get_stencils_search_dirs():
return [get_user_data_dir()/"stencils", get_install_dir()/"stencils"]
# Enable the long-form random content on the homepage.
def enable_long_fortunes():
return True
# Enable tasklist read access from the web
def enable_tasklist_web():
return True
# Enable tasklist write access from the web
def enable_tasklist_web_write():
if not enable_tasklist_web():
return False
return True
# Enable Geogebra integration on the web
def enable_ggb_integration():
return True
# Enable VCS commits on all database changes
def enable_vcs_commits():
return True
# Timeout (in seconds) for web requests
def external_request_timeout():
return 1