static API generator library
Markdown loader forImplementation 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>"
}