README.org 3.37 KB
Newer Older
1
2
3
4
5
* Dependencies

  - werkzeug
  - jinja
  - python2
6
  - python-pdfminer (for pdf2txt, used in metadata reading)
7
8
9
10
11
12
13
14
15
16
17

* Setup
** Base config

   see config/__init__.py. The variables should be self explanatory and you
   shouldn't have to modify them.

** Site config

   Create config/local.py. You will have to define the following variables there:

Christoph's avatar
Christoph committed
18
19
20
21
   - admins :: A dictionary username -> mailadress for the people
               moderating the evaluations. The mailaddresses are
               notified on emails to the admins alias and on new
               submission
Christoph's avatar
Christoph committed
22
23
24
25
   - groups :: A list of (regex, [username]). If the subject (=course) is
               matched by regex, all users in the list are selected,
               e.g are displayed the moderation request or sent the
               relevant mail
26
27
28
29
   - root :: A list of mailadresses of people who should get error message in
             case something goes wrong.
   - triggered :: A list of tuples (address, port, secret), that should get a
                  UDP-datagram if an evaluation gets accepted (see below)
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
30
   - mailfrom :: E-Mail address to use for all sent mails
Christoph's avatar
Christoph committed
31
   - weburl :: base URL of the web service
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
32
33
34
35
36

   The following variables are optional:

   - sendmails :: Set this to false in config.local if you want to see errors on
                  stderr and don't want send any mails to admins or submitters.
37
38
39
40
41
   - moddataurl :: Base URL of the PDF files that are to be moderated. This
                   should point to 'moddir' from the config.
   - modurl :: Base URL of the moderation interface.
   - pdfurl :: Base URL of the public pdfs. This should point to 'pdfdir' from
               the config.
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
42
   - delurl :: Base URL of the trashbin
43
   - pdf2txt :: Path to pdf2txt executable (default: "pdf2txt")
44
45
46
47
48
49
   - default_theme :: The name of the theme to use if the hostname of a request
                      is not matched by ~themes_by_url~. (type: String)
   - themes_by_url :: A list of tuples (hostname, theme) that specifies which
                      theme to use for request to a given hostname. This
                      overwrites ~default_theme~. See also [[file:themes.txt]].
                      (type: [(String, String)])
50
51


52
53
54
55
56
57
   Note, that the various *url config options are acutal URLs, while the *dir
   configs are filesystem paths.

   Example:

   #+BEGIN_EXAMPLE
Christoph's avatar
Christoph committed
58
     admins = {'foo': 'foo@example.com', 'bar': 'bar@example.com'}
59

Christoph's avatar
Christoph committed
60
61
62
     groups = [('INF-.*', [foo]),
               ('.*', [bar])]

63
     root = ['foo@example.com']
64

65
     triggered = [('127.0.0.1', 6666, '\xc0\xff\xee\xba\xbe')]
66

67
     weburl = 'http://eva.example.com/'
68
69
70
71
     moddataurl = '/moderation/files'
     modurl = '/moderation'
     pdfurl = '/public_pdf'
     delurl = '/moderation/del'
72
     mailfrom = "foo@example.com"
73

74
     sendmails = False
75
76
77
78
79
80
   #+END_EXAMPLE

* Hosting
** Mail handler

   The mailhandler script expects an email on stdin. This email has to be sent
Sebastian Hahn's avatar
Sebastian Hahn committed
81
   to ~something+{submit_full, submit-trimmed, admins}@something~ and contain
82
83
84
85
86
87
88
89
   a PDF attachment.

** Web application

   The file 'wsgi' defines a WSGI application for your webserver's pleasure.

   You can execute the script 'run_testserver.py' for testing purposes.

Christoph's avatar
Christoph committed
90
91
92
93
94
95
** Maintenance

   During Maintenance write a explanatory text into the file
   `UPGRADE_IN_PROGRESS` in your base directory. This will disable the
   website and should still work during maintenance work.

96
** TODO Sending push notifications