# Personalized Letter Generator
This Python script automates the creation of personalized letters by combining a template letter with recipient names from a list.
- Loads Recipient Names:
- Reads a list of names from
./Input/Names/invited_names.txt
, removing any leading/trailing whitespace.
- Reads a list of names from
- Loads Letter Template:
- Reads a template letter from
./Input/Letters/starting_letter.txt
.
- Reads a template letter from
- Personalizes Letters:
- Iterates through the names:
- Replaces
[name]
placeholder in the template with the recipient's name. - Writes the personalized letter to a separate file in
./Output/ReadyToSend
, namedletter_for_<name>.txt
.
- Replaces
- Iterates through the names:
- Place files:
- Ensure the template letter is in
./Input/Letters/starting_letter.txt
. - Place the recipient names list in
./Input/Names/invited_names.txt
, one name per line.
- Ensure the template letter is in
- Run the script:
- Execute the Python script.
This will create personalized letters in the ./Output/ReadyToSend
directory.
- Placeholder: The script specifically replaces
[name]
in the template. Adjust accordingly if using a different placeholder. - File Paths: The script assumes specific file locations. Modify the assigned variables if needed.
Assuming a template letter with "Dear [name]," and a names list containing "Alice" and "Bob":
- The script will generate:
./Output/ReadyToSend/letter_for_Alice.txt
containing "Dear Alice,"./Output/ReadyToSend/letter_for_Bob.txt
containing "Dear Bob,"