Metadata-Version: 2.4
Name: bbc-news-cli
Version: 1.0.0
Summary: Providing a CLI to search BBC News by category and retrieving their article contents.
Author: Matthew Sayer
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: feedparser
Requires-Dist: bs4
Requires-Dist: requests

# 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

```bash
pip install -e .
```

## Usage

### View Category Headlines

Fetch the latest headlines from a specific BBC category:

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

**Available categories:**
- `frontpage` (default)
- `business`, `entertainment`, `health`, `education`
- `politics`, `technology`, `world`
- `england`, `scotland`, `wales`, `in-depth`

**Examples:**
```bash
# 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:

```bash
bbc news article <ARTICLE-ID>
```

**Example:**
```bash
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
