Scripts Directory
This directory contains utility scripts for managing the Literary Vault repository.
Available Scripts
1. Changelog Management (cl)
A streamlined tool for maintaining the project's CHANGELOG.md file with automatic semantic versioning.
Quick Usage
Change Types
Short codes are supported for convenience:
a
oradded
- Addedc
orchanged
- Changedd
ordep
- Deprecatedr
orremoved
- Removedf
orfixed
- Fixeds
orsec
- Security
Version Bump Options
major
- Breaking changes (1.0.0)minor
- New features (0.1.0)patch
- Bug fixes (0.0.1) [default]
Examples
2. Changelog Update Script (update_changelog.py)
Python script for programmatic changelog management with API integration.
Features:
JSON schema validation
API integration for automated updates
Semantic versioning support
Markdown formatting
Git integration
3. API Integration Scripts
Questions API (questions_api.py)
REST API for managing and serving questions from various categories:
Astronomy
Literature
Mathematics
General Knowledge
Features:
Question retrieval by category
Random question selection
Customizable result limits
Input validation
Error handling
OpenAPI documentation
Changelog API (changelog_api.py)
API for programmatic changelog management:
Add changelog entries
Create releases
Query changelog history
Validate entry formats
Requirements
Python 3.x
FastAPI (for API servers)
Pydantic (for data validation)
uvicorn (ASGI server)
Additional requirements in requirements.txt
Installation
Install Python dependencies:
Scripts are automatically executable from the scripts directory:
Start API servers:
Features
Automatic semantic versioning
JSON schema validation
API integration
Markdown formatting
Git integration
Error handling
Documentation generation
Type safety
Caching support
Development
Follow PEP 8 style guide
Add type hints
Update tests when adding features
Document new functionality
Validate against schemas
Handle errors appropriately
Documentation
API documentation available at:
Questions API: http://localhost:8000/docs
Changelog API: http://localhost:8001/docs
JSON schemas in docs/openai-functions/
Integration guides in docs/Integration/
Last updated