Download the last edition of le monde diplomatique and add it to a Calibre's content server.
Calibre should be running with the content server enabled and a user set.
A legit subscription to the newspaper is required.
Only tested on Linux.
sudo apt install -y calibre
Setup users
calibre-server --userdb <PATH TO USER DATABASE> --manage-users
Service
Replace the data in < >
echo"[Unit]
Description=Calibre Content Server
After=network.target
[Service]
Type=simple
User=<UNIX USER>
ExecStart=/usr/bin/calibre-server --userdb <PATH TO USER DATABASE> --enable-auth --port 8083 <EBOOKS LIBRARY PATH>
[Install]
WantedBy=default.target
" | sudo tee /etc/systemd/system/calibre-server.service
sudo systemctl enable calibre-server
sudo systemctl start calibre-server
Calibre is now accessible from localhost:8083
Python
Python version 3.6 or above
python3 --version
Clone the repository
Git is required
git --version
Clone it
Virtual env
Optional, but Run.sh
assumes you have setup a virtual env as such:
python3 -m venv venv
Dependencies
Activate the virtual env first:
source ./venv/bin/activate
Install dependencies:
pip3 install -r requirements.txt
Executable
Allows execution of entry point (not needed for Windows)
chmod +x MondeDiplo.py
or, if using the virtual env
chmod +x Run.sh
Crontab
Get it every 5th of each month.
00 04 5 * * <install path>/mondediplo/Run.sh >> <where you want the logs>/mondediplo.log
git pull
Unmodified MIT license
See License.md