Skip to content

Love hosting guests but dread writing the invitation letter for immigration? Here's a handy tool to help!

License

Notifications You must be signed in to change notification settings

renatoaraujo/uk-invitation-letter

Repository files navigation

UK Invitation Letter Generator

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.

Why This Project Exists

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.

Key Features

  • 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.

Getting Started

Prerequisites

  • Java Development Kit (JDK) version 8 or newer.
  • Gradle for building and running the application.
  • Make (optional) simplifies the execution process through predefined commands.

Setup and Execution

Configuring Your Invitation

Start by modifying config.sample.json to include your specific invitation details.

Building the Project

To compile the project, run:

./gradlew build

Generating Your Letter

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

Running Tests

Execute the test suite with:

./gradlew test

Example of Generated PDF (image)

Here's a preview of what the generated PDF looks like:

Example PDF Output

Acknowledgments

License

This project is released under the MIT License - see the LICENSE file for details.

About

Love hosting guests but dread writing the invitation letter for immigration? Here's a handy tool to help!

Resources

License

Stars

Watchers

Forks