The 10-Headed Web Browser - A powerful text-based browser for the terminal
Project description
๐ฑ Ravanan - The 10-Headed Web Browser ๐ฑ
( ) )
)\ ) ( ( ( /( ( ( /(
(()/( )\ ( ( )\ )\()) )\ )\())
/(_))((((_)( )\ )\((((_)( ((_)\((((_)( ((_)\
(_)) )\ _ )\ ((_)((_))\ _ )\ _((_))\ _ )\ _((_)
| _ \ (_)_\(_)\ \ / / (_)_\(_)| \| |(_)_\(_)| \| |
| / / _ \ \ V / / _ \ | .` | / _ \ | .` |
|_|_\ /_/ \_\ \_/ /_/ \_\ |_|\_|/_/ \_\ |_|\_|
The 10-Minded Scholar King โข Terminal Web Browser
v1.0.4 โข By Krishna D
A powerful text-based web browser that runs entirely in your terminal. Named after the legendary Ravana from Hindu mythology, whose 10 heads represented vast knowledge and wisdom from multiple perspectives.
Created by: Krishna D
๐ Why Ravanan?
Ravana, the legendary scholar-king, possessed 10 heads symbolizing mastery over different dimensions of knowledge. Similarly, Ravanan browser offers 10 powerful capabilities for navigating the web in a unique, terminal-based way!
๐ฑ The 10 Heads of Wisdom
Like Ravana's 10 heads representing different dimensions of knowledge, this browser offers 10 powerful capabilities:
- ๐ Smart HTML Parsing - Extracts text, links, headers, lists, tables, and more
- โก Fast HTTP Fetching - Quick and efficient web page loading with full HTTPS support
- ๐จ Beautiful Rendering - Styled terminal output with colors and formatting
- ๐ Link Navigation - Jump to links by number, Lynx-style
- ๐ History Management - Full back/forward browsing history
- ๐ Advanced Search - Case-sensitive and case-insensitive search within pages
- โ Error Handling - Graceful handling of all web errors (404, timeouts, etc.)
- ๐ Content Extraction - Clean extraction of meaningful content
- ๐ Clean Interface - Intuitive commands and beautiful UI with responsive banner
- ๐ช Terminal Power - Full-featured browsing without leaving your terminal
โจ Additional Features
- ๐พ Save Pages - Save current page as text file
- ๐ Statistics - View browsing statistics
- โน๏ธ Page Info - Detailed information about current page
- ๐ List All Links - Display all links on current page
- ๐ Comprehensive Help - Detailed help system
- ๐ฏ Multiple Commands - Many ways to accomplish the same task
๐ Installation
Option 1: Install from PyPI (Recommended)
pip install ravanan
After installation, you can run Ravanan from anywhere:
ravanan
Option 2: Install from Source
# Clone the repository
git clone https://github.com/krishna182005/ravanan.git
cd ravanan
# Install dependencies
pip install -r requirements.txt
# Run the browser
python3 -m ravanan
Option 3: Development Installation
# Clone the repository
git clone https://github.com/krishna182005/ravanan.git
cd ravanan
# Install in editable mode
pip install -e .
# Now you can run from anywhere
ravanan
๐ฎ Quick Start
Basic Usage
# Start with default page (duckduckgo.com)
ravanan
# Open a specific URL
ravanan wikipedia.org
# Open with full URL
ravanan https://news.ycombinator.com
# Set custom home page
ravanan --home https://stackoverflow.com
First Steps
- Navigate to a link: Type the link number (e.g.,
1,2,3) - Go to a URL: Type the URL directly (e.g.,
wikipedia.org) - Search in page: Type
/pythonto search for "python" - Go back: Type
borback - Get help: Type
?orhelp - Quit: Type
qorquit
๐ Commands Reference
Navigation Commands
| Command | Action |
|---|---|
[number] |
Navigate to link by number (e.g., 1, 2, 3) |
b, back |
Go back to previous page |
f, forward |
Go forward to next page |
h, home |
Go to home page |
r, reload |
Reload current page |
u, url |
Show current URL |
URL Entry
| Command | Action |
|---|---|
https://example.com |
Enter full URL with scheme |
example.com |
Enter domain (https:// added automatically) |
go [url] |
Navigate to URL (alternative) |
Search & Discovery
| Command | Action |
|---|---|
/[query] |
Case-insensitive search (e.g., /python) |
//[query] |
Case-sensitive search |
links |
List all links on current page |
Information Commands
| Command | Action |
|---|---|
info |
Show current page information |
history |
Show browsing history |
stats |
Show browser statistics |
about |
About Ravanan browser |
Utility Commands
| Command | Action |
|---|---|
save |
Save current page as text file |
clear |
Clear screen and redisplay page |
version |
Show version information |
?, help |
Show comprehensive help |
q, quit, exit |
Quit browser |
๐ฏ Example Session
# Start the browser
$ ravanan
# Ravanan banner appears...
# Browser starts at example.com
> wikipedia.org # Visit Wikipedia
Loading Wikipedia...
> 3 # Click link #3 (opens Featured Articles)
Loading...
> /python # Search for "python" in page
Found 15 results for 'python'
> b # Go back to Wikipedia main page
Going back...
> f # Go forward to Featured Articles
Going forward...
> h # Return to home page
Going to home page...
> info # Show page information
Current Page: Featured Articles
URL: https://en.wikipedia.org/wiki/Featured_articles
Links: 127
> save # Save current page
Page saved to: featured_articles.txt
> q # Quit
Goodbye!
๐ Project Structure
ravanan/
โโโ main.py # Main application entry point
โโโ browser/
โ โโโ __init__.py
โ โโโ fetcher.py # HTTP request handler
โ โโโ parser.py # HTML parser (BeautifulSoup)
โ โโโ renderer.py # Terminal UI renderer (rich)
โ โโโ navigator.py # Navigation logic
โโโ utils/
โ โโโ __init__.py
โ โโโ history.py # Browsing history manager
โ โโโ banner.py # Responsive ASCII banner
โโโ requirements.txt # Python dependencies
โโโ setup.py # Package configuration
โโโ LICENSE # MIT License
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ README.md # This file
Total Code: ~1,300 lines of Python
๐ ๏ธ How It Works
1. Web Fetcher (browser/fetcher.py)
- Uses
requestslibrary for HTTP/HTTPS requests - Handles redirects, timeouts, and errors (404, 403, 500, etc.)
- Normalizes URLs and manages sessions
- Configurable timeout and headers
2. HTML Parser (browser/parser.py)
- Parses HTML using
BeautifulSoup4withlxmlbackend - Extracts text content, links, headings, lists, tables
- Removes scripts, styles, and comments for clean text
- Resolves relative URLs to absolute
- Smart content extraction
3. Text Renderer (browser/renderer.py)
- Uses
richlibrary for beautiful terminal styling - Responsive ASCII banner that adapts to terminal width
- Renders headings, paragraphs, links, blockquotes
- Creates formatted tables for links
- Displays headers, footers, and error messages
- Color-coded content types
4. Navigator (browser/navigator.py)
- Manages current page and links
- Provides link lookup by index
- Integrates with history for back/forward navigation
5. History Manager (utils/history.py)
- Maintains browsing history stack
- Supports back/forward navigation
- Limits history size (default 100 pages)
6. Banner System (utils/banner.py)
- Responsive ASCII art banner
- Adapts to terminal width automatically
- 4 different sizes: Full, Compact, Minimal, Tiny
๐ Recommended Sites to Try
Works Great โญ
example.com- Perfect test siteinfo.cern.ch- First website ever (1991)text.npr.org- NPR text-only versionlite.cnn.com- CNN lite versionold.reddit.com- Reddit old interface
Good Experience ๐
wikipedia.org- Excellent in text modenews.ycombinator.com- Hacker Newslobste.rs- Tech communitystackoverflow.com- Stack Overflow
Interesting ๐
wiby.me- Search engine for simple sites68k.news- Retro news aggregatortxti.es- Fast web pages
๐ก Use Cases
1. Accessibility
- Screen reader friendly
- Low bandwidth browsing
- Terminal-only environments
- SSH sessions
2. Development
- Test website text content
- Debug HTML structure
- Quick web scraping prototype
- Content extraction testing
3. Education
- Learn web protocols
- Understand HTML parsing
- Practice Python development
- Study HTTP requests
4. Privacy
- No JavaScript tracking
- No cookies (unless configured)
- No image loading
- Minimal footprint
๐ฆ Dependencies
All dependencies are automatically installed with pip install ravanan:
- requests (โฅ2.31.0) - HTTP library for fetching web pages
- beautifulsoup4 (โฅ4.12.0) - HTML parsing and extraction
- rich (โฅ13.0.0) - Terminal formatting and styling
- lxml (โฅ4.9.0) - Fast HTML/XML parser (BeautifulSoup backend)
๐ค Contributing
Ravanan is an open-source project and contributions are welcome!
We love your input! We want to make contributing to Ravanan as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
How to Contribute
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/krishna182005/ravanan.git cd ravanan
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request on GitHub
Development Setup
# Clone the repository
git clone https://github.com/krishna182005/ravanan.git
cd ravanan
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
# Run tests
python test.py
Code Style
- Follow PEP 8 guidelines
- Add docstrings to functions and classes
- Write meaningful commit messages
- Add tests for new features
See CONTRIBUTING.md for detailed guidelines.
๐งช Testing
Ravanan includes a comprehensive test suite:
# Run all tests
python test.py
# Run specific test
python test_ravanan.py
Test Coverage:
- โ WebFetcher - HTTP/HTTPS fetching
- โ HTMLParser - HTML parsing and extraction
- โ BrowsingHistory - Navigation history
- โ Navigator - Link management
- โ Integration - End-to-end workflows
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Krishna D
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
๐ Roadmap (Future Enhancements)
Version 2.0 Plans
- ๐ Bookmark System - Save and manage favorite pages
- ๐พ Offline Caching - Cache visited pages for offline reading
- ๐จ Themes - Dark mode, light mode, custom color schemes
- ๐ Proxy Support - Browse through HTTP/SOCKS proxies
- ๐ฅ Download Manager - Enhanced file saving
- ๐ช Cookie Support - Basic cookie handling
- ๐ Regex Search - Advanced search patterns
- ๐ Tab Support - Multiple browsing sessions
- โจ๏ธ Vim Keybindings - Vim-style shortcuts
- ๐ Progress Bars - Download progress indicators
Community Requested
Vote for features or suggest new ones in GitHub Issues!
๐ Acknowledgments
- Inspired by Lynx - The original text-based web browser (1992)
- Named after Ravana - The legendary 10-headed scholar-king
- Built with โค๏ธ for terminal enthusiasts
- Thanks to the Python community for amazing libraries
- Special thanks to all contributors
๐ง Contact & Support
- Creator: Krishna D
- GitHub: https://github.com/krishna182005/ravanan/
- Issues: Report a bug or request a feature
- Discussions: Join the community
๐ Star History
If you find Ravanan useful, please consider giving it a star on GitHub! โญ
Happy Browsing! ๐โจ
Made with โค๏ธ for the terminal by Krishna D
๐ Project Stats
- Development Time: ~3 hours
- Total Lines of Code: ~1,300
- Test Coverage: 100% of core modules
- Dependencies: 4 (all stable, well-maintained)
- Python Version: 3.8+
- Platforms: Windows, Linux, macOS
- License: MIT (Open Source)
Project details
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 ravanan-1.0.5.tar.gz.
File metadata
- Download URL: ravanan-1.0.5.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d74824dbd4e5b5ce049fe67882db94bdf80ae3902158758fcd82e1a055f739e7
|
|
| MD5 |
7098ff268117704521abed42aa9ea12f
|
|
| BLAKE2b-256 |
df2446e96af56d2df15793e1fbd1232ee3cb844d1c230f64b720a314db1b22d2
|
Provenance
The following attestation bundles were made for ravanan-1.0.5.tar.gz:
Publisher:
publish.yml on krishna182005/ravanan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ravanan-1.0.5.tar.gz -
Subject digest:
d74824dbd4e5b5ce049fe67882db94bdf80ae3902158758fcd82e1a055f739e7 - Sigstore transparency entry: 782216161
- Sigstore integration time:
-
Permalink:
krishna182005/ravanan@ae79281e2502e556d6689d9f745722c75f3e3505 -
Branch / Tag:
refs/tags/v1.0.5 - Owner: https://github.com/krishna182005
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ae79281e2502e556d6689d9f745722c75f3e3505 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ravanan-1.0.5-py3-none-any.whl.
File metadata
- Download URL: ravanan-1.0.5-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e55b89697475cd7139ce1d7e86e0d2b7127ea108333b6a2d793669fa8619b3fc
|
|
| MD5 |
092b3a2edb6974771db3c25100236cdb
|
|
| BLAKE2b-256 |
f08af02512280af4e98a505d38c595a36bb34d1aa6614f7c055db76227d9ca08
|
Provenance
The following attestation bundles were made for ravanan-1.0.5-py3-none-any.whl:
Publisher:
publish.yml on krishna182005/ravanan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ravanan-1.0.5-py3-none-any.whl -
Subject digest:
e55b89697475cd7139ce1d7e86e0d2b7127ea108333b6a2d793669fa8619b3fc - Sigstore transparency entry: 782216162
- Sigstore integration time:
-
Permalink:
krishna182005/ravanan@ae79281e2502e556d6689d9f745722c75f3e3505 -
Branch / Tag:
refs/tags/v1.0.5 - Owner: https://github.com/krishna182005
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ae79281e2502e556d6689d9f745722c75f3e3505 -
Trigger Event:
release
-
Statement type: