Command-line RSS reader utility
Project description
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
- Clone the repository
- 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
!!! PDF file generation may take little time
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 https://moxie.foxnews.com/feedburner/latest.xml --to-pdf ./ --to-html ./
Creates both HTML and PDF files at the specified location
Alternatives with installation from PyPI
> 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
====================================================================================
> 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"
}
}
]
> 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
====================================================================================
> 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"
}
}
]
> 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
====================================================================================
> 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 https://moxie.foxnews.com/feedburner/latest.xml --to-pdf ./ --to-html ./
Creates both HTML and PDF files at the specified location
Feed Sources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for rss-reader-sardor-irgashev-4.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52183bf853698067787625624585d625ea486014932b632167875c4fc6c65609 |
|
MD5 | a441153fcf702bea2504154d28660f93 |
|
BLAKE2b-256 | 7bd05b2bdfae3e63e5b32e37bb78247f6860ac812a952471e48238d21ce94af0 |
Close
Hashes for rss_reader_sardor_irgashev-4.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a605f95f25208c70193db230a63534fb4dc2f18ed6bf9c49abe97e4e23cf905a |
|
MD5 | 60742da2dbbd44a7c57edad4e05b1eb1 |
|
BLAKE2b-256 | f617d87e6fe10ad7db81f2077306b25f936983164bcf7c46ae0b1e7308e8f617 |