semvec/pypi-packages huggingface dataset:
hckrnews 0.1.1
Command line tool to display HN top stories
Requires Python: >=3.13

# hckrnews - Hacker News CLI Viewer

A command line tool to display the top stories from Hacker News using the API provided by hckrnews.com.

![Hacker News CLI Screenshot](screenshot.png)

## License

This project is licensed under the [MIT License](LICENSE.md) - see the LICENSE.md file for details.

## Features

- View top stories from Hacker News in your terminal
- Color-coded titles based on story score:
  - Green: Top 10 stories
  - Yellow: Stories ranked 11-20
  - Purple: Stories in the top 50% (excluding top 20)
  - Grey: Other stories
- 2-column layout showing titles and points/comments
- Various filtering options:
  - Top 10 stories
  - Top 20 stories
  - Top 50% of stories
  - All stories
- Navigation between different days
- Multiple sorting options:
  - By points
  - By comments
  - By submission date
- Keyboard shortcuts for all actions

## Installation

### From PyPI (Recommended)

Install directly from PyPI:

```bash
pip install hckrnews
```

Or if you're using uv:

```bash
uv pip install hckrnews
```

### Development Installation

Clone this repository and install in development mode:

```bash
cd hckrnews
pip install -e .
```

Or if you're using uv:

```bash
cd hckrnews
uv pip install -e .
```

## Usage

Simply run the `hckrnews` command to start the application:

```bash
hckrnews
```

### Keyboard Shortcuts

- `j` - Previous day (earlier)
- `k` - Next day (later)
- `l` - Open comments page in browser
- `space` - Open story URL in browser
- `1` - Show top 10 stories
- `2` - Show top 20 stories
- `3` - Show top 50% stories
- `4` - Show all stories
- `p` - Sort by points
- `c` - Sort by comments
- `d` - Sort by date
- `r` - Refresh current view
- `q` - Quit the application
- Arrow keys - Navigate between stories

## Data Source

Data is fetched from the hckrnews.com API:
`https://hckrnews.com/data/YYYYMMDD.js`

## Development Tools

### Version Bumping

The project includes a version bumping script that helps maintain consistent versioning across the codebase. It updates:

- Version in pyproject.toml
- User-Agent version in API requests
- Git commits (optional)
- Git tags (optional)

Usage:

```bash
# Increment patch version (0.1.0 -> 0.1.1)
python bump_version.py patch

# Increment minor version (0.1.0 -> 0.2.0)
python bump_version.py minor

# Increment major version (0.1.0 -> 1.0.0)
python bump_version.py major

# Set specific version
python bump_version.py --set 0.2.0

# Increment version and create git commit
python bump_version.py patch --commit

# Increment version, create commit and git tag
python bump_version.py patch --tag
```

When using the `--tag` option, the script automatically creates a commit with message "chore: version bump to x.y.z" before tagging.
worldfactbook 0.1.3
A Python library for fetching and processing data from the CIA World Factbook.
Requires Python: >=3.8

# WorldFactbook

**WorldFactbook** is a Python library that provides easy access to country-related data from the [**CIA World Factbook**](https://www.cia.gov/the-world-factbook/). It supports retrieving information about populations, languages, ISO codes, and more, with built-in caching for efficiency.

## Data Source
This project sources data from the **CIA World Factbook**, which is in the public domain. 
Please note that this project and its author are **not endorsed** by or affiliated with the authors of the Factbook.

The World Factbook 2024. Washington, DC: Central Intelligence Agency, 2024.
https://www.cia.gov/

## Features

- Fetch country data from the CIA World Factbook API  
- Retrieve language distribution, population, and ISO country codes  
- Supports caching to reduce redundant API calls  
- Processes and formats percentage-based data
- Provides lower level functions to access additonal fields  

## Installation

```sh
pip install worldfactbook
```

## Usage
```python
from worldfactbook import WorldFactbook

factbook = WorldFactbook(cache_folder="cache", use_cache=True)

# Get population data
populations = factbook.get_populations()
print(populations)

# Get language distribution
languages = factbook.get_languages()
print(languages)

# Get country ISO codes
country_codes = factbook.get_country_codes()
print(country_codes)

# Lower-level API calls
country_comparison_data = factbook.get_field_country_comparison_data("population")  # Get population comparison data
field_data = factbook.get_field_data("languages")  # Get field data like languages
reference_data = factbook.get_reference_data("country-data-codes")  # Get reference data for country codes
```