fadado / jqt

jqt · The jq template engine

Home Page:https://fadado.github.io/jqt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jqt · The jq template engine

jqt is a web template engine that uses jq as expression language.

The tools used in the implementation of jqt are:

  • jq, a lightweight and flexible command-line JSON processor.
  • GPP, a general-purpose preprocessor.
  • Pandoc, a universal document converter.
  • Bash, sed and other shell tools.

If you want to learn how to use jqt visit the site https://fadado.github.io/jqt/. The site pages are generated using jqt in the docs folder of this repository. If you are interested in jqt you can see also JBOL, a related project with a collection of modules for the jq language.

jqt is developed under the Fedora Linux distribution, and a lot of portability issues are expected at this stage of development. Please, use this GitHub repository features if you want to send any kind of questions.

Project management

This project uses GNU Make on several development activities, but make is not necessary to run jqt. This section explains the repository structure and how it is managed.

Makefile

The file Makefile concentrates all the routine procedures, like running the tests or install last versions of scripts in the system directories. The main defined targets are:

  • list: list all targets defined in the Makefile.

  • check: run the jqt tests. This is the default target.

  • clean: remove all files generated during tests execution.

  • install: install jqt scripts and related files in the system directories.

  • uninstall: remove installed files from the system directories.

Installation

In systems with the GNU software installed tools such as Bash, sed and other shell tools are installed by default. To use jqt you must install additional tools like GPP or Pandoc; for example, in recent Fedora Linux distributions the following command will install all the extra software jqt needs:

$ sudo dnf -y install make general-purpose-preprocessor jq pandoc python2-pyyaml

To install jqt simply run make install on the jqt repository top directory. If you don’t like to install into the /usr/local system directory you can change the destination directory:

$ sudo make install prefix=/your/installation/path

Alternatively you can install jqt manually executing a few commands on the jqt top directory:

$ sudo mkdir -p /usr/local/bin /usr/local/share/jqt
$ sudo cp bin/* /usr/local/bin
$ sudo cp -r share/* /usr/local/share/jqt
$ [[ $PATH =~ /usr/local/bin ]] || echo 'Add /usr/local/bin to your PATH'

Scripts

The bin directory contains jqt and other related tools. The jqt script also needs some files located in the share directory.

Tests

The execution of make check or simply make will run several tests located in the directory tests. Ensure that the tests are passed before start another jqt uses.

Documentation

The directory docs contains the source files for jqt documentation. Please see the directory docs for all information on this subproject.

About

jqt · The jq template engine

https://fadado.github.io/jqt/

License:Other


Languages

Language:Shell 29.2%Language:CSS 26.3%Language:Makefile 24.0%Language:JSONiq 10.1%Language:Python 3.5%Language:JavaScript 2.9%Language:Perl 2.1%Language:HTML 2.0%