Package: medisch-contact-downloader
Download Medisch Contact and convert to EPUBA command line tool and lib to download Medisch Contact and convert to EPUBIntroductionMedisch Contactis a Dutch magazine for medical doctors.This package provides a Python libary and command line tool for convenient downloading of the online contents to EPUB files.Free software: MIT licenseInstallationIf you have Python on your system you can do the usual:$ pip install medisch-contact-downloaderQuickstartCommand line usage examplesList all issues in the current year. For listing only, no authentication is required.$ medisch-contact-downloader -lList all issues in the years 2002, 2004, 2006, 2007, and 2008:$ medisch-contact-downloader -l -y 2002 2004 2006-2008Download the latest issue to the default download-directory. For downloading, a username and password is required for authentication.$ medisch-contact-downloader -u username -p password -dDownload the issues with the IDs 2022-4 and 2022-5 to the ~/Downloads download-directory. An ID is composed of the year and number of the issue.$ medisch-contact-downloader -u username -p password -d -i 2022-4 2022-5 -w ~/DownloadsEmail the latest issue:$ medisch-contact-downloader -e -u username -p password --smtp_host smtp.example.com --smtp_port 587 --smtp_username user@example.com --smtp_password <password> --sender user@example.com --recipient info@example.comShow command line help::$ medisch-contact-downloader -hConfiguration FileThe configuration fileconfig.inican change the default values for command line options. It should be written using a standard INI style. The keys should be grouped into sections. For now, the name of the sections are ignored. The section name appears on a line by itself, in square brackets ([ and ]). Configuration files may include comments, prefixed by # or ;. Comments may appear on their own on an otherwise empty line, possibly indented.LocationTheconfig.iniconfiguration file should be put in the default config directory. This location is different on different operating systems. A custom configuration file can be provided with the--configargument.Linux:$HOME/.config/medisch-contact-downloader/config.ini, which respects theXDG_CONFIG_HOMEenvironment variable.MacOS:$HOME/Library/Application Support/medisch-contact-downloader/config.iniWindows:%APPDATA%\medisch-contact-downloader\config.iniPrecedence / Override orderCommand line options override the values in a configuration file.Exampleconfig.ini; This is a comment
# This is another comment
[settings]  ; a section marker is required in INI files
verbose = True
download_dir = /home/folkert/Downloads
username = <username>  ; username for authentication with https://www.medischcontact.nl/
password = <password>  ; password
smtp_host = smtp.example.com  ; host name or ip address of the SMTP server
smtp_port = 587  ; port of the SMTP server
smtp_username = user@example.com  ; accountname, username, or email address of your email account for authentication
smtp_password = <password>  ; password of your email account for authentication.
sender = user@example.com
recipient = info@example.comDownloadWhen an issue is downloaded, it is copied to the default download directory. This location is different on different operating systems. A custom download directory can be provided with the--download_dirargument.LocationmacOS:~/Library/Application Support/medisch-contact-downloaderWindows:%APPDATA%\medisch-contact-downloaderLinux (and other Unices):~/.local/share/medisch-contact-downloaderEmailYou can send an automated email message with the downloaded Epub as an attachment, for example tosend it to your Kindle. To use this feature, the--emailargument should be provided to the command line tool, along with the required arguments:--smtp_host,--smtp_port,--smtp_username,--smtp_password,--sender, and--recipient. This option presumes the--downloadargument.Please note that if you use 2-step-verification in a Gmail-account, you might need an App Password (seehttps://support.google.com/accounts/answer/185833)Changelog[0.2.5] - 2023-03-25Fix changed datestring on websiteShow usage info when no arguments are given[0.2.4] - 2022-08-01Fix handling of subject and body arguments[0.2.3] - 2022-08-01Fix argumentsCorrect Windows default download directory in README[0.2.2] - 2022-08-01Implement CSRF protection of changed login page[0.2.1] - 2022-02-24Ensure unique filename by adding id[0.2] - 2022-02-23Bugfixes[0.1.0] - 2022-02-21First release on PyPI.AuthorFolkert van der Beek -https://gitlab.com/fvdbeek