/
settings.py.template
76 lines (50 loc) · 1.73 KB
/
settings.py.template
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
# Alias of the project, must exist in the database already
project_alias = ""
# Path where the folders are stored
project_datastorage = ""
# Are md5 files required to check the files in a folder?
# For a script that generates the MD5 files, see the repo
# https://github.com/Smithsonian/MD5_tool
md5_required = True
# Temp folder, usually /tmp
# No trailing slash
tmp_folder = "/tmp"
# Subfolders of files
main_files_path = "tifs"
raw_files_path = "raws"
derivative_files_path = "jpgs"
# API location
api_url = ""
api_key = ""
# How many parallel processes to run
no_workers = 2
# How to split to parse the date, return the date in format 'YYYY-MM-DD'
def folder_date(folder_name):
# Example as PREFIX-YYYYMMDD
folder_date = folder_name.split('PREFIX-')[1]
formatted_date = "{}-{}-{}".format(folder_date[0:4], folder_date[4:6], folder_date[6:8])
return formatted_date
# Validate sequences
sequence_split = "_"
sequence = []
# Should the names match a db?
files_db = False
# How to find the list of valid names
# this has to be a valid query that will
# be used in a subquery
filename_pattern_query = "SELECT COUNT(*) as no_records FROM (SELECT file_name FROM filename_table WHERE project_id = 100 AND file_name = '{}') a"
# How long to sleep between loops
# Set to False to run only once
sleep = 180
# Path for programs in the system
jhove = "jhove"
exiftool = "exiftool"
magick = "identify"
# Path of where to save the JPG previews and size
jpg_previews = ""
# How much space to leave free, in decimal (0.1 is 10%).
# If the free space left is less than this, the script will stop.
jpg_previews_free = 0.1
# Scripts to run before or after checking the files. Set to None if it won't be used.
pre_script = None
post_script = None