This is the python version of the {signature.r}
and {signature.js}
application.
This application provides a graphical interface to streamline the creation and maintenance of your email signature.
No more wrestling with images or getting tangled up in HTML code; the application offers a set of fields to update your signature easily.
Simply enter your name, first name, email, and other necessary information to populate your signature.
Additionally, the application allows you to copy the HTML code with a single button click, making it easy to paste into your email client settings.
Lastly, updating the banner (the image at the bottom of the signature) and the associated link for redirection is straightforward. You no longer need to request everyone to update their signature individually for these changes.
🏆 This project won the 2024 Shiny Contest for the best Shiny application with Python.
More details on the contest can be found here.
🕹️ Try the app at: https://connect.thinkr.fr/signature-py/
-
Clone the repository
-
Install pipx
-
Install poetry
-
Navigate to the project directory and install the dependencies
poetry install
- Activate the virtual environment
poetry shell
- Run the app
shiny run --reload signature/app.py
or shortcut:
poe runshiny
This app uses Bootstrap 5.3.3
.
To modify the theme, edit the signature/scss/signature.scss
file.
To compile the SCSS to CSS, run:
cd signature
sass scss/signature.scss css/signature.css
The redirection banner is a JavaScript function that redirects the user to the specified URL.
To modify the redirection URL, edit the index.html
file at the root of the project.
The mockup was created using Figma.
Explore the mockup here.
The app is deployed on Connect.
poetry shell
cd signature
rsconnect write-manifest shiny . --overwrite
Then update requirements.txt
:
poetry export --without-hashes --format=requirements.txt > requirements.txt
To run the tests, use the following command:
poetry run pytest
or
poetry run pytest --github-report --verbose
or shortcut:
poe test
If you are using VSCode, you can also dowload the 'Playwright Test' extension and run the tests from the testing tab.
This project uses the poe
command to run the app, tests, and other commands.
To see the available commands, run:
poe
All the commands are defined in the pyproject.toml
file.
Create a new command by adding a new entry in the tasks
section of the pyproject.toml
file.
[tool.poe.tasks]
hello = "echo 'Hello, world!'"
You love this project and would like to reuse it for your own needs?
You can fork this repository and adapt it to your needs.
What you can do:
-
fork this repository
-
adapt the signature template to your needs. The template is located in the
signature/template
folder. Edit thetemplate.html
file to modify the signature template. -
modify the app to add or remove fields from the signature form to edit the signature.
-
update tests to match the new fields.
-
modify the redirection banner to redirect to your own URL.
-
modify the theme by editing the
signature/scss/signature.scss
file. -
Remove google analytics from tag script in the
app.py
file. -
deploy the app on your own server.
-
share the app with your colleagues.
-
enjoy the app!
Please note that the signature.py project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.