-
Notifications
You must be signed in to change notification settings - Fork 4
/
config_example.cfg
107 lines (95 loc) · 4.11 KB
/
config_example.cfg
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[email subject]
# Subject line for emails going out
# The registration id number (regid) will be inserted in the place marked "{}".
# Make sure that reg_subject can extract that number from this text again!
subject = 'CS20 badge for [#{}]'
# Regular expressions to parse the incoming email
reg_subject = \[#(?P<regid>[0-9]+)\]
[email parsing]
# This section defines regular expressions that are used to parse the incoming
# emails line by line.
#
# You can add any number of expressions here in the form
# "key = regularexpression".
# The regular expressions are used line-by-line on the incoming email.
# Each expression needs to have contain one named group where the name of the group
# matches a column name in the badge sql table.
# For example:
# key = BADGE NAME:(?P<name>[\S\s]+)
# will match for lines in the email like this in an incoming email:
# BADGE NAME: Mr. Ex$\alpha{}$mple
# and update the column "name" with the value "Mr. Ex$\alpha{}$mple"
#
# Make sure that the template for the outgoing emails generates lines that match
# so that people know what to do when they reply!
#
# The name of the key is arbitrary (as long as it's unique) and not used in the program
# but the config file structure requires this "key = value" format.
#
# For Cool Stars 20 we used three text values that participants were allowed to change
# 1) Name
# 2) Affiliation
# 3) Pronoun (printed on badge, could be empty) - called "other" below
# Below are the regular expressions that will find these values in the text
# of incoming emails.
#
# The Syntax of regular expresions in Python is explained on many websites. If you
# don't know how to use them, a simple web search will turn up plenty of guides.
key1 = BADGE PRONOUN:(?P<pronoun>[\S\s]+)
key2 = BADGE NAME:(?P<name>[\S\s]+)
key3 = BADGE AFFILIATION:(?!Institute of Example)(?P<affil>[\S\s]+)
[email]
address = coolstarsbot@gmail.com
smtp_server = smtp.gmail.com
smtp_port = 587
imap_server = imap.gmail.com
password = your password here
# Emails with some errors will get forwarded for debugging
# When everything is live, you need to know ASAP if e.g. registration numbers
# are messed up, so put your personal email here to get notified for
# some (but not all) errors in processing
alert = yourname@example.com
[path]
# When starting this as a cron job, you might be in a different working directory.
# Thus, it's useful to use absolute path here.
image_dir = /melkor/d1/guenther/projects/cs20/badgeimages
badge_dir = /melkor/d1/guenther/projects/cs20/badges/
templates = /path/to/where/your/templates/are/
sql_database = /path/and/filename/badges.db
[templates]
# Name of templates, NOT including the path
tex = badge_template.tex
email = email_template.txt
# further files needed for compilation of badge, e.g. images files with logo,
# tex style files, etc.
# This files should live in the path:templates directory
# separate filenames with space
# Leave empty if no extra files are needed
extra_files = headerimage.jpg
[color]
# The badge design can have a colorbar with highlighted text for people with special
# roles in the conference e.g. "LOC" or "session chair".
# These roles are stored in the "role" field in the SQL database. For each role,
# you can set a color here.
# See https://en.wikibooks.org/wiki/LaTeX/Colors for available colors
# The example below is the color scheme of the Cool Stars 20 workshop
# Default if not defined here: black
LOC = ForestGreen
SOC = blue
Press = red
Industry Panel = BurntOrange
[colortext]
# the section color sets the color for the bar, this sets the color for the
# text in the bar (default if not defined here: white)
LOC = white
SOC = black
[settings]
# LaTeX can be used to execute arbitrary commands.
# While a full sanatizing might be impossible, we use an approach here that
# blacklists the most dangerous commands AND puts a very restrictive length requirement
# on the string. All blacklists can be circumvented, but that requires a number
# of commands and requires a few longer commands, so a limit on the string length
# will help.
# see: https://0day.work/hacking-with-latex/
# This sets the maximum length for any LaTeX stirng that will be processed.
max_tex_len = 30