A beautiful, feature-rich terminal-based blog management system built with Python and Rich.
- ✨ Beautiful GUI Interface - Rich terminal UI with colors, tables, and interactive menus
- 📝 Create & Edit Posts - Easy post creation with tags and metadata
- 🔍 Search & Filter - Search posts by title, content, or tags
- 📊 Statistics Dashboard - View blog analytics and insights
- 📤 Export Options - Export posts as Markdown, HTML, or JSON
- 🏷️ Tag Management - Organize posts with tags
- 📱 Cross-platform - Works on Windows, macOS, and Linux
- Python 3.7+ installed
- Windows PowerShell or Command Prompt
- Clone or download this repository
- Install dependencies (automatic on first run):
py -m pip install click rich
Use the batch file for easy access:
# Launch GUI interface
.\blog.bat gui
# Create a new post
.\blog.bat create
# List all posts
.\blog.bat list
# View a specific post
.\blog.bat view [post-id]
# Search posts
.\blog.bat search [term]
# Show statistics
.\blog.bat stats
# Export posts
.\blog.bat export --format markdown# Launch GUI interface
py main.py gui
# Create a new post
py main.py create --title "My Post" --content "Content here" --tags "tag1,tag2"
# List all posts
py main.py list
# View a specific post
py main.py view [post-id]
# Search posts
py main.py search [term]
# Show statistics
py main.py stats
# Export posts
py main.py export --format markdown| Command | Description |
|---|---|
gui |
Launch interactive GUI interface |
create |
Create a new blog post |
list |
List all blog posts |
view [post-id] |
View a specific blog post |
search [term] |
Search blog posts |
edit [post-id] |
Edit an existing blog post |
delete [post-id] |
Delete a blog post |
stats |
Show blog statistics |
export |
Export all posts to files |
BlogPostTerminal/
├── main.py # Main CLI application
├── blog_manager.py # Core business logic
├── models.py # Data models
├── storage.py # JSON storage layer
├── utils.py # Utility functions
├── blog.bat # Windows batch wrapper
├── blog.sh # Linux/macOS shell wrapper
├── blog_data/ # Blog posts storage
│ ├── index.json # Posts index
│ └── posts/ # Individual post files
├── blog_export/ # Exported posts
└── templates/ # Export templates
- Beautiful terminal-based interface with colors and formatting
- Interactive menu system
- Real-time post previews
- Sidebar with post overview
- Create posts with title, content, author, and tags
- Edit existing posts
- Delete posts with confirmation
- Automatic post ID generation
- Search by title, content, or tags
- Filter posts by author or tags
- Real-time search results
- Total posts count
- Most active authors
- Popular tags
- Average post length
- Reading time estimates
- Markdown: Perfect for static site generators
- HTML: Ready-to-view web pages
- JSON: For API integration
Posts are stored as JSON files in the blog_data/ directory:
blog_data/index.json- Posts index with metadatablog_data/posts/- Individual post files
- Python not found: Make sure Python is installed and
pycommand works - Dependencies missing: Run
py -m pip install click rich - Editor not available: Use
--contentoption to provide content directly
# Check Python version
py --version
# Install dependencies manually
py -m pip install click rich
# Run with verbose output
py main.py --help.\blog.bat create
# Follow the prompts to enter title, content, tags, and author.\blog.bat search python
# Find all posts containing "python" in title, content, or tags.\blog.bat export --format markdown --output-dir ./my-blog
# Export all posts as markdown filesFeel free to submit issues and enhancement requests!
This project is open source and available under the MIT License.