https://github.com/engineervix/zed-news
Automated news digests from various Zambian πΏπ² sources
https://github.com/engineervix/zed-news
Last synced: 8 months ago
JSON representation
Automated news digests from various Zambian πΏπ² sources
- Host: GitHub
- URL: https://github.com/engineervix/zed-news
- Owner: engineervix
- License: bsd-3-clause
- Created: 2023-06-01T21:46:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-07-25T14:05:10.000Z (8 months ago)
- Last Synced: 2025-07-25T16:36:27.798Z (8 months ago)
- Language: Python
- Homepage: https://zednews.pages.dev
- Size: 10.2 MB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# zed-news
> Automated news digests from various Zambian πΏπ² sources.
[](https://github.com/engineervix/zed-news/actions/workflows/main.yml)
[](https://github.com/engineervix/zed-news/actions?query=workflow%3A%22CI%2FCD%22)
[](https://healthchecks.io)
[](https://www.python.org/downloads/)
[](https://nodejs.org/en/blog/release/v18.0.0)
[](https://github.com/psf/black)
[](https://prettier.io/)
[](http://commitizen.github.io/cz-cli/)
[](http://conventional-changelog.github.io)
[](https://conventionalcommits.org)
- [Introduction](#introduction)
- [Project Evolution: From Podcast to News Digest](#project-evolution-from-podcast-to-news-digest)
- [Development](#development)
- [Core](#core)
- [Web](#web)
- [Deployment](#deployment)
- [Contributing](#contributing)
- [TODO](#todo)
- [Dev](#dev)
- [Frontend (Web)](#frontend-web)
- [Features for future releases](#features-for-future-releases)
- [Credits](#credits)
- [Music](#music)
- [Icons](#icons)
- [News Sources](#news-sources)
## Introduction
This tool gathers news from various Zambian πΏπ² sources, processes them, and presents them as a text-based news digest.
The project has two main components:
- **core** -- A Python application that handles:
- Gathering news from RSS feeds using [requests](https://pypi.org/project/requests/), [feedparser](https://pypi.org/project/feedparser/), and [beautifulsoup4](https://pypi.org/project/beautifulsoup4/).
- Processing the news articles using Large Language Models (LLMs).
- Generating structured data for the static website.
- **web** -- An [11ty](httpss://www.11ty.dev/) static site that presents the news digests.
## Project Evolution: From Podcast to News Digest
After 500 episodes, I decided to transition the Zed News project from generating audio podcast episodes to producing text-based news digests. The core value of providing consolidated Zambian news is still preserved.
The original podcast episodes have been archived, and the project now focuses on delivering fast, scannable news content.
## Development
- Clone or fork the project.
- `cd` into the project directory.
### Core
> **Note**
>
> You need to have `docker` and `docker-compose` on your machine.
- Install [Poetry](https://python-poetry.org/).
- Create a Python [virtual environment](https://realpython.com/python-virtual-environments-a-primer/).
- Install dependencies:
```bash
poetry install
```
- Set up environment variables:
```bash
# Copy the example .env file
cp -v .env.example .env
# Update the values in your new .env file
```
- Build and run the Docker containers:
```bash
inv up --build
```
- Access the `app` container's shell:
```bash
inv exec app bash
```
Inside the container, you can run the following commands:
- Run tests:
```bash
inv test
```
- Generate a new digest:
```bash
inv digest
```
See available [invoke](https://www.pyinvoke.org/) tasks with `invoke -l`.
The project uses [pgweb](https://github.com/sosedoff/pgweb) to visualize database changes. Access it at .
### Web
This project uses Node.js [v18](https://nodejs.org/en/blog/release/v18.0.0). We recommend using [fnm](https://github.com/Schniz/fnm) or [volta](https://volta.sh/) to manage Node.js versions.
- Install frontend dependencies:
```bash
npm install
```
- Start the local development server (accessible at ):
```bash
npm start
```
See other available scripts in `package.json`.
## Deployment
The project's final output is a **static site**, which can be hosted on any platform that supports static files, such as [Cloudflare Pages](https://pages.cloudflare.com/), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or [GitHub Pages](https://pages.github.com/).
> **Warning**
>
> Ensure that environment variables are updated accordingly for both the **core** application and the **web** build process.
For an automated, hands-off setup, follow these steps:
1. Set up a [nix-based](https://en.wikipedia.org/wiki/Unix-like) machine (e.g., a VPS or your laptop) with a Python virtual environment, `docker`, and `docker-compose`.
2. Configure a cron job to run the `cron.sh` script located in the project root. This script automates the generation and deployment process.
3. Ensure `git` is configured correctly on the machine, as the `cron.sh` script pushes the generated content to the repository, which in turn triggers the website's build and deployment pipeline.
> **Note**
>
> The `cron.sh` script uses [Apprise](https://github.com/caronc/apprise) to send notifications when a new digest is ready. You will need to configure the notification service (e.g., ntfy.sh) in your `.env` file.
## Contributing
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions, issues and feature requests are most welcome! A good place to start is by helping out with the unchecked items in the [TODO](#todo) section of this README!
Feel free to check the [issues page](https://github.com/engineervix/zed-news/issues) and take a look at the [contributing guide](https://github.com/engineervix/zed-news/blob/main/CONTRIBUTING.md) before you get started.
To maintain code quality and formatting consistency, we utilize pre-commit hooks. These hooks automatically check and format your code before each commit. This helps ensure that the codebase remains clean and consistent throughout the development process. Set up the Git pre-commit hooks by running the following
```bash
pre-commit install && pre-commit install --hook-type commit-msg
```
See `pre-commit-config.yaml` for more details. In addition, please note the following:
- if you're making code contributions, please try and write some tests to accompany your code, and ensure that the tests pass. Also, were necessary, update the docs so that they reflect your changes.
- your commit messages should follow the conventions described [here](https://www.conventionalcommits.org/en/v1.0.0/). Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug".
Once you are done, please create a [pull request](https://github.com/engineervix/zed-news/pulls).
## TODO
### Dev
- [ ] Improve test coverage
### Frontend (Web)
- [ ] Create a dynamic `og:image` for each digest.
- [ ] Keep things DRY. For example, the header and footer icons.
- [ ] Improve the mobile UI.
- [ ] Improve accessibility (a11y).
- [ ] Implement search functionality for the news digests.
### Features for future releases
- [ ] Add weather reports/forecasts
- [ ] Add exchange rates feature.
- [ ] Consider more sustainable AI integrations
- [ ] Add [Diamond TV](https://diamondtvzambia.com) as a news source.
## Credits
### Music
-
-
-
-
-
### Icons
-
-
### News Sources
- [ZNBC](https://znbc.co.zm/)
- [Zambia Daily Mail](http://www.daily-mail.co.zm/)
- [Times of Zambia](https://times.co.zm/)
- [News Diggers!](https://diggers.news/)
- [Muvi TV](https://www.muvitv.com/)
- [Mwebantu](https://www.mwebantu.com/)