This project streamlines the process of generating dismissal letters by automatically filling in the blank spaces with employee information. It saves significant time and reduces errors in the documentation process. The tool now includes a Streamlit-based user interface, enabling users to generate customized dismissal letters in Word format, which are then converted to PDF files. The dismissal letters are automatically filled with data from an Excel file and a predefined Word template.
The primary purpose of this project is to automate the time-consuming task of manually entering employee details into dismissal letters. By fetching employee data from an Excel file and populating a Word template, this tool significantly reduces the time and effort required to create individual dismissal letters, ensuring accuracy and consistency in the documentation.
- Python 3.x
- Libraries: pandas, python-docx, docx2pdf, logging, datetime, babel, pythoncom, streamlit
- Place your Excel file in the "excel" folder and rename it to "Employee_data.xlsx". Ensure that the Excel file contains the necessary employee information.
- Store the Word template for dismissal letters in the "template" folder.
- Clone or download this repository to your local machine.
- Install the required Python libraries:
pip install pandas python-docx docx2pdf streamlit babel pythoncom
- Ensure that your environment meets all requirements listed above.
- Run the Streamlit app:
streamlit run app.py
- Open the provided local URL in your web browser.
- Enter the employee's email and the dismissal date in the Streamlit interface.
- Click on "Generate Dismissal Letter" to produce the dismissal letter.
The generated dismissal letter in Word format will be automatically converted to PDF and can be found in the designated output folder.
- The script
app.py
serves as the entry point for the Streamlit interface. dismissal_letter_automation.py
contains the core logic for generating the dismissal letters.- An alternative way to run this application is using Docker. This can provide a more streamlined setup and execution process, especially for deployment environments.