benhowes / vsot

VSOT - Django/jinja template formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(unmaintained) VSOT - Like black, but for Django/Jinja2 HTML templates

image

image

License - MIT

Note: I recommend looking at the following formatters/indenters instead:

HTML Template formatter

Use VSOT to automatically format your django/Jinja2 HTML templates. No need to manually reflow text or tags when you add/remove content.

It has been tested on small files, however there is a lot more to be done an a lot of edge cases which are not handled all that nicely at the moment. Use at your own risk, and only if you have the means to verify the output is correct!

Free software: MIT license

Features

  • Mimics black in terms of options and configuration.
  • Automatically supports all built in django/jinja2 tags
  • Safe - VSOT ensures that it does not change the meaning of the templates

Installation

pip install vsot

Dev Setup

Requirements: - Python 3.6 or later - Docker - Python poetry (see poetry docs)

  1. Clone repo
  2. Installation
poetry install

Credits

About

VSOT - Django/jinja template formatter

License:MIT License


Languages

Language:Python 88.3%Language:ANTLR 5.7%Language:HTML 4.4%Language:Makefile 1.6%