This Kotlin application simplifies the process of creating invitation letters for UK visitors. It utilizes a JSON configuration file to compile necessary details about the host, guests, and visit specifics, producing a formal invitation letter in PDF format.
Creating personalized invitation letters for visiting friends and family can be time-consuming. This project was born from a personal need to streamline the process, combining a practical solution with an opportunity to refine my Kotlin skills.
- Parses host, guest, and visitation details from a specified JSON file.
- Crafts a personalized invitation letter from the parsed details.
- Outputs the letter as a PDF file, ready for printing or emailing.
- See the example section below for a visual preview.
- Java Development Kit (JDK) version 8 or newer.
- Gradle for building and running the application.
- Make (optional) simplifies the execution process through predefined commands.
Start by modifying config.sample.json
to include your specific invitation details.
To compile the project, run:
./gradlew build
Using Make (Recommended):
make letter CONFIG_PATH=/path/to/your-config.json OUTPUT_PATH=/path/to/output/invitation-letter.pdf
Using Gradle:
To execute the application with Gradle, use:
./gradlew run --args="-c './config.sample.json' -o '.'"
configPath
: Path to your JSON configuration file.outputPath
: Destination for the generated PDF.
Alternatively, update the gradle.properties
with your configuration and outputPath, then run:
./gradlew run
Execute the test suite with:
./gradlew test
Here's a preview of what the generated PDF looks like:
- Renato Araujo - LinkedIn Profile
This project is released under the MIT License - see the LICENSE file for details.