1
0
Fork
You've already forked simple-newspaper
0
Terminal utility that converts RSS feeds and URLs to epub documents
  • Python 97.8%
  • Makefile 2.2%
2023年11月14日 13:25:16 +02:00
.reuse Add terminal utility code 2023年09月03日 17:32:49 +03:00
LICENSES Add terminal utility code 2023年09月03日 17:32:49 +03:00
newspaper Do not download articles marked as read 2023年11月14日 13:25:16 +02:00
.gitignore Add terminal utility code 2023年09月03日 17:32:49 +03:00
LICENSE Initial commit 2023年08月31日 10:35:22 +00:00
Makefile Add terminal utility code 2023年09月03日 17:32:49 +03:00
mypy.ini Add terminal utility code 2023年09月03日 17:32:49 +03:00
pylintrc Add terminal utility code 2023年09月03日 17:32:49 +03:00
README.md Add terminal utility code 2023年09月03日 17:32:49 +03:00
requirements.txt Add terminal utility code 2023年09月03日 17:32:49 +03:00

Simple newspaper

Terminal utility that generates EPUB documents from RSS feeds and URLs.

Dependencies

  • Calibre e-book management application.
  • Python modules; run pip install -r requirements.txt to install them

Configure

RSS

RSS feeds should be added to Calibre recipes. Calibre recipes' configuration files can be found at ~/.config/calibre/custom_recipes or, if Calibre has been installed as flatpak, ~/.var/app/com.calibre_ebook.calibre/config/calibre/custom_recipes.

URLs

The links that should be converted to EPUB documents should be added to a plain text file, e.g. ~/Documents/read-it-later.txt, like this:

www.example.com/my_article.html
Another article www.example.com/another_article
Yet another [article](www.example.com/yet_another.html)

Execute

The simple-newspaper utility saves the EPUB documents either into an external, not mounted storage device or into a normal directory in your file system.

External storage device

For the EPUB documents to be saved into a not mounted device, the following are needed:

  • the path to the external device, e.g. /dev/disk/by-uuid/7afb-3231
  • the directory that the device should be mounted to, e.g. /mnt/jane/sd
  • the directory to save the EPUB files into. It should be a relative path on the target device, e.g. newspaper/news

Run:

python ebook_newspaper.py --recipes_dir ~/.config/calibre/custom_recipes --target_device /dev/disk/by-uuid/7afb-3231 --target_mount_point /mnt/jane/sd --target_dir newspaper/news --read_it_later_urls ~/Documents/read-it-later.txt

The utility will ask for the sudo password for the external storage to be mounted.

File system directory

For the EPUB documents to be saved into a directory in your $HOME, e.g. ~/Documents/newspaper, execute:

python ebook_newspaper.py --recipes_dir ~/.config/calibre/custom_recipes --home_target_dir ~/Documents/newspaper --read_it_later_urls ~/Documents/read-it-later.txt
More options

You can archive the old articles by setting the --archive option. If Calibre has been installed as flatpak, add the --flatpak option. E.g.,

python ebook_newspaper.py --recipes_dir ~/.var/app/com.calibre_ebook.calibre/config/calibre/custom_recipes --target_device /dev/disk/by-uuid/7afb-3231 --target_mount_point /mnt/jane/sd --target_dir newspaper/news --read_it_later_urls ~/Documents/read-it-later.txt --archive --flatpak