Name | babbl JSON |
Version |
0.2.7
JSON |
| download |
home_page | None |
Summary | Turn markdown into beautiful research blog posts |
upload_time | 2025-07-11 19:54:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
markdown
blog
research
static-site
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# The Library of Babbl
Turn markdown into beautiful research blog posts.

## Features
- **Custom Markdown Renderer**: Built with Marko for extensible HTML formatting
- **Frontmatter Support**: YAML frontmatter in markdown files
- **Table Support**: Full markdown table rendering with custom styling
- **Beautiful Templates**: Clean, responsive HTML output with modern styling
- **Fully Customizable CSS**: Complete control over styling through CSS files
- **CLI Interface**: Easy-to-use command-line tools
- **Syntax Highlighting**: Code blocks with Pygments integration
## Installation
```bash
pip install babbl
```
## Quick Start
### Render a single markdown file:
```bash
babbl render example.md
```
### Build multiple files in a directory:
```bash
babbl build ./docs --output-dir ./public
```
### Render with custom CSS file:
```bash
babbl render example.md --css my-styles.css
```
## Usage
### Python API
```python
from babbl import HTMLRenderer, BabblParser
from pathlib import Path
# Initialize parser and renderer
parser = BabblParser()
renderer = HTMLRenderer()
# Render a markdown file
with open("example.md", "r") as f:
content = f.read()
document = parser.parse(content)
html = renderer.html(document, metadata={})
print(f"Generated HTML: {html}")
```
### Frontmatter Support
Babbl supports YAML frontmatter in markdown files:
```markdown
---
title: "My Research Paper"
author: "Dr. Jane Smith"
date: "2024-01-15"
description: "A groundbreaking study"
---
# Content here...
```
### Table Support
Babbl includes full support for markdown tables:
```markdown
| Component | Memory (MB) | Percentage |
|-----------|-------------|------------|
| Renderer Core | 2.1 | 50% |
| Frontmatter Processor | 0.9 | 22% |
| HTML Formatter | 1.2 | 28% |
```
Tables are automatically styled with clean, responsive CSS and support proper header formatting.
### CSS Customization
Babbl provides complete control over styling through CSS files:
**Customize your styles:**
```css
/* my-styles.css */
body {
font-family: "Georgia", serif;
background-color: #f5f5f5;
color: #333;
}
.heading-1 {
color: #2c3e50;
font-size: 2.5rem;
border-bottom: 2px solid #3498db;
}
.code-block {
background: #2c3e50;
color: #ecf0f1;
border-radius: 8px;
}
```
**Use your custom styles:**
```bash
babbl render example.md --css my-styles.css
```
The CSS system supports all standard CSS properties for:
- Body and section styling
- All heading levels (h1-h6)
- Paragraphs and text
- Code blocks and inline code
- Links and images
- Lists and blockquotes
- Emphasis (bold/italic)
- Responsive design
- Syntax highlighting
### Table of Contents
Babbl can automatically generate a table of contents for documents with h1 headings:
```bash
# Generate HTML with table of contents
babbl render example.md --toc
```
The table of contents:
- Appears as a sidebar on the left side of the content
- Lists all h1 headings with clickable links
- Is responsive and collapses on mobile devices
- Uses clean, modern styling that matches the document theme
- Provides smooth scrolling to section anchors
**Python API usage:**
```python
from babbl import HTMLRenderer, BabblParser
parser = BabblParser()
renderer = HTMLRenderer(show_toc=True) # Enable table of contents
document = parser.parse(content)
html = renderer.html(document, metadata={})
```
## CLI Commands
### `babbl render <file>`
Render a single markdown file to HTML.
Options:
- `--output, -o`: Specify output file path
- `--css`: Path to CSS file
- `--toc`: Generate table of contents for h1 headings
### `babbl build <directory>`
Build multiple markdown files in a directory.
Options:
- `--output-dir, -o`: Output directory
- `--pattern`: File pattern to match (default: `*.md`)
- `--recursive, -r`: Process subdirectories
- `--css`: Path to CSS file
- `--toc`: Generate table of contents for h1 headings
## Supported Markdown Features
- **Headings**: `# ## ###` etc.
- **Code blocks**: ```python with syntax highlighting
- **Inline code**: `code`
- **Links**: `[text](url)`
- **Images**: ``
- **Lists**: Ordered and unordered
- **Blockquotes**: `> quote`
- **Emphasis**: **bold** and *italic*
- **Tables**: Full markdown table support
- **Paragraphs**: Automatic wrapping
## License
MIT License
Raw data
{
"_id": null,
"home_page": null,
"name": "babbl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "markdown, blog, research, static-site",
"author": null,
"author_email": "Michael Lutz <michael@example.com>",
"download_url": "https://files.pythonhosted.org/packages/c8/dc/c29bbddc2f2a13f1a22c150b7c21884c60e6a07afb8b967986fc673230aa/babbl-0.2.7.tar.gz",
"platform": null,
"description": "# The Library of Babbl\n\nTurn markdown into beautiful research blog posts.\n\n\n\n## Features\n\n- **Custom Markdown Renderer**: Built with Marko for extensible HTML formatting\n- **Frontmatter Support**: YAML frontmatter in markdown files\n- **Table Support**: Full markdown table rendering with custom styling\n- **Beautiful Templates**: Clean, responsive HTML output with modern styling\n- **Fully Customizable CSS**: Complete control over styling through CSS files\n- **CLI Interface**: Easy-to-use command-line tools\n- **Syntax Highlighting**: Code blocks with Pygments integration\n\n## Installation\n\n```bash\npip install babbl\n```\n\n## Quick Start\n\n### Render a single markdown file:\n\n```bash\nbabbl render example.md\n```\n\n### Build multiple files in a directory:\n\n```bash\nbabbl build ./docs --output-dir ./public\n```\n\n### Render with custom CSS file:\n\n```bash\nbabbl render example.md --css my-styles.css\n```\n\n## Usage\n\n### Python API\n\n```python\nfrom babbl import HTMLRenderer, BabblParser\nfrom pathlib import Path\n\n# Initialize parser and renderer\nparser = BabblParser()\nrenderer = HTMLRenderer()\n\n# Render a markdown file\nwith open(\"example.md\", \"r\") as f:\n content = f.read()\ndocument = parser.parse(content)\nhtml = renderer.html(document, metadata={})\nprint(f\"Generated HTML: {html}\")\n```\n\n### Frontmatter Support\n\nBabbl supports YAML frontmatter in markdown files:\n\n```markdown\n---\ntitle: \"My Research Paper\"\nauthor: \"Dr. Jane Smith\"\ndate: \"2024-01-15\"\ndescription: \"A groundbreaking study\"\n---\n\n# Content here...\n```\n\n### Table Support\n\nBabbl includes full support for markdown tables:\n\n```markdown\n| Component | Memory (MB) | Percentage |\n|-----------|-------------|------------|\n| Renderer Core | 2.1 | 50% |\n| Frontmatter Processor | 0.9 | 22% |\n| HTML Formatter | 1.2 | 28% |\n```\n\nTables are automatically styled with clean, responsive CSS and support proper header formatting.\n\n### CSS Customization\n\nBabbl provides complete control over styling through CSS files:\n\n**Customize your styles:**\n```css\n/* my-styles.css */\nbody {\n font-family: \"Georgia\", serif;\n background-color: #f5f5f5;\n color: #333;\n}\n\n.heading-1 {\n color: #2c3e50;\n font-size: 2.5rem;\n border-bottom: 2px solid #3498db;\n}\n\n.code-block {\n background: #2c3e50;\n color: #ecf0f1;\n border-radius: 8px;\n}\n```\n\n**Use your custom styles:**\n```bash\nbabbl render example.md --css my-styles.css\n```\n\nThe CSS system supports all standard CSS properties for:\n- Body and section styling\n- All heading levels (h1-h6)\n- Paragraphs and text\n- Code blocks and inline code\n- Links and images\n- Lists and blockquotes\n- Emphasis (bold/italic)\n- Responsive design\n- Syntax highlighting\n\n### Table of Contents\n\nBabbl can automatically generate a table of contents for documents with h1 headings:\n\n```bash\n# Generate HTML with table of contents\nbabbl render example.md --toc\n```\n\nThe table of contents:\n- Appears as a sidebar on the left side of the content\n- Lists all h1 headings with clickable links\n- Is responsive and collapses on mobile devices\n- Uses clean, modern styling that matches the document theme\n- Provides smooth scrolling to section anchors\n\n**Python API usage:**\n```python\nfrom babbl import HTMLRenderer, BabblParser\n\nparser = BabblParser()\nrenderer = HTMLRenderer(show_toc=True) # Enable table of contents\n\ndocument = parser.parse(content)\nhtml = renderer.html(document, metadata={})\n```\n\n## CLI Commands\n\n### `babbl render <file>`\nRender a single markdown file to HTML.\n\nOptions:\n- `--output, -o`: Specify output file path\n- `--css`: Path to CSS file\n- `--toc`: Generate table of contents for h1 headings\n\n### `babbl build <directory>`\nBuild multiple markdown files in a directory.\n\nOptions:\n- `--output-dir, -o`: Output directory\n- `--pattern`: File pattern to match (default: `*.md`)\n- `--recursive, -r`: Process subdirectories\n- `--css`: Path to CSS file\n- `--toc`: Generate table of contents for h1 headings\n\n## Supported Markdown Features\n\n- **Headings**: `# ## ###` etc.\n- **Code blocks**: ```python with syntax highlighting\n- **Inline code**: `code`\n- **Links**: `[text](url)`\n- **Images**: ``\n- **Lists**: Ordered and unordered\n- **Blockquotes**: `> quote`\n- **Emphasis**: **bold** and *italic*\n- **Tables**: Full markdown table support\n- **Paragraphs**: Automatic wrapping\n\n## License\n\nMIT License\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Turn markdown into beautiful research blog posts",
"version": "0.2.7",
"project_urls": null,
"split_keywords": [
"markdown",
" blog",
" research",
" static-site"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e8cc1ee87fc52132b926fe8922e749d3b1d0b51185fac1e0a9205b4c1ac64ce3",
"md5": "a08efb21373262fd018bdd0608a2632b",
"sha256": "c8bda118b5f86e33b7a14e538890082628d418df0bd9f574518b76451fd7eb1f"
},
"downloads": -1,
"filename": "babbl-0.2.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a08efb21373262fd018bdd0608a2632b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 21203,
"upload_time": "2025-07-11T19:54:27",
"upload_time_iso_8601": "2025-07-11T19:54:27.506045Z",
"url": "https://files.pythonhosted.org/packages/e8/cc/1ee87fc52132b926fe8922e749d3b1d0b51185fac1e0a9205b4c1ac64ce3/babbl-0.2.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c8dcc29bbddc2f2a13f1a22c150b7c21884c60e6a07afb8b967986fc673230aa",
"md5": "0166f381b6de5e2bc85b0e1184a2343b",
"sha256": "8761ad32f3aec497bc94d019a55645d4d17d7b682dfec99c01e206681cb4ff77"
},
"downloads": -1,
"filename": "babbl-0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "0166f381b6de5e2bc85b0e1184a2343b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20886,
"upload_time": "2025-07-11T19:54:30",
"upload_time_iso_8601": "2025-07-11T19:54:30.638149Z",
"url": "https://files.pythonhosted.org/packages/c8/dc/c29bbddc2f2a13f1a22c150b7c21884c60e6a07afb8b967986fc673230aa/babbl-0.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 19:54:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "babbl"
}