Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: README.md

Issue 29328521: Issue 133 - Add README to sitescripts repository (Closed)
Patch Set: Created Sept. 23, 2015, 10:23 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
1 # Sitescripts
3 ## Introduction
5 The sitescripts repository contains many of the server side Python scripts that
6 we use. There are both web handlers, which can be used via the multiplexer, and
7 scripts that perform other tasks.
9 The scripts are often unrelated and as such will not all be documented here. For
10 more information about the individual scripts you will need to look at their
11 included README files. (For undocumented scripts you will need to either look at
12 the code itself, or refer to the issue numbers as mentioned in the related
13 commits.)
16 ## sitescripts.ini
18 Many of the scripts included in this repository need some configuration in order
19 to work. For this there is a shared configuration file called `sitescripts.ini`.
20 The file contains different sections for the different scripts and some shared
21 configuration.
23 The configuration file can be placed in a number of locations:
Wladimir Palant 2015/10/05 11:22:20 Not just that, the code will actually look for it
kzar 2015/10/06 13:00:13 Done.
25 1.) ~/.sitescripts
Sebastian Noack 2015/10/05 10:56:57 Nit: Using closing parenthesis for numbered lists
kzar 2015/10/06 13:00:12 Done.
26 2.) ~/sitescripts.ini
27 3.) /etc/sitescripts,
Sebastian Noack 2015/10/05 10:56:57 I guess the trailing comma is a typo?
kzar 2015/10/06 13:00:13 Done.
28 4.) /etc/sitescripts.ini
30 _There is also an environment variable `SITESCRIPTS_CONFIG` that can be used to
31 provide a custom path for the configuration._
Wladimir Palant 2015/10/05 11:22:20 Please note explicitly that it will override the d
kzar 2015/10/06 13:00:12 Done.
33 The `DEFAULT` section contains some of the more generic configuration options
34 that are shared by the various scripts.
36 The `multiplexer` section is used to configure which URL handlers should be
37 included by the multiplexing web server. Each option key specifies an URL
38 handling function, the values are not used. (So should be left blank.)
40 We won't go into the other sections of the configuration file here, but for an
41 example that includes them all take a look at `.sitescripts.example`.
44 ## Multiplexer
46 Many of the scripts in this repository are URL handlers which are used when we
47 need to dynamically handle web requests to our servers. For example, we might
48 need to send an email after a web request has been received.
50 These scripts are written in a standard way, using some of the decorators and
Sebastian Noack 2015/10/05 10:56:57 I think it makes sense to explicitly refer to WSGI
kzar 2015/10/06 13:00:13 Done.
51 utilities inside `sitescripts.web` so that they can be used by the multiplexer.
52 The multiplexer includes the URL handling function for each entry included in
53 the `multiplexer` section of the configuration file and provides a WSGI app that
54 serves them all.
56 This WSGI app can then be served by `multiplexer.fcgi` in production and
57 `multiplexer.py` in development.
Wladimir Palant 2015/10/05 11:22:20 Probably mention explicitly that multiplexer.py is
kzar 2015/10/06 13:00:13 Done.
59 So, to test any of the URL handlers in development, simply include their names
60 in your configuration file and then type `python multiplexer.py`. A local web
61 server should then be running on port 5000.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld