Extract Wikipedia articles and convert them to TTS-friendly text and audio
Project description
wikibee
Extract Wikipedia articles and convert them to TTS-friendly text and audio. Search by URL or keywords, get clean markdown and audio-optimized output.
What is wikibee?
wikibee transforms Wikipedia articles into clean, accessible content perfect for:
- Accessibility: Convert text to speech for visually impaired users
- Podcast creation: Research and content preparation
- Educational materials: Clean text for study guides
- Offline reading: Save articles in markdown format
- Audio content: Generate TTS-ready text and audio files
Quick Start
Install wikibee and create your first audio file in under 30 seconds:
# Install (recommended method)
pipx install wikibee
# Search and convert an article
wikibee "Albert Einstein" --tts --output my-audio/
# Or use a direct URL
wikibee "https://en.wikipedia.org/wiki/Artificial_intelligence" --tts
That's it! You now have clean markdown and TTS-optimized text files ready for audio conversion.
Installation
Option 1: pipx (Recommended)
pipx install wikibee
Option 2: pip
pip install wikibee
Option 3: Standalone Binaries
Windows/Linux: Download from releases
macOS: Use pipx installation (binaries not provided for macOS)
System Requirements
- Python 3.8 or higher
- Internet connection for Wikipedia access
- Optional: TTS server for audio generation
Basic Usage
Search by Keywords
# Simple search with fuzzy matching
wikibee "war of the roses"
# Auto-select first result (no interactive menu)
wikibee "napoleon bonaparte" --yolo
# Save to specific directory
wikibee "quantum computing" --output research/
Use Direct URLs
# Process specific Wikipedia page
wikibee "https://en.wikipedia.org/wiki/Machine_learning"
# Get only the introduction section
wikibee "https://en.wikipedia.org/wiki/Python" --lead-only
Generate Audio-Ready Content
# Create TTS-optimized text
wikibee "Ancient Rome" --tts
# Customize heading format for TTS
wikibee "World War II" --tts --heading-prefix "Section:"
# Specify output filename
wikibee "Mozart" --tts --output music/ --filename mozart_biography
Common Use Cases
For Accessibility
# Create clean, readable text files
wikibee "Marie Curie" --tts --output biographies/
# Output: marie_curie.md and marie_curie.txt (TTS-ready)
For Podcast Research
# Quick research with minimal processing
wikibee "blockchain technology" --lead-only --output research/
For Educational Content
# Batch process multiple topics
wikibee "photosynthesis" --tts --output biology/
wikibee "mitosis" --tts --output biology/
wikibee "evolution" --tts --output biology/
Key Features
- Smart Search: Fuzzy matching handles typos and partial queries
- Interactive Selection: Choose from multiple search results with a numbered menu
- Clean Output: Removes Wikipedia markup, leaving clean markdown
- TTS Optimization: Strips formatting markers that confuse text-to-speech engines
- Flexible Output: Save to custom directories with custom filenames
- Error Handling: Graceful handling of network issues and missing pages
- Cross-Platform: Works on Windows, macOS, and Linux
Documentation
- Quick Start Guide - Get up and running in 5 minutes
- Complete Tutorial - Comprehensive usage guide
- CLI Reference - All commands and options
- API Reference - Python API documentation
- Troubleshooting - Common issues and solutions
Development
wikibee is built with modern Python practices:
# Set up development environment
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[dev]"
# Run tests
pytest -q
# Check code style
ruff check .
See CONTRIBUTING.md for detailed development guidelines.
Examples and Scripts
The scripts/ directory contains working examples:
smoke_extract.py- Basic extraction example- See
docs/guides/examples.mdfor more real-world scenarios
Getting Help
- Documentation: Check the
docs/directory for comprehensive guides - Issues: Report bugs or request features
- Discussions: Ask questions in GitHub discussions
License
MIT License - see LICENSE for details.
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines on:
- Setting up your development environment
- Code style and testing requirements
- Submitting pull requests
- Reporting bugs and requesting features
Made with care for the Wikipedia community and accessibility advocates everywhere.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wikibee-0.1.1.tar.gz.
File metadata
- Download URL: wikibee-0.1.1.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42bf87dd2a9bec9e7fe98378172fbacec15a7a1ef77c94fc2390e71054711432
|
|
| MD5 |
88eb0b2124b0d3886255b269a45666f0
|
|
| BLAKE2b-256 |
f39bf2399b07a7a66f7cd11ed8d2246bc204da7bb3cd66cf02b8f666aee87891
|
File details
Details for the file wikibee-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wikibee-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04ea6cb095655552381c64b8b9c72f49f2426d136d5480496c41e096071235b6
|
|
| MD5 |
9180c473396be90741b1ed454af4a501
|
|
| BLAKE2b-256 |
33bc309196d2dac9dfbcf07100de40718e7d1d397a8d58e26156d81e04f565bd
|