Skip to main content

RSS Reader

Description

Command-line RSS reader utility implemented in Python

Installation

1. Install from PyPI repository

Run pip install rss-reader-sardor-irgashev

2. Clone from GitLab

  1. Clone the repository
  2. Install necessary requirements by running pip install -r requirements.txt

Interface

Utility provides the following interface:

usage: rss_reader.py [-h] [--version] [--json] [--verbose] [--limit LIMIT]
                     source

Pure Python command-line RSS reader.

positional arguments:
  source         RSS URL

optional arguments:
  -h, --help     show this help message and exit
  --version      Print version info
  --json         Print result as JSON in stdout
  --verbose      Outputs verbose status messages
  --limit LIMIT  Limit news topics if this parameter provided
  --date DATE    News publishing date
  --to-html HTML Convert news to HTML
  --to-pdf PDF   Convert news to PDF
  --colorize     Enables colorized output

Usage Examples

> python3 rss_reader.py http://rss.cnn.com/rss/edition_world.rss --limit 1
    Feed Title: CNN.com - RSS Channel - World

    News Title: China's Weibo shows user locations to combat 'bad behavior'
    Date Published: Thu, 28 Apr 2022 15:55:04 GMT
    Description: Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat "bad behavior" online.
    Link: https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html
    Image: https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg

    ====================================================================================
> python3 rss_reader.py http://rss.cnn.com/rss/edition_world.rss --limit 1 --json
    [
        {
            "Feed Title": "CNN.com - RSS Channel - World",
            "Feed Source": "http://rss.cnn.com/rss/edition_world.rss",
            "News Item": {
                "News Title": "China's Weibo shows user locations to combat 'bad behavior'",
                "Publication Date": "Thu, 28 Apr 2022 15:55:04 GMT",
                "Description": "Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat \"bad behavior\" online.",
                "Link": "https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html",
                "Image Link": "https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg"
            }
        }
    ]
> python3 rss_reader.py http://rss.cnn.com/rss/edition_world.rss --date 20220428 --limit 1
    Feed Title: CNN.com - RSS Channel - World

    News Title: China's Weibo shows user locations to combat 'bad behavior'
    Date Published: Thu, 28 Apr 2022 15:55:04 GMT
    Description: Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat "bad behavior" online.
    Link: https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html
    Image: https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg

    ====================================================================================
>  python3 rss_reader.py http://rss.cnn.com/rss/edition_world.rss --date 20220428 --limit 1 --json
    [
        {
            "Feed Title": "CNN.com - RSS Channel - World",
            "Feed Source": "http://rss.cnn.com/rss/edition_world.rss",
            "News Item": {
                "News Title": "China's Weibo shows user locations to combat 'bad behavior'",
                "Publication Date": "Thu, 28 Apr 2022 15:55:04 GMT",
                "Description": "Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat \"bad behavior\" online.",
                "Link": "https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html",
                "Image Link": "https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg"
            }
        }
    ]
> python3 rss_reader.py --date 20220428 --limit 1
    Feed Title: CNN.com - RSS Channel - World

    News Title: China's Weibo shows user locations to combat 'bad behavior'
    Date Published: Thu, 28 Apr 2022 15:55:04 GMT
    Description: Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat "bad behavior" online.
    Link: https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html
    Image: https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg

    ====================================================================================
> python3 rss_reader.py --date 20220428 --json --limit 1
    [
        {
            "Feed Title": "CNN.com - RSS Channel - World",
            "Feed Source": "http://rss.cnn.com/rss/edition_world.rss",
            "News Item": {
                "News Title": "China's Weibo shows user locations to combat 'bad behavior'",
                "Publication Date": "Thu, 28 Apr 2022 15:55:04 GMT",
                "Description": "Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat \"bad behavior\" online.",
                "Link": "https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html",
                "Image Link": "https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg"
            }
        }
    ]
> python3 rss_reader.py http://rss.cnn.com/rss/edition_world.rss --to-pdf ./ --to-html ./
Creates both HTML and PDF files at the specified location

Alternatives with installation from PyPI

> rss_reader http://rss.cnn.com/rss/edition_world.rss --limit 1
    Feed Title: CNN.com - RSS Channel - World

    News Title: China's Weibo shows user locations to combat 'bad behavior'
    Date Published: Thu, 28 Apr 2022 15:55:04 GMT
    Description: Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat "bad behavior" online.
    Link: https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html
    Image: https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg

    ====================================================================================
> rss_reader http://rss.cnn.com/rss/edition_world.rss --limit 1 --json
    [
        {
            "Feed Title": "CNN.com - RSS Channel - World",
            "Feed Source": "http://rss.cnn.com/rss/edition_world.rss",
            "News Item": {
                "News Title": "China's Weibo shows user locations to combat 'bad behavior'",
                "Publication Date": "Thu, 28 Apr 2022 15:55:04 GMT",
                "Description": "Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat \"bad behavior\" online.",
                "Link": "https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html",
                "Image Link": "https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg"
            }
        }
    ]
> rss_reader http://rss.cnn.com/rss/edition_world.rss --date 20220428 --limit 1
    Feed Title: CNN.com - RSS Channel - World

    News Title: China's Weibo shows user locations to combat 'bad behavior'
    Date Published: Thu, 28 Apr 2022 15:55:04 GMT
    Description: Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat "bad behavior" online.
    Link: https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html
    Image: https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg

    ====================================================================================
> rss_reader http://rss.cnn.com/rss/edition_world.rss --date 20220428 --limit 1 --json
    [
        {
            "Feed Title": "CNN.com - RSS Channel - World",
            "Feed Source": "http://rss.cnn.com/rss/edition_world.rss",
            "News Item": {
                "News Title": "China's Weibo shows user locations to combat 'bad behavior'",
                "Publication Date": "Thu, 28 Apr 2022 15:55:04 GMT",
                "Description": "Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat \"bad behavior\" online.",
                "Link": "https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html",
                "Image Link": "https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg"
            }
        }
    ]
> rss_reader --date 20220428 --limit 1
    Feed Title: CNN.com - RSS Channel - World

    News Title: China's Weibo shows user locations to combat 'bad behavior'
    Date Published: Thu, 28 Apr 2022 15:55:04 GMT
    Description: Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat "bad behavior" online.
    Link: https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html
    Image: https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg

    ====================================================================================
> rss_reader --date 20220428 --json --limit 1
    [
        {
            "Feed Title": "CNN.com - RSS Channel - World",
            "Feed Source": "http://rss.cnn.com/rss/edition_world.rss",
            "News Item": {
                "News Title": "China's Weibo shows user locations to combat 'bad behavior'",
                "Publication Date": "Thu, 28 Apr 2022 15:55:04 GMT",
                "Description": "Weibo, China's equivalent of Twitter, told users on Thursday it would start to publish their IP locations on their account pages and when they post comments, in a bid to combat \"bad behavior\" online.",
                "Link": "https://www.cnn.com/2022/04/28/tech/weibo-user-location-bad-behavior/index.html",
                "Image Link": "https://cdn.cnn.com/cnnnext/dam/assets/220428104403-weibo-app-china-file-restricted-super-169.jpg"
            }
        }
    ]
> rss_reader http://rss.cnn.com/rss/edition_world.rss --to-pdf ./ --to-html ./
Creates both HTML and PDF files at the specified location

Feed Sources

  1. https://moxie.foxnews.com/feedburner/latest.xml
  2. https://www.scmp.com/rss/5/feed
  3. http://rss.cnn.com/rss/edition_world.rss
  4. https://globalnews.ca/feed/
  5. https://www.washingtontimes.com/rss/headlines/news/world/

Release files for rss-reader-sardor-irgashev 5.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rss-reader-sardor-irgashev 5.0.0
File Size Uploaded
rss-reader-sardor-irgashev-5.0.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rss-reader-sardor-irgashev 5.0.0
File Interpreter ABI Platform
rss_reader_sardor_irgashev-5.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / rss-reader-sardor-irgashev-5.0.0.tar.gz

Download URL rss-reader-sardor-irgashev-5.0.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ff4b454b4588db1442745f40dda389680954c3a9be54e6226069dc67f0f23162
BLAKE2b-256 checksum
How to use checksums
6a11401face398e3a2e4cb7840e2d2ae632765a6c548c4e45450f0ae22fa1768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / rss_reader_sardor_irgashev-5.0.0-py3-none-any.whl

Download URL rss_reader_sardor_irgashev-5.0.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68a78b46069f914c2365eb3046190f24a45340afa5d8dcb3e8342d5c09f540df
BLAKE2b-256 checksum
How to use checksums
dd65d1dfaf1eae04681939239336efdf223b9bbba3f066bdaab2faea014180cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 release files

4.1.4

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.0.1

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page