Giter Club home page Giter Club logo

t00m / kb4it Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 11.71 MB

KB4IT is a static website generator based on Asciidoctor sources mainly for technical documentation purposes.

Home Page: https://github.com/t00m/kb4it-adocs

License: GNU General Public License v3.0

Shell 0.20% Python 10.39% Smarty 4.15% CSS 58.59% HTML 0.02% JavaScript 26.64%
knowledge-base python3 static html website template asciidoctor metadata publishing-sharing wiki python uikit writing markdown markdown-to-html repository technical documentation static-site static-site-generator

kb4it's Introduction

About KB4IT

Introduction

KB4IT is a static website generator based on Asciidoctor sources mainly for technical documentation purposes.

You can see some demos here: https://github.com/t00m/kb4it-adocs

Motivations

  • The main aim is to provide an easy way to write my technical documentation.

  • Don’t care about the formatting and focus on the contents.

  • To allow teams to manage their knowledge database easily.

  • Do not depend on third software products like word processors or complex web applications.

Features

Pros

  • Writing documentation: Documents must be in Asciidoctor format which is easy to learn.

  • Finding documents: Once a document is converted to html, properties can be browsed. Moreover, property pages have filters and a search entry to filter by title.

  • Publishing your repository: all necessary files are inside a directory. Browse it or copy it to your web server.

  • Serverless: There is no need for a web server. Of course, you can use one if you please.

  • Smart compiling: Only those documents added or modified are compiled.

  • Use the default themes or build your own custom theme

  • By modifying templates, it might be integrated with Github or Gitlab.

Cons

  • Not to much documentation at this moment

  • No online editor: At this moment, KB4IT doesn’t include any online editor. You must create or edit your documents with your preferred editor.

  • No dynamic search: KB4IT was developed to be as simple as possible.

  • No dependencies at all excepting Asciidoctor (as text processor and publishing toolchain) and Python (the programming language used).

  • API is not stable

  • Most of the requirements are tailored to my own necessities which might not be the same as yours.

Installation

From source

If you have used this app before, it might be necessary to uninstall it before:

pip3 uninstall kb4it -qy

Then, install it:

python3 setup.py install --user

Pypi package

pip3 install kb4it --user -U

Execution

The most typical usage would be:

$HOME/.local/bin/kb4it -source /path/to/asciidoctor/sources -target /path/to/target/directory -log DEBUG

If templates remain the same, force a new compilation:

$HOME/.local/bin/kb4it -source /path/to/asciidoctor/sources -target /path/to/target/directory --log DEBUG -force

If the directory containing the asciidoctor sources have a theme, it will be used. However, you can specify one:

$HOME/.local/bin/kb4it -source /path/to/asciidoctor/sources -target /path/to/target/directory -theme mytheme -log DEBUG

You can also specify any_datetime_attribute to sort your documents:

$HOME/.local/bin/kb4it -source /path/to/asciidoctor/sources -target /path/to/target/directory -sort Published -log DEBUG

Download

Get the code from Github: https://github.com/t00m/KB4IT

Credits

  • Python Programming language that lets you work more quickly and integrate your systems more effectively.

  • Asciidoctor A fast text processor & publishing toolchain for converting AsciiDoc to HTML5, DocBook & more.

  • UIKit A lightweight and modular front-end framework for developing fast and powerful web interfaces.

  • Geany Powerful, stable and lightweight programmer’s text editor that provides tons of useful features without bogging down your workflow. It runs on Linux, Windows and MacOS is translated into over 40 languages, and has built-in support for more than 50 programming languages.

Contact

Tomás Vírseda (aka t00m): [email protected]

I would appreciate to hear from your comments.

kb4it's People

Contributors

t00m avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

kb4it's Issues

Finish Techdoc theme

Finish implementing all features for this theme

  • Events
  • Messages
  • Filtered key pages

Bookmarks

KB4IT should have a section or page for those document with the following property:

:Bookmark: True

Remove sources from an already cached directory leave some pages with inconsistencies

Detected a wrong behavior when sources files are moved/deleted from an (already cached) directory.

Affected property pages should be compiled again.

Workaround: delete cache directory.

Cache directory can be found by checking DEBUG output during the compilation.

Fix 1: redesign the algorithm to detect changes
Fix 2: add an optional parameter to force a new and clean compilation.

Improve templating

Current templating system is very basic (simple substitution).
By using mako template system, it is easier to create templates.

This adds the first dependency to the project. It was necessary.

Card icons missing

Until now, icons in cards depends on the availability of a value for the property 'Author'.

In future developments, KB4IT shouldn't have core properties.

Therefore, as proposal, KB4IT will look for an icon

  • if an icon is present for the author property
  • if not, it will look for an icon with the same name that the document in the resources/images/ directory
  • finally, if none is found, it will use the default generic icon.

Images path wrong

Images load on local but not in remote.
The images path should be relative. Now their path is absolute.

Create a demo

Create a demo site:

  • Add more tests and sources
  • Rename tests directory to demo-sources
  • Create target directory demo-output

RSS Feeds

Allow users to keep track of new/modified documents in KB4IT:

  1. One main feed for all documents in KB4IT
  2. A feed for each property

Agnostic Knowledge Base

How to improve KB4IT so it doesn't depend on core properties (a predefined set of properties)?
Or should KB4IT look for a very small set of properties (like Author, Category, Scope)?

More command line options

Allow users to pass more command line options.

For example:

  • Force a new and clean compilation
  • Create a site only for a list of specific keys/values
  • etc...

OSError: [Errno 36] File name too long

After converting a json database of movies to KB4IT format and during the processing, I got the following error:

OSError: [Errno 36] File name too long: '/home/t00m/.kb4it/var/tmp/...

Theme techdoc

Create theme 'techdoc' (Technical documentation) with its own logic.

UI should be managed by themes

Till now, UIKit is included by default as the front-end framework for developing the web interface.
KB4IT shouldn't care about the framework used. Themes should provide it.

Themes

Allow KB4IT to use themes (user templates and scripts) to represent the information.

Eg.:

  • Technical documentation
  • Dictionaries
  • Notes
  • Bookmarking
  • Blog
  • Tasks

Improve compilation algorithm

Currently, because of a bug, the compilation algorithm compile again several documents even if it is not necessary.
Fix it!

Auto detect theme

It might be convenient to auto detect theme from a given source directory.

Templates

Create a set of standard templates (modifiable by users) with a set of predefined properties and values. This would make easy to add issues / tickets / reports / blog posts / etc...

Blogging

By identifying a document with the property:

Category: Blog

KB4IT should handle it as a blog post.

Improve doc cards

Doc cards should display more info apart from title and author icon.

Display following metadata:
(=) Author
(=) Title
(+) Timestamp
(+) Category
(+) Scope
(?) Priority (badge)
(?) Status (change backround color)

Pagination

Enable pagination in order to display a large amount of values. Otherwise, it takes ages to display all doc cards at one.
Disable filters for key pages.

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.