Skip to main content

A tool to generate Markdown files from templates populated with data from YAML or JSON files.

Project description

MaiDEN

A command-line utility to generate Markdown files from templates populated with data from YAML or JSON files.

Installation

```bash pip install maiden ```

Usage

```bash maiden templates/my_template.md output.md -d data.yaml ```

Usage: maiden [OPTIONS] TEMPLATE_FILE OUTPUT_FILE

  CLI command to generate markdown from template

Options:
  -d, --data-file TEXT     Data files in YAML format
  --process-data-template  Process data file as a template
  --help

--process-data-template Option will process the data file as a template, so you can use Jinja2 syntax in your template file by using the updated data file.

So the idea will be using the template options in the data file so that it can collect information from files and then use this information in the template file with jinja2 syntax.

Template Examples

Read information from a file

Reading a field from a YAML or JSON file: <% FROM additional_info.yml GET 'requirements' %>

Reading Python File Content <% FROM src/exceptions.py GET 'content' %>

Getting current time

<% DATE YYYY-MM-DD %>

Getting information from OpenAI API

<% OPENAI Say something meaningful. END %>

Nested Usage

<% OPENAI Read the following python codes and give me information about what STDOUT and STDERR are in a table.

just give me the information I asked, don't give information about what are you doing.

Action.py is like this <% FROM src/actions/actions.py GET 'content' %>

Exceptions.py is like this <% FROM src/exceptions.py GET 'content' %>

Extension.py is like this <% FROM src/extension.py GET 'content' %> END %>

Jinja2 Template Engine

This tool also supports Jinja2 template engine, you can use it to generate more complex templates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maiden-0.2.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

maiden-0.2.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file maiden-0.2.4.tar.gz.

File metadata

  • Download URL: maiden-0.2.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for maiden-0.2.4.tar.gz
Algorithm Hash digest
SHA256 84eb8e22152b4f25390a1a4b5475837c0a085d203ebabec69815c8919bc9bfa6
MD5 ae8e2667aafa8d4735136cf134b026ea
BLAKE2b-256 c14b02453906c8d64ebab392f49d9aa7292271b9e91e1f0bd72c19f96d052c84

See more details on using hashes here.

File details

Details for the file maiden-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: maiden-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for maiden-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c793cb37800fb42aa92d94b34751b88184212d755b7dc4a7a41a4ff7bf09ebcc
MD5 f83cc097bfb1733b66ab24453e1f7123
BLAKE2b-256 69893c09f77c81455954bc07d380ef8d2fee77dad3f1ea27cc494cfadeb2c73b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page