Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Shiny App with Python

License

NotificationsYou must be signed in to change notification settings

ThinkR-open/signature.py

Repository files navigation

PythonBootstrapFigma

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

Demo

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

Try locally

  1. Clone the repository

  2. Installpipx

  3. Installpoetry

  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 Bootstrap5.3.3.

To modify the theme, edit thesignature/scss/signature.scss file.

To compile the SCSS to CSS, run:

cd signaturesass 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, creeate aindex.html file at the root of the project.

See :signature

Mockup

The mockup was created usingFigma.

Explore the mockuphere.

Deployment

The app is deployed onVercel + Shinylive andPosit Connect.

With Shinylive:

Export the signature site using the following command:

poetry shellshinyliveexport signature site

Then update run the app locally using the following command:

python3 -m http.server --directory site --bind localhost 8008

With Posit Connect:

Export the signature site using the following command:

poetry shellcd signaturersconnect write-manifest shiny. --overwrite

If needed, update therequirements.txt file with the necessary dependencies.

poetryexport --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:

poetest

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 thepoe command to run the app, tests, and other commands.

To see the available commands, run:

poe

All the commands are defined in thepyproject.toml file.

Create a new command by adding a new entry in thetasks section of thepyproject.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 thesignature/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 thesignature/scss/signature.scss file.

  • Remove google analytics from tag script in theapp.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 aContributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp