maiden


Namemaiden JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/gomleksiz/maiden
SummaryA tool to generate Markdown files from templates populated with data from YAML or JSON files.
upload_time2024-08-13 03:30:07
maintainerNone
docs_urlNone
authorHuseyin Gomleksizoglu
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
\`\`\`

```bash
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gomleksiz/maiden",
    "name": "maiden",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Huseyin Gomleksizoglu",
    "author_email": "huseyim@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/15/51/2df94273dc797ad463a2cf8fd702fc56eea6584b51340bd4c72157d24aca/maiden-0.2.2.tar.gz",
    "platform": null,
    "description": "# MaiDEN\n\nA command-line utility to generate Markdown files from templates populated with data from YAML or JSON files.\n\n## Installation\n\n\\`\\`\\`bash\npip install maiden\n\\`\\`\\`\n\n## Usage\n\n\\`\\`\\`bash\nmaiden templates/my_template.md output.md -d data.yaml\n\\`\\`\\`\n\n```bash\nUsage: maiden [OPTIONS] TEMPLATE_FILE OUTPUT_FILE\n\n  CLI command to generate markdown from template\n\nOptions:\n  -d, --data-file TEXT     Data files in YAML format\n  --process-data-template  Process data file as a template\n  --help\n```\n\n--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.\n\nSo 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.\n\n## Template Examples\n\n### Read information from a file\n\nReading a field from a YAML or JSON file:\n<% FROM additional_info.yml GET 'requirements' %>\n\nReading Python File Content\n<% FROM src/exceptions.py GET 'content' %>\n\n### Getting current time\n\n<% DATE YYYY-MM-DD %>\n\n### Getting information from OpenAI API\n<% OPENAI\n    Say something meaningful.\nEND %>\n\n### Nested Usage\n<% OPENAI\nRead the following python codes and give me information about what STDOUT and STDERR are in a table.\n\njust give me the information I asked, don't give information about what are you doing.\n\nAction.py is like this\n<% FROM src/actions/actions.py GET 'content' %>\n\nExceptions.py is like this\n<% FROM src/exceptions.py GET 'content' %>\n\nExtension.py is like this\n<% FROM src/extension.py GET 'content' %>\nEND %>\n\n### Jinja2 Template Engine\nThis tool also supports Jinja2 template engine, you can use it to generate more complex templates.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool to generate Markdown files from templates populated with data from YAML or JSON files.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/gomleksiz/maiden"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a35121e0c69b1e1a5387571f0591e627ed30aae5ba69554faf239a79c21b23a3",
                "md5": "e8f6403a93d5215a1acb8562fbe7d2a2",
                "sha256": "9ae6f5653c6b9dc7136eb1ad31edf7b11af7fe4b0427153612baa05ccb6fe6fc"
            },
            "downloads": -1,
            "filename": "maiden-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e8f6403a93d5215a1acb8562fbe7d2a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4767,
            "upload_time": "2024-08-13T03:30:05",
            "upload_time_iso_8601": "2024-08-13T03:30:05.800513Z",
            "url": "https://files.pythonhosted.org/packages/a3/51/21e0c69b1e1a5387571f0591e627ed30aae5ba69554faf239a79c21b23a3/maiden-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15512df94273dc797ad463a2cf8fd702fc56eea6584b51340bd4c72157d24aca",
                "md5": "3e5dd779737ec1511fc6e81f3d2d4535",
                "sha256": "4c83e12fc99341b08e1091b43fdc33d5ba5d8d60cda77986fed7fef39b970729"
            },
            "downloads": -1,
            "filename": "maiden-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3e5dd779737ec1511fc6e81f3d2d4535",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4109,
            "upload_time": "2024-08-13T03:30:07",
            "upload_time_iso_8601": "2024-08-13T03:30:07.062538Z",
            "url": "https://files.pythonhosted.org/packages/15/51/2df94273dc797ad463a2cf8fd702fc56eea6584b51340bd4c72157d24aca/maiden-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-13 03:30:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gomleksiz",
    "github_project": "maiden",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "maiden"
}
        
Elapsed time: 0.30329s