babbl


Namebabbl JSON
Version 0.2.9 PyPI version JSON
download
home_pageNone
SummaryTurn markdown into beautiful research blog posts
upload_time2025-07-17 16:53:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords markdown blog research static-site
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pip install babbl
```

## Quick Start

### Render a single file
```bash
babbl render document.md
```

### Build multiple files
```bash
babbl build ./docs --output-dir ./public
```

### With custom styling
```bash
babbl render document.md --css custom.css --toc
```

## Usage

### Python API

```python
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:

```markdown
#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:

```markdown
| 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:

```markdown
---
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

            

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/ff/71/680afe3565833eaa9cd86550f053b78427090831c59713a3d86fede9769f/babbl-0.2.9.tar.gz",
    "platform": null,
    "description": "# Babbl\n\nA modern markdown-to-HTML converter designed for research blog posts with support for tables, code references, and beautiful styling.\n\n## Features\n\n- **Clean HTML Output**: Semantic HTML with responsive CSS styling\n- **Table Support**: Full markdown table rendering with clean styling\n- **Code References**: Include code snippets from files using simple syntax\n- **Syntax Highlighting**: Pygments integration for code blocks\n- **Table of Contents**: Auto-generated TOC for document navigation\n- **Frontmatter Support**: YAML metadata in markdown files\n- **Extensible**: Built with Marko parser for easy customization\n\n## Installation\n\n```bash\npip install babbl\n```\n\n## Quick Start\n\n### Render a single file\n```bash\nbabbl render document.md\n```\n\n### Build multiple files\n```bash\nbabbl build ./docs --output-dir ./public\n```\n\n### With custom styling\n```bash\nbabbl render document.md --css custom.css --toc\n```\n\n## Usage\n\n### Python API\n\n```python\nfrom babbl import BabblParser, HTMLRenderer\n\nparser = BabblParser()\nrenderer = HTMLRenderer()\n\nwith open(\"document.md\", \"r\") as f:\n    content = f.read()\n\ndocument = parser.parse(content)\nhtml = renderer.html(document, metadata={})\n```\n\n### Code References\n\nReference code from files using simple syntax:\n\n```markdown\n#function_name\n[Description](path/to/file.py#function_name)\n[Line 15](path/to/file.py#L15)\n[Lines 10-20](path/to/file.py#L10-L20)\n```\n\n### Tables\n\nStandard markdown table syntax:\n\n```markdown\n| Header 1 | Header 2 | Header 3 |\n|----------|----------|----------|\n| Cell 1   | Cell 2   | Cell 3   |\n| Cell 4   | Cell 5   | Cell 6   |\n```\n\n### Frontmatter\n\nYAML metadata at the beginning of files:\n\n```markdown\n---\ntitle: \"My Document\"\nauthor: \"Author Name\"\ndate: \"2024-01-01\"\n---\n\n# Content starts here\n```\n\n## CLI Commands\n\n### `babbl render`\nRender a single markdown file to HTML.\n\n**Options:**\n- `--output, -o`: Output file path\n- `--css`: Custom CSS file\n- `--toc`: Generate table of contents\n- `--base-path`: Base path for code references\n\n### `babbl build`\nBuild multiple markdown files in a directory.\n\n**Options:**\n- `--output-dir, -o`: Output directory\n- `--pattern`: File pattern (default: `*.md`)\n- `--recursive, -r`: Process subdirectories\n- `--css`: Custom CSS file\n- `--toc`: Generate table of contents\n- `--base-path`: Base path for code references\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Turn markdown into beautiful research blog posts",
    "version": "0.2.9",
    "project_urls": null,
    "split_keywords": [
        "markdown",
        " blog",
        " research",
        " static-site"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6f8de1fb5288c647c16c872dafcc68ba86ac67e767d3b5c8723ada4eb42ad427",
                "md5": "98c7445233637a19ab8f34261c8ede10",
                "sha256": "4a80b54d9751a7ad666c4a568f201d2efb20d35ba9037d54f8c97f7bb5c00f6f"
            },
            "downloads": -1,
            "filename": "babbl-0.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "98c7445233637a19ab8f34261c8ede10",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18971,
            "upload_time": "2025-07-17T16:53:17",
            "upload_time_iso_8601": "2025-07-17T16:53:17.272585Z",
            "url": "https://files.pythonhosted.org/packages/6f/8d/e1fb5288c647c16c872dafcc68ba86ac67e767d3b5c8723ada4eb42ad427/babbl-0.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ff71680afe3565833eaa9cd86550f053b78427090831c59713a3d86fede9769f",
                "md5": "444bd455eee04d53d0366986cd630fac",
                "sha256": "5dad680b0248301822635dfc6cbdd6c88f7a9091e3daa09927d13854634dedd4"
            },
            "downloads": -1,
            "filename": "babbl-0.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "444bd455eee04d53d0366986cd630fac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 18422,
            "upload_time": "2025-07-17T16:53:18",
            "upload_time_iso_8601": "2025-07-17T16:53:18.880509Z",
            "url": "https://files.pythonhosted.org/packages/ff/71/680afe3565833eaa9cd86550f053b78427090831c59713a3d86fede9769f/babbl-0.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-17 16:53:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "babbl"
}
        
Elapsed time: 1.09213s