Script to create a file containing an RSS feed based on a specific tag in writefreely.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

999 B

writefreelytag2rss

Script to create a file containing an RSS feed based on a specific tag in writefreely.

Rationale

This script could be useful if you want to create an RSS feed based on a specific tag in a writefreely instance.

If you go to the URL https://your.writefreely.instance/tag:fedora, you will get all the posts containing the "fedora" tag. At the moment a feed based on tags (like it could be on a site generated with Hugo) is not provided by writefreely.

This script will generate a file containing such feed.

Usage

Rename config.cfg.example to config.cfg

Edit config.cfg accordingly.

Put the Python script in a cron job or in a systemd timer.

Execute the script python3 writefreelytag2rss.py ./config.cfg

The generated file should be then served by a web server.

More feeds

You can use many config files to generate different feeds for different tags.

Required Python modules

  • bs4
  • datetime
  • feedgen
  • requests
  • configparser
  • sys