Skip to main content

AP RSS-reader with CLI.

Project description

AP RSS-reader

PyPI License: MIT PRs Welcome Python: 3.8+ MyPy pre-commit.ci status Imports: isort Code style: black Run tests codecov Codacy Badge Requirements Status Build Status

Installation

The project has been tested only with python 3.8 on Ubuntu Linux and Windows 10. If you have python 3.8 and above installed in your machine, just install the AP RSS-reader from PyPI:

python --version
pip install ap-rss-reader

You can find source code of this package on github. See aplatkouski/ap-rss-reader repository.

How to use it

$ ap_rss_reader "https://news.yahoo.com/rss/" --limit 1
Feed: Yahoo News - Latest News & Headlines
Url: https://news.yahoo.com/rss/
Description: The latest news and headlines from Yahoo! News. Get breaking news stories and in-depth coverage with videos and photos.

Title: California finally lifts its last big COVID restrictions. Did the state play it too safe?
Link: https://news.yahoo.com/california-finally-lifts-its-last-big-covid-restrictions-did-the-state-play-it-too-safe-133838908.html
Date: 2021-06-15 13:38:38
Source: Yahoo News
Links:
[1]: https://s.yimg.com/os/creatr-uploaded-images/2021-06/28ddb610-cddc-11eb-8e72-e3afb144a08a (content).

Utility provides the following interface:

usage: ap_rss_reader [-h] [--date DATE] [--limit LIMIT] [--verbose] [--version] [--json] [--to-html TO_HTML] [--to-pdf TO_PDF] [source]

AP RSS-reader with CLI.

positional arguments:
  source             RSS URL

optional arguments:
  -h, --help         show this help message and exit
  --date DATE        Limit news topics by publishing date: YYYYMMDD
  --limit LIMIT      Limit news topics if this parameter provided
  --verbose          Provides additional details as to what the program is doing
  --version          Shows the version of the program and exits
  --json             Print result as JSON in stdout
  --to-html TO_HTML  Save rss channel as html file with given path: 'C:\rss.html' or '/home/user/rss.html'.
  --to-pdf TO_PDF    Save rss channel as pdf file with given path: 'C:\rss.html' or '/home/user/rss.html'.

In case of using --json argument utility converts the news into JSON format:

{
  "articles": [
    {
      "link": "https://news.yahoo.com/california-finally-lifts-its-last-big-covid-restrictions-did-the-state-play-it-too-safe-133838908.html",
      "media": [
        [
          "content",
          "https://s.yimg.com/os/creatr-uploaded-images/2021-06/28ddb610-cddc-11eb-8e72-e3afb144a08a",
          "86",
          "130"
        ]
      ],
      "pubdate": "2021-06-15 13:38:38",
      "source": "Yahoo News",
      "title": "California finally lifts its last big COVID restrictions. Did the state play it too safe?"
    }
  ],
  "description": "The latest news and headlines from Yahoo! News. Get breaking news stories and in-depth coverage with videos and photos.",
  "title": "Yahoo News - Latest News & Headlines",
  "url": "https://news.yahoo.com/rss/"
}

With the argument --verbose program prints all logs in stdout.

Development & Contributing

Development of this happens on GitHub, patches including tests, documentation are very welcome, as well as bug reports!

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

See also our CONTRIBUTING.md.

Copyright

Copyright (c) 2021 Artsiom Platkouski. ap-rss-reader is licensed under the MIT License - see the LICENSE.txt file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ap_rss_reader-0.0.3.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

ap_rss_reader-0.0.3-py2.py3-none-any.whl (17.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ap_rss_reader-0.0.3.tar.gz.

File metadata

  • Download URL: ap_rss_reader-0.0.3.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for ap_rss_reader-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4b2b34f250a8789d29f30864da108171615c7f9e791e6fe985b388547f90c7a8
MD5 51a3af25a8ffb2bd60363c6e02f338ba
BLAKE2b-256 e65394e9114382b31b8df9b656d87827375e49274dca910c5c17500e4ffbe893

See more details on using hashes here.

File details

Details for the file ap_rss_reader-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: ap_rss_reader-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for ap_rss_reader-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e02cff8e957266075eba7a0a78a53aef1ca3f10da39cbc804535d642ab4bf872
MD5 119e3e0c81feefdad282b00226a9446e
BLAKE2b-256 c6107ee9a864c47bfb1303a5ef1a09b817950375148c4d7444ec5a6fbbb02f8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page