-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
47 lines (36 loc) · 2.08 KB
/
README.txt
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
*** INTRO ***
This the readme for the Populator program (Form Letter Generator) to create large amounts of form letters in a short amount of time.
This program was designed and created by David Lynch for use in the Center for European Studies.
Troubleshooting at bottom.
THE ACTUAL PROGRAM IS FOUND IN DIST/MAIN
*** REQUIREMENTS ***
This program requires a CSV file and a TXT/DOCX form letter. Please ensure that the placeholder words in the letter:
1. Match the column titles (headers) of the CSV file EXACTLY
2. Start with an underscore
3. Are one word
*** PLACEHOLDER WORDS ***
See a list of acceptable placeholder words below:
"_Firstname"
"_FIRST_NAME"
"_Event_date"
"_event-date"
"_honAmount"
See a list of UNACCEPTABLE placeholder words below:
"_First name"
"Firstname"
"_event date"
"-event-date"
*** REPLACEMENT LOGIC ***
This program does simple replacement of the placeholder word with whatever is in the row for that corresponding column.
The only exception is handling boolean logic. See guidance for booleans below:
1. Placeholder words for booleans MUST end with "_bool".
2. Use 1 and 0 for True and False.
3. The rest of the placeholder word must be what you want to input for the value. See example below:
"_populist_bool" becomes "populist" or "not populist" for values of 1 and 0 respectively.
"_a_great_country_bool" becomes "a great country" or "not a great country" for values of 1 and 0 respectively.
4. Note that underscores become replaced by spaces for the boolean placeholder word.
5. Please also note that it is case sensitive - whatever case you have will be retained for the replacement word.
*** TROUBLESHOOTING ***
- Do not use the word "Letters" in your folder names or file names. I don't know why but it causes issues.
- Do not use underlined spaces to create signature lines, use actual underscore characters. Only use *one* underscore at the start of placeholder words.
- The program tests if a signature line is present by looking at the first two characters. If only the first is an underscore it becomes a placeholder. If the second is too, it ignores it and leaves it as is.