.. contents::
   :depth: 3
..

Introduction
============

**KB4IT** helps you to build a static website with all your procedures
and documents

It is based on `Asciidoctor <https://asciidoctor.org>`__ markdown.

Main goals:

-  Easy to write technical documentation
-  Easy to find documentation
-  Easy to publish documentation
-  Easy to backup/restore documentation

How it works
============

This is the flow:

1. Delete contents of target directory (if any)
2. Get source documents
3. Preprocess documents (get metadata)
4. Process documents in a temporary dir
5. Compile documents to html with asciidoc
6. Copy all documents to target path
7. Copy source docs to target directory

Installation
============

From source code:

::

    python3 setup.py install --user

Then, you should find the main script here:

    $HOME/.local/bin/kb4it


From Pypi:

::

    pip3 install kb4it

Execution
=========

kb4it is a Python3 script. All parameters are optional except the source
directory.

The most typical usage would be:

::

    kb4it -sp /path/to/source/to/asciidocs -tp /var/www/html/repo -v ERROR


Display help by passing -h as argument:

::

    usage: kb4it [-h] -sp SOURCE_PATH [-tp TARGET_PATH] [-log LOGLEVEL]
                 [--version]

    KB4IT by Tomás Vírseda

    optional arguments:
      -h, --help            show this help message and exit
      -sp SOURCE_PATH, --source-path SOURCE_PATH
                            Path for Asciidoc source files.
      -tp TARGET_PATH, --target-path TARGET_PATH
                            Path for output files
      -log LOGLEVEL, --log-level LOGLEVEL
                            Increase output verbosity
      --version             show program's version number and exit

Notes
=====

-  Target directories are created if they do not exist.
-  Source directory is never touched. Source documents are copied to a
   temporary directory
-  Contents on target directory are always deleted before compilation

Download
========

Get a copy from SVN repository:

::

    svn checkout https://subversion.t00mlabs.net/kb4it/trunk kb4it
