static-api-generator-md-loader

Markdown loader for static API generator


Keywords
static api generator markdown loader, api, api-generator, conversion, data-transformation, json, loader, markdown, python, python3
License
MIT
Install
pip install static-api-generator-md-loader==0.0.5

Documentation

Markdown loader for static API generator library

Build Status Coverage Status Python versions PyPi

Implementation of BaseLoader from static API generator for converting content of markdown files to html content.

This loader support parsing of metadata like original BaseLoader.

Usage examples

from static_api_generator.generator import APIGenerator
from markdown_loader import MdLoader


api_gen = APIGenerator('/home/user/some_text_files/', '/home/user/static_api/', MdLoader)
api_gen.generatre()

Markdown files located in /home/user/some_text_files/ will be written as json to a directory /home/user/static_api/ with the hierarchy saved.

If the source text file looks like this

---
title: What is Lorem Ipsum?
category: Lorem Ipsum
...
Lorem Ipsum is simply dummy text of the printing and typesetting industry.

then the conversion result will be

{
    "title": "What is Lorem Ipsum?",
    "category": "Lorem Ipsum",
    "content": "<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>"
}