Skip to content

Download automatically the last edition for Le Monde Diplomatique and add it to Calibre

License

Notifications You must be signed in to change notification settings

Pyrrhu5/monde_diplo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MondeDiplo

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.

Setup Calibre content server

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

Installation

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

Update

git pull

License

Unmodified MIT license

See License.md

About

Download automatically the last edition for Le Monde Diplomatique and add it to Calibre

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published