( ) )
)\ ) ( ( ( /( ( ( /(
(()/( )\ ( ( )\ )\()) )\ )\())
/(_))((((_)( )\ )\((((_)( ((_)\((((_)( ((_)\
(_)) )\ _ )\ ((_)((_))\ _ )\ _((_))\ _ )\ _((_)
| _ \ (_)_\(_)\ \ / / (_)_\(_)| \| |(_)_\(_)| \| |
| / / _ \ \ V / / _ \ | .` | / _ \ | .` |
|_|_\ /_/ \_\ \_/ /_/ \_\ |_|\_|/_/ \_\ |_|\_|
The 10-Minded Scholar King • Terminal Web Browser
v1.0.5 • 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
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!
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
- 💾 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
pip install ravananAfter installation, you can run Ravanan from anywhere:
ravanan# 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# 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# 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- 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
| 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 |
| Command | Action |
|---|---|
https://example.com |
Enter full URL with scheme |
example.com |
Enter domain (https:// added automatically) |
go [url] |
Navigate to URL (alternative) |
| Command | Action |
|---|---|
/[query] |
Case-insensitive search (e.g., /python) |
//[query] |
Case-sensitive search |
links |
List all links on current page |
| Command | Action |
|---|---|
info |
Show current page information |
history |
Show browsing history |
stats |
Show browser statistics |
about |
About Ravanan browser |
| 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 |
# 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!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
- Uses
requestslibrary for HTTP/HTTPS requests - Handles redirects, timeouts, and errors (404, 403, 500, etc.)
- Normalizes URLs and manages sessions
- Configurable timeout and headers
- 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
- 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
- Manages current page and links
- Provides link lookup by index
- Integrates with history for back/forward navigation
- Maintains browsing history stack
- Supports back/forward navigation
- Limits history size (default 100 pages)
- Responsive ASCII art banner
- Adapts to terminal width automatically
- 4 different sizes: Full, Compact, Minimal, Tiny
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
wikipedia.org- Excellent in text modenews.ycombinator.com- Hacker Newslobste.rs- Tech communitystackoverflow.com- Stack Overflow
wiby.me- Search engine for simple sites68k.news- Retro news aggregatortxti.es- Fast web pages
- Screen reader friendly
- Low bandwidth browsing
- Terminal-only environments
- SSH sessions
- Test website text content
- Debug HTML structure
- Quick web scraping prototype
- Content extraction testing
- Learn web protocols
- Understand HTML parsing
- Practice Python development
- Study HTTP requests
- No JavaScript tracking
- No cookies (unless configured)
- No image loading
- Minimal footprint
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)
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
- 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
# 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- 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.
Ravanan includes a comprehensive test suite:
# Run all tests
python test.py
# Run specific test
python test_ravanan.pyTest Coverage:
- ✅ WebFetcher - HTTP/HTTPS fetching
- ✅ HTMLParser - HTML parsing and extraction
- ✅ BrowsingHistory - Navigation history
- ✅ Navigator - Link management
- ✅ Integration - End-to-end workflows
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.
- 📚 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
Vote for features or suggest new ones in GitHub Issues!
- 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
- Creator: Krishna D
- GitHub: https://github.com/krishna182005/ravanan/
- Issues: Report a bug or request a feature
- Discussions: Join the community
If you find Ravanan useful, please consider giving it a star on GitHub! ⭐
Happy Browsing! 🌐✨
Made with ❤️ for the terminal by Krishna D
- 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)