WordPress-style content management with block-based pages, stored as JSON files on disk instead of MySQL.

0 downloads

dbbasic-content/STATUS.md
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-content.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-content.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-content.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Release v0.2.0 - Pages support 25b7e5e 1 year, 1 month ago History
STATUS.md · 3.9 KB · 141 lines

dbbasic-content - Project Status

✅ Completed

Core Library

  • ContentDB - WordPress-like API for managing content
  • get_post() - Retrieve single post by slug
  • get_posts() - Query posts with filtering (status, categories, tags, author)
  • create_post() - Create new posts
  • update_post() - Update existing posts
  • delete_post() - Delete posts
  • search() - Full-text search across content
  • get_categories(), get_tags(), get_authors() - Metadata queries

Block System

  • Block types - 8 standard block types:
  • paragraph, heading, list, card, card_list
  • code, image, quote
  • Validation - Schema-based validation for all block types
  • Extensible - Custom block types supported

WordPress Importer

  • HTML to Blocks - Converts WordPress HTML content to structured blocks
  • Database Import - Full WordPress database import support
  • Posts, pages, drafts
  • Categories and tags
  • Post metadata
  • Context manager - Clean resource handling

CLI Tools

Commands implemented:

  • dbcontent init - Initialize content directory
  • dbcontent list - List all posts
  • dbcontent show - Show post details
  • dbcontent validate - Validate content structure
  • dbcontent import wordpress - Import from WordPress
  • dbcontent categories - List categories
  • dbcontent tags - List tags
  • dbcontent search - Search posts

Tests

  • 63 tests - All passing
  • 100% core coverage - ContentDB, blocks, importer
  • Unit tests - Fast, no external dependencies
  • Integration ready - Structure for WordPress DB tests

Documentation

  • README.md - Full documentation with philosophy
  • QUICKSTART.md - 5-minute getting started guide
  • Examples - 3 complete usage examples
  • Basic usage
  • Flask integration
  • WordPress migration
  • Inline docs - All classes and methods documented

Package

  • setup.py - Proper Python package structure
  • requirements.txt - Dependencies specified
  • LICENSE - MIT license
  • pytest.ini - Test configuration
  • .gitignore - Clean repository

Test Results

======================== 63 passed in 0.19s =========================

All tests passing!

Unix Foundation Principles

✅ Files over database - JSON files, not MySQL ✅ Grep-able - Use standard Unix tools ✅ Version control friendly - Git-friendly format ✅ FTP-deployable - rsync/FTP like 1995 ✅ No daemon - Zero background processes ✅ Composable - Works with Unix tools

What It Replaces

  • WordPress (500K lines of PHP) → ~500 lines of Python
  • MySQL database → JSON files on disk
  • wp-admin interface → CLI tools + simple API
  • Complex hosting → Any server with Python
  • $150K-400K/year hosting → $5-50/month

Integration Points

Ready to integrate with:

  • dbbasic-tsv - TSV storage (optional metadata)
  • dbbasic-passwd - User management (when complete)
  • Flask/Django - Web frameworks
  • Static site generators - Export to Hugo/Jekyll
  • Git - Version control workflow

Performance

  • Fast - No database queries, just file reads
  • Scalable - Filesystem caching handles load
  • Simple - No complex queries to optimize
  • Debuggable - cat/grep/awk for troubleshooting

Next Steps (Optional)

Potential enhancements:

  • [ ] TSV metadata index for faster queries
  • [ ] Media management (images, files)
  • [ ] Comment system (TSV-based)
  • [ ] RSS/Atom feed generation
  • [ ] Sitemap generation
  • [ ] Static site export
  • [ ] Admin web interface
  • [ ] Revision history

Usage

# Install
pip install -e .

# Test
pytest

# Use
python -c "from dbbasic_content import ContentDB; print('Ready!')"

Philosophy

"Start at 90% complete, not 0%"

Built on Unix foundations. No database daemon. No complexity.

WordPress promised simplicity. This delivers it.


Status: Ready for production use Version: 0.1.0 Date: 2025-09-30