Welcome to vitemadose-cli’s documentation!

ViteMaDose - CLI

Ce projet est un petit outil en ligne de commande, permettant de détecter les rendez-vous disponibles dans votre département pour recevoir un vaccin contre la covid19.

Basé sur les données de vitemadose.covidtracker.fr (dont je tiens à féliciter l’équipe par la même occasion!), ce projet ne vise pas à s’y substituer: Les données les plus détaillées et les mieux présentées sont accessibles via le site officiel, pas via cet outil.

Si un ou des rendez-vous sont disponibles, vous avez la possibilité de recevoir une notification sur votre téléphone, via les services de pushbullet.com.

NDLR: Pushbullet est assez simple à mettre en oeuvre et je l’utilisais déjà, d’où ce choix. Je ne doute pas que d’autres systèmes feraient aussi bien voir mieux. N’hésitez pas à faire des PR!

Le projet est en franglais car j’ai l’habitude de coder en Anglais mais la destination de ce projet est uniquement Française.

Installation

pip install vmdcli

Usage

vmd-cli --help
# Output
Usage: vmd-cli [OPTIONS]

  Look for available appointment(s) in the next X days in your departement.

Options:
  -v, --verbose         Enable verbose mode
  -q, --quiet           Quiet mode
  -c, --chrono          Only look for "chronodoses"
  -s, --watch INTEGER   Watch mode, sleep X seconds before replaying
  --days [1|2|7|28|49]  Number of days to look at for available appointment(s)
  --dept TEXT           Your departement number
  --pbtoken TEXT        Pushbullet token to send a notification
  --help                Show this message and exit.

Examples

Chercher un rendez-vous dans les 2 prochains jours dans le 33:

vmd-cli --days 2 --dept 33
# Output
Centre municipal de vaccination anti COVID-19 de la ville d'Arcachon: 2 available appointements in the next 2 days
  > https://www.doctolib.fr/centre-de-sante/arcachon/centre-municipal-de-vaccination-anti-covid-19-de-la-ville-d-arcachon?pid=practice-164885
  > Vaccins proposés: AstraZeneca
  > Type d'établissement: vaccination-center

Chercher une ‘chronodose’ dans un département:

vmd-cli --chrono --dept 33
# Output
Looking for available appointements in departement 33 for 'chronodoses'
Last data update: 4 minutes
CHU BORDEAUX - SITE PELLEGRIN: 1 'chronodoses' availables
  > https://vaccination-covid.keldoc.com/centre-hospitalier-universitaire/bordeaux-33000/chu-de-bordeaux?cabinet=16876&specialty=496
  > Vaccins proposés: Pfizer-BioNTech
  > Type d'établissement: vaccination-center

Chercher, toutes les 60 secondes, une ‘chronodose’ dans un département:

vmd-cli --chrono --dept 33 --watch 60

Notifications

Spécifiez un Token d’API Pushbullet via l’argument --pbtoken pour recevoir une notification sur votre téléphone.

vmd-cli --chrono --dept 35 --pbtoken "o.xxxxxxxxxxxxxxxxxxxxxxxxxxx"

Cron/Planification

Il est tout à fait possible de mettre la commande dans un gestionnaire de planification comme cron:

Par exemple pour recevoir une notification des centres de Gironde (33) avec des disponibilités pour une ‘chronodose’, avec une vérification toutes les heures:

crontab -e

# Ajoutez:
# m h   dom mon dow   command
00  *   *   *   *     vmd-cli --quiet --chrono --dept 33 --pbtoken "o.xxxxxxxxxxxxxxxxxxxxxxxxxxx"

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/lrivallain/vmdcli/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.

  • Any details about your local setup that might be helpful in troubleshooting.

  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.

Write Documentation

{{ cookiecutter.project_name }} could always use more documentation, whether as part of the official {{ cookiecutter.project_name }} docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/lrivallain/vmdcli/issues.

If you are proposing a feature:

  • Explain in detail how it would work.

  • Keep the scope as narrow as possible, to make it easier to implement.

  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here’s how to set up vmdcli for local development.

  1. Fork the vmdcli repo on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:your_name_here/vmdcli.git
    
  3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

    $ mkvirtualenv vmdcli
    $ cd vmdcli/
    $ python setup.py develop
    
  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 vmdcli tests
    $ python setup.py test or pytest
    $ tox
    

    To get flake8 and tox, just pip install them into your virtualenv.

  6. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.

  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.

  3. The pull request should work for Python 3.6, 3.7 and 3.8, and for PyPy. Check https://travis-ci.org/lrivallain/vmdcli/pull_requests and make sure that the tests pass for all supported Python versions.

Deploying

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:

$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags

GitHub Actions will then deploy to PyPI if tests pass.

Credits

Development Lead

  • Ludovic Rivallain

Contributors

None yet. Why not be the first?

Indices and tables