Skip to content

Commit

Permalink
Moved install documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fadado committed Apr 1, 2017
1 parent 2dcacc2 commit a1e080f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 44 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ install:
$(SUDO) install --verbose --compare --mode 555 bin/* $(bindir)
$(SUDO) install --verbose --compare --mode 644 share/* $(datadir)/$(project)
$(SUDO) install --verbose --compare --mode 644 jqt.1.gz $(mandir)/man1
$(SUDO) sed -i -e "s#DATADIR='.*'#DATADIR='$(datadir)'#" $(bindir)/jqt

uninstall:
$(SUDO) rm --verbose --force -- $(addprefix $(prefix)/,$(wildcard bin/*))
Expand All @@ -120,13 +121,19 @@ uninstall:
# Show targets
.PHONY: help
help:
echo 'Usage: make TARGET [parameter=value...]'
echo 'Targets:'; \
$(MAKE) --print-data-base --just-print 2>&1 \
| grep -v '^[mM]akefile' \
| awk '/^[^ \t.%][-A-Za-z0-9_]*:/ { print $$1 }' \
| sort --unique \
| sed 's/:\+$$//' \
| pr --omit-pagination --indent=4 --width=80 --columns=4
echo 'Default parameters:'; \
echo ' prefix = /usr/local'; \
echo ' bindir = /usr/local/bin'; \
echo ' datadir = /usr/local/share'; \
echo ' mandir = /usr/local/share/man'

########################################################################
# Tests
Expand Down
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

_jqt_ is a web template engine that uses [_jq_](https://stedolan.github.io/jq/) as expression language.

If you want to learn to use _jqt_, read the documentation at
<https://fadado.github.io/jqt/>. The documentation is generated using _jqt_ in the `docs`
folder of this repository.

The tools used in the implementation of _jqt_ are:

* [jq](https://stedolan.github.io/jq/), a lightweight and flexible command-line JSON processor.
* [GPP](https://logological.org/gpp), a general-purpose preprocessor.
* [Pandoc](http://pandoc.org/), a universal document converter.
* [Bash](https://www.gnu.org/software/bash/), [sed](https://www.gnu.org/software/sed/) and other shell tools.

If you want to learn how to use _jqt_ consult the documentation at
<https://fadado.github.io/jqt/>. The documentation is generated using _jqt_ in
the [`docs`](./docs/) folder of this repository.
If you are interested in _jq_ you can see also [JBOL](https://fadado.github.io/jbol/),
a related project with a collection of modules for the _jq_ language.

Expand Down Expand Up @@ -42,6 +41,36 @@ are:

* `help`: list all targets defined in the Makefile.

### Installation

In systems with the GNU software installed tools as [Bash](https://www.gnu.org/software/bash/),
[sed](https://www.gnu.org/software/sed/) and other shell tools are installed by default.
To use _jqt_ you must install additional tools like [GPP](https://logological.org/gpp)
or [Pandoc](http://pandoc.org/); for example, in recent _Fedora Linux_ distributions
the following command will install all the extra software _jqt_ needs:

```zsh
$ sudo dnf -y install make general-purpose-preprocessor jq pandoc PyYAML
```

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

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

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

```zsh
$ sudo mkdir -p /usr/local/bin /usr/local/share/jqt
$ sudo cp bin/* /usr/local/bin
$ sudo cp 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
Expand Down
35 changes: 0 additions & 35 deletions docs/content/engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,41 +36,6 @@ and `yaml` ([PyYAML](http://pyyaml.org/) implementation).
The project uses [GNU Make][MAKE] on several development activities, but `make`
is not necessary to run `jqt`.

## Installation

Under a recent <%cite Fedora> <%cite Linux> distribution most of the commands
used by _jqt_ are installed by default. The following command will install all the extra
software _jqt_ needs:

```zsh
$ sudo dnf -y install make general-purpose-preprocessor jq pandoc PyYAML
```

### Manual install

After clone or [download](https://github.com/fadado/jqt/releases) _jqt_ you can
manually install it executing a few commands on the _jqt_ top directory:

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

### _Make_ install

If you know how to use `make` please see the `Makefile` located in the _jqt_
top directory and run `make install` if you agree with the things that will
happen. You can also change the installation directory:

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

But if you choose a directory different of `/usr/local/share` for the shared data
you must still edit by hand the parameter `DATADIR` definition in the `bin/jqt` file.

## Invoking _jqt_

### Synopsis
Expand Down
8 changes: 3 additions & 5 deletions docs/content/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,15 @@ example seems to be a template?

This site is built using _jqt_, and is itself in his implementation a kind of
tutorial about _jqt_.

If you want to learn how to use _jqt_ [install it](./engine.html#installation) and
see all the different sections of this site:
If you want to learn how to use _jqt_ see all the different sections of this site:

* [Template engine](./engine.html)
* [Page structure](./structure.html)
* [Authoring content](./content.html)
* [Data model](./data.html)

And don’t forget to study this site source code in the repository
[`docs` directory](https://github.com/fadado/jqt/tree/master/docs)!
And don’t forget to study this documentation source code in the repository
[`docs`](https://github.com/fadado/jqt/tree/master/docs) directory!

_jqt_ is developed under the _Fedora_ Linux
distribution, and a lot of portability issues are expected at this stage of
Expand Down

0 comments on commit a1e080f

Please sign in to comment.