Coder Social home page Coder Social logo

jiml's Introduction

Jiml is a Python script that renders Jinja templates with data from YAML files.

This allows users to maintain one YAML file of data that can be published into many other formats. For example, a CV can be maintained in a single YAML file but published as HTML and LaTeX.

Usage

Long Arg Short Arg Description
yaml y YAML config file.
template t Jinja2 template.
output o Output file to render.

On Unix-like systems with Python 3 installed in /user/bin/python3:

./render.py -y demo.yaml -t tech-resume.tex -o demo-resume.tex

If you want to generate a PDF from a LaTeX file:

xelatex demo-resume.tex

Supported Output

By default, YAML data is escaped depending on the output format. Jiml supports for the following formats for escaping:

  • LaTeX
  • HTML
  • XML

You can render plaintext file formats not in the list above, but special characters will not be escaped.

Development

Python dependencies are in requirements.txt. Install them with pip or pip3:

pip3 install -r requirements.txt

Git hooks live in .githooks. For git clients older than version 2.9, set this as your hooksPath:

git config core.hooksPath ".githooks"

jiml's People

Contributors

mxskylar avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bastiion

jiml's Issues

Override escaping

YAML keys prefixed with _ should not be escaped. That way, users can add render unescaped data when necessary. For example:

- _file: unescaped/path/to/file

Publish script as a binary

Publish script as a binary in popular package manager repositories:

  • apt (Debian)
  • app image (other Linux)
  • brew (OSX)
  • chocolatey (Windows)

Nice-to-haves

  • Bundle version-controlled templates with binary on install
  • Open source software license

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.