Documentation Manager
This tool helps to manage documentation written in Markdown.
Install
DocMan is a binary file that must be stored in a directory. The files can be found here.
wget -O ~/.local/bin/docman https://download.schukai.com/tools/docman/docman-linux-amd64
## For Linux, the execution bit must still be set.
chmod u+x ~/.local/bin/docman
Developments
To search the source code for new texts, you have to go to the source directory and call
go generate translations/translations.go
show font directories
kpsepath mf | sed -e 's/:/\n/g'
Usage
Markdown
Awsome Boxes
Circled numbers
Insert the instructions before instruction \begin{document}
\usepackage{pifont} % dingbats
\usepackage{tikz} % tikz
\newcommand*\numcircledtikz[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,text=white,fill=black,inner sep=1.2pt] (char) {#1};}}
you can use the following command to insert the number
\ding{182}
\numcircledtikz{1}
dingbats are not supported in the current version of TikZ.
① \ding{172} ❶ \ding{182} ➀ \ding{192} ➊ \ding{202}
② \ding{173} ❷ \ding{183} ➁ \ding{193} ➋ \ding{203}
③ \ding{174} ❸ \ding{184} ➂ \ding{194} ➌ \ding{204}
④ \ding{175} ❹ \ding{185} ➃ \ding{195} ➍ \ding{205}
⑤ \ding{176} ❺ \ding{186} ➄ \ding{196} ➎ \ding{206}
⑥ \ding{177} ❻ \ding{187} ➅ \ding{197} ➏ \ding{207}
⑦ \ding{178} ❼ \ding{188} ➆ \ding{198} ➐ \ding{208}
⑧ \ding{179} ❽ \ding{189} ➇ \ding{199} ➑ \ding{209}
⑨ \ding{180} ❾ \ding{190} ➈ \ding{200} ➒ \ding{210}
⑩ \ding{181} ❿ \ding{191} ➉ \ding{201} ➓ \ding{211}
Api-Documentation
Thunder Client
Thunder Client is a plugin for Visual Studio Code. With this plugin you can create and manage REST API requests. Docmen supports the import of Thunder Client files.
Commands
General Parameters
The date format for the output can be specified with the parameter --date-format
.
All confirguration values can also be specified in a configuration file.
The configuration file can be specified with the --config
parameter.
If no path is specified, the configuration file config.yaml
is first searched for in the working directory.
If this is not found, the file is searched for in the home directory ~/.config/documentations-manager/config.yaml
.
Finally, we look for the configuration in the /etc/documentations-manager/config.yaml
directory.
The parameter path
specifies the path.
Configuration
## DOCMAN_PATH
Path: /home/user/documents
## DOCMAN_DATE_FORMAT
DateFormat:
Add:
## DOCMAN_NEW_TEMPLATE
Template:
PDF:
## DOCMAN_PDF_OUTPUT
Output:
Teplates:
## DOCMAN_PDF_LATEX_TEMPLATE
Latex:
## DOCMAN_PDF_MARKDOWN_TEMPLATE
Markdown:
Help
There is help on the command line for each individual command.
docman --help
create PDF
docman document pdf --config pathto/config.yaml
Structure
The Text
The individual requirements are Markdown files with integrated YAML structure. The YAML structure must
be introduced with ---
and closed with ...
.
The data from the YAML block can be integrated in the text via placeholders.
For example, the following statement can be used to include the items within the document.
{{ if.Items }}
**Items**
| ID | Name | Delivery until | Provided on |
|--------------------|--------------|----------------------:|-----------------------------------------:|
{{ range.Items
}}| {{ .ID }} | {{ .Name }} | {{ .DeliveryUntil.Format "02.Jan" }} | {{ .ProvidedOn.Format "02.Jan" }} |
{{ end }}
{{ end }}
If the PDF function is used, LaTeX commands can also be included in the text. For example, the LaTex instruction ` /newline' leads to a line break.
YAML
> |
│ |
" |
' |
>- |
>+ |
│- |
│+ |
||
---|---|---|---|---|---|---|---|---|---|
Spaces/newlines converted as: | |||||||||
Trailing space → | _ | _ | _ | _ | _ | _ | |||
Leading space → | \n_ | \n_ | \n_ | \n_ | \n_ | \n_ | |||
Single newline → | _ | \n | _ | _ | _ | _ | _ | \n | \n |
Double newline → | \n | \n\n | \n | \n | \n | \n | \n | \n\n | \n\n |
Final newline → | \n | \n | \n | \n | |||||
Final double newline → | \n\n | \n\n | |||||||
How to create a literal: | |||||||||
Single quote | ' | ' | ' | ' | '' | ' | ' | ' | ' |
Double quote | " | " | " | \" | " | " | " | " | " |
Backslash | \ | \ | \ | \\ | \ | \ | \ | \ | \ |
Other features | |||||||||
In-line newlines with \n
|
🚫 | 🚫 | 🚫 | ✅ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
Spaceless newlines with \
|
🚫 | 🚫 | 🚫 | ✅ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
# or : in value |
✅ | ✅ | 🚫 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Can start on same line as key | 🚫 | 🚫 | ✅ | ✅ | ✅ | 🚫 | 🚫 | 🚫 | 🚫 |
│ -> |
Date
If a date is expected as a parameter, it must be entered in a special format depending on the type. The following table provides information about the individual formats. The format can be looked up in the first column of the table below.
Layout | Java notation | C notation | Notes |
---|---|---|---|
2006-01-02 | yyyy-MM-dd | %F | ISO 8601 |
20060102 | yyyyMMdd | %Y%m%d | ISO 8601 |
January 02, 2006 | MMMM dd, yyyy | %B %d, %Y | |
02 January 2006 | dd MMMM yyyy | %d %B %Y | |
02-Jan-2006 | dd-MMM-yyyy | %d-%b-%Y | |
01/02/06 | MM/dd/yy | %D | US |
01/02/2006 | MM/dd/yyyy | %m/%d/%Y | US |
010206 | MMddyy | %m%d%y | US |
Jan-02-06 | MMM-dd-yy | %b-%d-%y | US |
Jan-02-2006 | MMM-dd-yyyy | %b-%d-%Y | US |
06 | yy | %y | |
Mon | EEE | %a | |
Monday | EEEE | %A | |
Jan-06 | MMM-yy | %b-%y |
Latex
Individual LaTeX commands can be looked up here:
- tug.ctan.org/info/latex-refsheet/LaTeX_RefSheet.pdf
- www.uni-frankfurt.de/53485609/latexsheet.pdf
- www.latex4ei.de/downloads/LaTeX_CheatSheet.pdf
- download.schukai.com/tools/docman/
License # Credits
- Unsplash - https://unsplash.com/
- Icons Font Face - https://fontawesome.com/
- jQuery - http://www.jquery.com/
- Bootstrap 4 - http://getbootstrap.com/
- Highlight Js - https://highlightjs.org/
- jQuery easing - http://gsgd.co.uk/sandbox/jquery/easing/
- Magnific Popup - http://dimsemenov.com/plugins/magnific-popup/
- iDocs-Template - https://github.com/harnishdesign/iDocs
- Eisvogel LaTeX-Template - https://github.com/Wandmalfarbe/pandoc-latex-template