Skip to content

Latest commit

 

History

History
180 lines (106 loc) · 5.3 KB

README.md

File metadata and controls

180 lines (106 loc) · 5.3 KB

Signature.py Signature.py logo

Python Bootstrap Figma

Unit tests + E2E tests

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.

Winner of the 2024 Shiny Contest

🏆 This project won the 2024 Shiny Contest for the best Shiny application with Python.

More details on the contest can be found here.

Demo

🕹️ Try the app at: https://connect.thinkr.fr/signature-py/

Try locally

  1. Clone the repository

  2. Install pipx

  3. Install poetry

  4. Navigate to the project directory and install the dependencies

poetry install
  1. Activate the virtual environment
poetry shell
  1. Run the app
shiny run --reload signature/app.py

or shortcut:

poe runshiny

Modify the theme

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

How the redirection banner works?

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.

Mockup

The mockup was created using Figma.

Explore the mockup here.

Deployment

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

Tests

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.

Playwright Test

Playwright Test

Poe commands

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?

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 the template.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!

Code of Conduct

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.