Compare commits
24 Commits
648db26e42
...
v0.0.5
Author | SHA1 | Date | |
---|---|---|---|
44369626ac | |||
72e2b06f5b | |||
2796ce1767 | |||
8a3aad5ca9 | |||
ff122a09d7 | |||
e6f253447e | |||
41a51e6bb9 | |||
decce7dd7c | |||
78fa56ea4b | |||
5a10775763 | |||
5b242831b6 | |||
e5af0a2c4e | |||
0bc31c418d | |||
218595c922 | |||
323b893714 | |||
01acc38404 | |||
c655a87a91 | |||
ab7acf9874 | |||
f53c84afeb | |||
776f957c1e | |||
dc8644dfe5 | |||
b8c1892642 | |||
ae424c2f73 | |||
76432f9f69 |
1
.gitignore
vendored
@ -210,3 +210,4 @@ crowbook/wtf-handbook.pdf
|
|||||||
|
|
||||||
# Plantuml binary
|
# Plantuml binary
|
||||||
plantuml.jar
|
plantuml.jar
|
||||||
|
py3-sphinx
|
||||||
|
4
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "handbuch"]
|
[submodule "handbuch"]
|
||||||
path = handbuch
|
path = source/handbuch
|
||||||
url = https://git.wtf-eg.de/ag_kommunikation/handbuch.git
|
url = https://git.wtf-eg.de/wtf-eg/handbuch.git
|
||||||
|
46
Makefile
@ -1,26 +1,34 @@
|
|||||||
.PHONY: mdbook crowbook sphinx bundle
|
# Minimal makefile for Sphinx documentation
|
||||||
|
#
|
||||||
|
|
||||||
all: mdbook crowbook sphinx
|
# You can set these variables from the command line, and also
|
||||||
|
# from the environment for the first two.
|
||||||
|
SPHINXOPTS ?=
|
||||||
|
SPHINXBUILD ?= sphinx-build
|
||||||
|
SOURCEDIR = source
|
||||||
|
BUILDDIR = build
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
help:
|
||||||
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
.PHONY: help Makefile
|
||||||
|
|
||||||
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
|
%: Makefile
|
||||||
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
.PHONY: sphinx bundle
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -rf sphinx/build/*
|
-rm -rf build/*
|
||||||
|
|
||||||
mdbook:
|
|
||||||
-mdbook build mdbook
|
|
||||||
-cd mdbook; RUST_BACKTRACE=1 mdbook-epub --standalone
|
|
||||||
|
|
||||||
crowbook:
|
|
||||||
crowbook crowbook/wtf-handbook.book
|
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
$(MAKE) -C sphinx singlehtml epub latexpdf
|
$(MAKE) singlehtml epub latexpdf
|
||||||
|
|
||||||
bundle: all
|
bundle: sphinx
|
||||||
-mkdir bundle
|
-mkdir bundle
|
||||||
cp mdbook/book/epub/RTFM\ -\ Das\ WTF\ Kooperative\ Handbuch.epub bundle/mdbook_RTFM\ -\ Das\ WTF\ Kooperative\ Handbuch.epub
|
cp build/epub/*.epub bundle/
|
||||||
cp crowbook/wtf-handbook.epub bundle/crowbook_wtf-handbook.epub
|
cp build/latex/*.pdf bundle/
|
||||||
cp crowbook/wtf-handbook.pdf bundle/crowbook_wtf-handbook.pdf
|
rsync -av --delete build/singlehtml/ bundle/html
|
||||||
cp crowbook/wtf-handbook.html bundle/crowbook_wtf_handbook.html
|
|
||||||
cp sphinx/build/epub/RTFM-DasHandbuchzurWTFeG.epub bundle/sphinx_DasHandbuchzurWTFeG.epub
|
|
||||||
cp sphinx/build/latex/rtfm-dashandbuchzurwtfeg.pdf bundle/sphinx_DasHandbuchzurWTFeG.pdf
|
|
||||||
rsync -av --delete sphinx/build/singlehtml/ bundle/sphinx_html
|
|
||||||
|
75
README.md
@ -1,87 +1,34 @@
|
|||||||
# rtfm
|
# About
|
||||||
|
|
||||||
|
This repo contains the sphinx configuration and the wtf theme for sphinx for the generation of the WTF handbook.
|
||||||
|
|
||||||
this project is an experiment of how to generate html, epub and pdf
|
this project is an experiment of how to generate html, epub and pdf
|
||||||
from the git repository for the WTF Handbook.
|
from the git repository for the WTF Handbook.
|
||||||
The handbuch sources are included as git submodule.
|
The handbuch sources are included as git submodule.
|
||||||
|
|
||||||
It contains a configuration for three different generators:
|
# sphinx html theme for wtf coop
|
||||||
- mdbook and mdbook-epub
|
|
||||||
- crowbook
|
|
||||||
- sphinx
|
|
||||||
|
|
||||||
### sphinx html theme for wtf coop
|
|
||||||
|
|
||||||
the sphinx build uses an adapted sphinx theme for the wtf cooperatives CI.
|
the sphinx build uses an adapted sphinx theme for the wtf cooperatives CI.
|
||||||
|
|
||||||
## How to build
|
# How to build
|
||||||
|
|
||||||
### rust based tools mdbook and crowbook
|
|
||||||
|
|
||||||
For building you need a rust installation.
|
|
||||||
This can be achieved by using the installer from https://rustup.rs
|
|
||||||
|
|
||||||
After installing the rust toolchain for your platform you have to install the needed tools:
|
|
||||||
````
|
|
||||||
cargo install mdbook
|
|
||||||
cargo install mdbook-epub
|
|
||||||
cargo install crowbook
|
|
||||||
````
|
|
||||||
|
|
||||||
Crowbook needs xelatex for building the pdf outputs.
|
|
||||||
|
|
||||||
### python based - sphinx
|
### python based - sphinx
|
||||||
|
|
||||||
First create a Python 3 virtual environment using the venv module included with Python 3.
|
First create a Python 3 virtual environment using the venv module included with Python 3.
|
||||||
|
|
||||||
````
|
|
||||||
python -m venv py3-sphinx
|
|
||||||
`````
|
|
||||||
|
|
||||||
Now “activate” the environment. Look for the name of the virtual environment enclosed in parenthesis after activation.
|
1. Create a virtual Python environment: ```python3 -m venv venv```
|
||||||
|
2. Activate virtual Python environment: ```source venv/bin/activate```
|
||||||
`````
|
3. install needed packages from ```requirements.txt```: ```pip install -r requirements.txt```
|
||||||
source py3-sphinx/bin/activate
|
|
||||||
``````
|
|
||||||
|
|
||||||
Expected Output
|
|
||||||
`````
|
|
||||||
(py3-sphinx) $
|
|
||||||
``````
|
|
||||||
|
|
||||||
In the virtual environment install the following modules with pip:
|
|
||||||
|
|
||||||
`````
|
|
||||||
(py3-sphinx) $ pip install sphinx3 sphinxcontrib-plantuml myst-parser
|
|
||||||
``````
|
|
||||||
|
|
||||||
For generating the images from plantuml-sources it needs also [Plantuml](https://plantuml.com/).
|
For generating the images from plantuml-sources it needs also [Plantuml](https://plantuml.com/).
|
||||||
For pdf output the latex builder is used, so it needs also an installed latex and pdflatex.
|
For pdf output the latex builder is used, so it needs also an installed latex and pdflatex.
|
||||||
|
|
||||||
### Running the document generation via make
|
### Running the document generation via make
|
||||||
|
|
||||||
The top level directory contains a Makefile
|
The top level directory contains a Makefile,
|
||||||
|
for generation with all output formats use
|
||||||
|
|
||||||
For generation with all tools use
|
|
||||||
`````
|
`````
|
||||||
make all
|
make bundle
|
||||||
`````
|
`````
|
||||||
|
|
||||||
For generation with single tool use:
|
|
||||||
`````
|
|
||||||
make mdbook [crowbook sphinx]
|
|
||||||
`````
|
|
||||||
|
|
||||||
## Issues
|
|
||||||
### mdbook - rendering problem with current inputs
|
|
||||||
|
|
||||||
### sphinx - Problems rendering latex with .svg image(organigramm.svg)
|
|
||||||
|
|
||||||
### problems rendering links not starting with http(s)
|
|
||||||
mumble and mailto links are not rendered correctly
|
|
||||||
tbd have an eye on all outputs
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
- [ ] complete wtf coop HTML theme
|
|
||||||
- [ ] add frontpage with wtf coop CI
|
|
||||||
- [ ] adapt generated pdf to WTF design
|
|
||||||
- [ ] unify Title and authors in the configurations
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
## Installation ##
|
|
||||||
|
|
||||||
````
|
|
||||||
rustup
|
|
||||||
cargo install crowbook
|
|
||||||
````
|
|
||||||
|
|
||||||
pdf generation needs xelatex
|
|
@ -1,26 +0,0 @@
|
|||||||
author: evi, helix, gulliver
|
|
||||||
title: RTFM - Das Handbuch für die WTF eG
|
|
||||||
lang: de
|
|
||||||
|
|
||||||
## Output formats
|
|
||||||
|
|
||||||
# Uncomment and fill to generate files
|
|
||||||
# output.html: some_file.html
|
|
||||||
# output.epub: some_file.epub
|
|
||||||
# output.pdf: some_file.pdf
|
|
||||||
|
|
||||||
# Or uncomment the following to generate PDF, HTML and EPUB files based on this file's name
|
|
||||||
output: [pdf, epub, html]
|
|
||||||
|
|
||||||
# Uncomment and fill to set cover image (for EPUB)
|
|
||||||
# cover: some_cover.png
|
|
||||||
|
|
||||||
## List of chapters
|
|
||||||
+ ../handbuch/intro.md
|
|
||||||
+ ../handbuch/dienste.md
|
|
||||||
+ ../handbuch/FAQ.md
|
|
||||||
+ ../handbuch/Aufnahmeprozess.md
|
|
||||||
+ ../handbuch/Wegweiser.md
|
|
||||||
+ ../handbuch/Auszahlung.md
|
|
||||||
+ ../handbuch/RaaS.md
|
|
||||||
+ ../handbuch/AG-Einkauf.md
|
|
1
handbuch
@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
## Installation ##
|
|
||||||
|
|
||||||
``
|
|
||||||
rustup
|
|
||||||
cargo install mdbook
|
|
||||||
cargo install mdbook-epub
|
|
||||||
````
|
|
@ -1,11 +0,0 @@
|
|||||||
[book]
|
|
||||||
authors = ["tbd, helix, evi"]
|
|
||||||
language = "de"
|
|
||||||
multilingual = false
|
|
||||||
src = "src"
|
|
||||||
title = "RTFM - Das WTF Kooperative Handbuch"
|
|
||||||
|
|
||||||
[output.html]
|
|
||||||
mathjax-support = true
|
|
||||||
|
|
||||||
[output.epub]
|
|
@ -1,10 +0,0 @@
|
|||||||
# Inhaltsverzeichnis
|
|
||||||
|
|
||||||
- [Wichtige Links](../../Handbuch/intro.md)
|
|
||||||
- [Dienste und Organisation](../../Handbuch/dienste.md)
|
|
||||||
- [Aufnahmeprozess](../../Handbuch/Aufnahmeprozess.md)
|
|
||||||
- [Wegweiser für neue Mitglieder](../../Handbuch/Wegweiser.md)
|
|
||||||
- [Auszahlung](../../Handbuch/Auszahlung.md)
|
|
||||||
- [Häufige Fragen](../../Handbuch/FAQ.md)
|
|
||||||
- [Rechnung as a Service (RaaS)](../../Handbuch/RaaS.md)
|
|
||||||
- [AG Einkauf](../../Handbuch/AG-Einkauf.md)
|
|
BIN
source/_static/epub_cover.png
Normal file
After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@ -24,8 +24,7 @@ copyright = '2021, diverse'
|
|||||||
author = 'Autorenkollektiv'
|
author = 'Autorenkollektiv'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '0.0.1'
|
release = '0.0.5'
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
@ -91,4 +90,5 @@ latex_elements = {
|
|||||||
latex_logo = '_static/wtf_coop_header.png'
|
latex_logo = '_static/wtf_coop_header.png'
|
||||||
latex_show_urls = 'footnote'
|
latex_show_urls = 'footnote'
|
||||||
|
|
||||||
epub_cover = ('_static/wtf_coop_header.png', 'epub-cover.html')
|
epub_theme = 'wtf_epub'
|
||||||
|
epub_cover = ('_static/epub_cover.png', 'epub-cover.html')
|
1
source/handbuch
Submodule
@ -11,14 +11,12 @@ RTFM - Das Handbuch zur wtf Kooperative eG
|
|||||||
:caption: Contents:
|
:caption: Contents:
|
||||||
|
|
||||||
handbuch/intro.md
|
handbuch/intro.md
|
||||||
handbuch/dienste.md
|
handbuch/organisation.md
|
||||||
handbuch/FAQ.md
|
|
||||||
handbuch/Aufnahmeprozess.md
|
handbuch/Aufnahmeprozess.md
|
||||||
handbuch/Wegweiser.md
|
handbuch/Wegweiser.md
|
||||||
handbuch/Auszahlung.md
|
|
||||||
handbuch/RaaS.md
|
handbuch/RaaS.md
|
||||||
handbuch/AG-Einkauf.md
|
handbuch/Auszahlung.md
|
||||||
|
handbuch/FAQ.md
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
@ -1,20 +0,0 @@
|
|||||||
# Minimal makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line, and also
|
|
||||||
# from the environment for the first two.
|
|
||||||
SPHINXOPTS ?=
|
|
||||||
SPHINXBUILD ?= sphinx-build
|
|
||||||
SOURCEDIR = source
|
|
||||||
BUILDDIR = build
|
|
||||||
|
|
||||||
# Put it first so that "make" without argument is like "make help".
|
|
||||||
help:
|
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
||||||
|
|
||||||
.PHONY: help Makefile
|
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
||||||
%: Makefile
|
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@ -1,5 +0,0 @@
|
|||||||
# Installation
|
|
||||||
|
|
||||||
1. Virtuelle Pythonumgebung erstellen: ```python3 -m venv venv```
|
|
||||||
2. Virtuelle Umgebung aktivieren: ```source venv/bin/activate```
|
|
||||||
3. Pakete aus ```requirements.txt``` installieren: ```pip install -r requirements.txt```
|
|
@ -1 +0,0 @@
|
|||||||
../../handbuch/
|
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
23
theme/wtf_epub/epub-cover.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{#
|
||||||
|
epub/epub-cover.html
|
||||||
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Sample template for the html cover page.
|
||||||
|
|
||||||
|
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||||
|
:license: BSD, see LICENSE for details.
|
||||||
|
#}
|
||||||
|
{%- extends "layout.html" %}
|
||||||
|
{%- block header %}{% endblock %}
|
||||||
|
{%- block rootrellink %}{% endblock %}
|
||||||
|
{%- block relbaritems %}{% endblock %}
|
||||||
|
{%- block sidebarlogo %}{% endblock %}
|
||||||
|
{%- block linktags %}{% endblock %}
|
||||||
|
{%- block relbar1 %}{% endblock %}
|
||||||
|
{%- block sidebar1 %}{% endblock %}
|
||||||
|
{%- block sidebar2 %}{% endblock %}
|
||||||
|
{%- block footer %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="epub-cover" style="background-image: url('{{ image }}');"></div>
|
||||||
|
{% endblock %}
|
9
theme/wtf_epub/static/css/style.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
.epub-cover {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
3
theme/wtf_epub/theme.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[theme]
|
||||||
|
inherit = epub
|
||||||
|
stylesheet = css/style.css
|