6bfb87071e
Since the send.py script for invites uses print to emit progress including the names of contacts to which messages are sent, redirecting stdout of the script to a local file can result in encoding errors if some of the names include non-ASCII codepoints (but not when stdout is your interactive terminal). Setting PYTHONIOENCODING=utf-8 in the calling environment works around this nicely. Change-Id: I52b70c64f8b3a20da5143b31c5090192b0c75c99
25 lines
906 B
ReStructuredText
25 lines
906 B
ReStructuredText
======================
|
|
Summit Invite Script
|
|
======================
|
|
|
|
It sends codes from codes.csv to ATCs in atc.csv and outputs a csv file
|
|
with which name corresponds to which code.
|
|
|
|
You use it like this:
|
|
|
|
- Copy settings.py.sample to settings.py
|
|
- Update values in settings.py, especially *EMAIL_USER*, *EMAIL_FROM*,
|
|
*EMAIL_SIGNATURE* and *EMAIL_PASSWORD*
|
|
- Note that literal ``$`` characters in the template which are not part
|
|
of a substitution variable (such as dollar amounts) should be doubled
|
|
to escape them like ``... a $$600-off discount code ...`` so as to
|
|
avoid raising *ValueError: Invalid placeholder in string: line <X>,
|
|
col <Y>*
|
|
- Run a test with ``PYTHONIOENCODING=utf-8 python send.py atc_sample.csv codes_sample.csv > sent_sample.csv``
|
|
|
|
Should work on stock Ubuntu.
|
|
|
|
When ready, run the real thing with::
|
|
|
|
$ PYTHONIOENCODING=utf-8 python send.py atc.csv codes.csv > sent.csv
|