Downloads Kenyan government circulars (PDF/DOC/DOCX) into Google Drive with JSONL index
# Kenya Govt Circulars Harvester (2013–2026)
Downloads Kenyan government circular-like documents (PDF/DOC/DOCX) into your **local Google Drive sync** folder and maintains a searchable JSONL index.
## Setup
```bash
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
```
Copy the example config and edit:
```bash
cp config.example.yaml config.yaml
```
Edit `config.yaml`:
- `drive_root` → your local Google Drive root (e.g. `~/Library/CloudStorage/GoogleDrive-xxx/My Drive`)
- `dest_folder` → folder name inside Drive (e.g. `Govt circulars 2013-2026`)
## Run harvester
```bash
python circular_harvester.py
```
Outputs (inside your Drive folder):
- `downloads/ /...`
- `index/circulars_kenya_2013_2026.jsonl`
## Rename using PDF text
Extract metadata from PDF first page and rename files to `YYYY-MM-DD__ISSUER__REFNO__TITLE_SLUG.pdf`:
```bash
python rename_from_pdf_text.py \
--index_in "/path/to/drive_root/dest_folder/index/circulars_kenya_2013_2026.jsonl" \
--index_out "/path/to/drive_root/dest_folder/index/circulars_kenya_2013_2026__renamed.jsonl"
```
Writes a new JSONL with updated paths and metadata.
## Monthly runs
This project can be assigned to an agent for **monthly runs**. See AGENTS.md for instructions.