Skip to main content

Providing a CLI to search BBC News by category and retrieving their article contents.

Project description

BBC News CLI

A command-line tool for fetching and reading BBC news articles directly from your terminal.

Features

  • ๐Ÿ“ฐ Browse headlines from 12 BBC news categories
  • ๐Ÿ“– Read full article content with clean, wrapped text formatting
  • ๐Ÿ” Extract article IDs from RSS feeds for quick access

Installation

pip install -e .

Usage

View Category Headlines

Fetch the latest headlines from a specific BBC category:

bbc news category [CATEGORY] [--limit N]

Available categories:

  • frontpage (default)
  • business, entertainment, health, education
  • politics, technology, world
  • england, scotland, wales, in-depth

Examples:

# Get top 10 frontpage headlines
bbc news category frontpage

# Get top 5 business headlines
bbc news category business --limit 5

Output shows article IDs you can use to read full content:

#    ID               TITLE
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
1    cgk0j71g417o     UK forecast to see biggest hit to growth...
2    c5y8d721q18o     Rocket stocks soar on report Musk's SpaceX...

Read Full Article

Retrieve and display the full content of a BBC article:

bbc news article <ARTICLE-ID>

Example:

bbc news article c5y8d721q18o

Options

  • -v, --verbose โ€” Enable verbose logging for debugging

Dependencies

  • Python โ‰ฅ 3.10
  • click
  • feedparser
  • beautifulsoup4
  • requests

Development

The CLI uses a plugin-based command system. Add new commands by creating cmd_*.py files in src/core_cli/commands/.

License

MIT

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

bbc_news_cli-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bbc_news_cli-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file bbc_news_cli-1.0.0.tar.gz.

File metadata

  • Download URL: bbc_news_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for bbc_news_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 02545d4f9b83e8ee58a688410e88f174178d9f43c2d2a9e9725d75ce91b59aef
MD5 aa937e15e9e3af9cb4441e12b1b2fbf3
BLAKE2b-256 580204403025980ae37008b52bb4b18ecefe4d15a5d5c7d47a1b241e29d7d3ae

See more details on using hashes here.

File details

Details for the file bbc_news_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bbc_news_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for bbc_news_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2807aceea1ae2fc042bcbccaa4fc7aea9495df30c7d28ecbc990381f6304d6fb
MD5 79900720968ff7b0849e8c5d3ac54492
BLAKE2b-256 27ad0dc8026b78867ba99b22b2e58aed991bc274357cb846fa1ecb2d778ffdb4

See more details on using hashes here.

Supported by

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