-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.config.py
43 lines (40 loc) · 1.1 KB
/
example.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
#this is a comment, config for tweak
list_keys = [
"urn",
"committee",
"creator",
"dtype",
"title",
"abstract",
"department",
"sdate"
]
deliated_strs = {
# the char at the begining is the seperator for the list so "Scott, Alfred☕O'Brien, Emily" in this case
# the items in [] are the keys to convert into lists
'☕' : [ "contributor", "advisor", "keywords", "resources" ]
#more could be added here like so, but ensure each list ends with a comman except the last
#'👍' : ["some metadata field","some other metadata field"],
#'🙂' : ["metadata field three","some fourth metadata field"]
}
new_key_names = { #left is original name, right is desired name
"urn":"identifier",
"dtype":"resource_type",
"abstract":"description",
"sdate":"date_created",
"keywords":"keyword"
}
del_keys = [ #things to remove
'adate',
'cdate',
'ddate',
'rdate',
'url',
'notices'
]
lambdas = [ #ignore this inline fuction definition
lambda row,key : row.update({"year":row[key][0][0:4]} if key == "date_created" else {})
]
update = { #new things to add
"license":["https://creativecommons.org/licenses/by/4.0/"]
}