Babbl
A modern markdown-to-HTML converter designed for research blog posts with support for tables, code references, and beautiful styling.
Features
- Clean HTML Output: Semantic HTML with responsive CSS styling
- Table Support: Full markdown table rendering with clean styling
- Code References: Include code snippets from files using simple syntax
- Syntax Highlighting: Pygments integration for code blocks
- Table of Contents: Auto-generated TOC for document navigation
- Frontmatter Support: YAML metadata in markdown files
- Extensible: Built with Marko parser for easy customization
Installation
pip install babbl
Quick Start
Render a single file
babbl render document.md
Build multiple files
babbl build ./docs --output-dir ./public
With custom styling
babbl render document.md --css custom.css --toc
Usage
Python API
from babbl import BabblParser, HTMLRenderer
parser = BabblParser()
renderer = HTMLRenderer()
with open("document.md", "r") as f:
content = f.read()
document = parser.parse(content)
html = renderer.html(document, metadata={})
Code References
Reference code from files using simple syntax:
#function_name
[Description](path/to/file.py#function_name)
[Line 15](path/to/file.py#L15)
[Lines 10-20](path/to/file.py#L10-L20)
Tables
Standard markdown table syntax:
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Frontmatter
YAML metadata at the beginning of files:
---
title: "My Document"
author: "Author Name"
date: "2024-01-01"
---
# Content starts here
CLI Commands
babbl render
Render a single markdown file to HTML.
Options:
--output, -o: Output file path--css: Custom CSS file--toc: Generate table of contents--base-path: Base path for code references
babbl build
Build multiple markdown files in a directory.
Options:
--output-dir, -o: Output directory--pattern: File pattern (default:*.md)--recursive, -r: Process subdirectories--css: Custom CSS file--toc: Generate table of contents--base-path: Base path for code references
License
MIT License
Metadata
Release files for babbl 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| babbl-0.2.9.tar.gz | 18.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| babbl-0.2.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.4 kB
Release files / babbl-0.2.9.tar.gz
| Download URL | babbl-0.2.9.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dad680b0248301822635dfc6cbdd6c88f7a9091e3daa09927d13854634dedd4
|
|
BLAKE2b-256 checksum How to use checksums |
ff71680afe3565833eaa9cd86550f053b78427090831c59713a3d86fede9769f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / babbl-0.2.9-py3-none-any.whl
| Download URL | babbl-0.2.9-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a80b54d9751a7ad666c4a568f201d2efb20d35ba9037d54f8c97f7bb5c00f6f
|
|
BLAKE2b-256 checksum How to use checksums |
6f8de1fb5288c647c16c872dafcc68ba86ac67e767d3b5c8723ada4eb42ad427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for babbl 0.2.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.