challenge:
convert debian-policy doc from docbook to Sphinx
proposal: move forward to modern environment
Hideki Yamane <henrich@debian.org>
Why move away from docbook?
Why Sphinx?
Sphinx?
Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.
Debian Policy: output format
Sphinx supports:
HTML, LaTeX (PDF), ePub,�Plain Text, Texinfo, manual pages�
convert docbook .xml to .rst via pandoc
Pandoc issue
Pandoc issue
- `section\_title <#s-fhs>`__�+ :ref:`s-fhs`
- ```Format`` <#s-f-Format>`__�+ :ref:`Format <s-f-Format>`
-`Control files and their fields <#ch-controlfields>`__.�+:doc:`Control files and their fields <ch-controlfields>`.
Pandoc issue
Pandoc issue
Demo: Pandoc issue
Sphinx: strong point
Sphinx: modern look
Sphinx: “theme” feature
You can change HTML visual via“jinja2” template (I’m not sure…)�see http://www.sphinx-doc.org/en/stable/theming.html
Limitation in Sphinx compared to docbook
Demo
$ sudo apt install python-sphinx python-pip�$ pip install sphinx-intl; export PATH=~/.local/bin:$PATH�$ git clone https://github.com/henrich/policydoc�$ cd policydoc �$ git checkout restructure�$ make -f sphinx-makefile html��$ cd source; sphinx-build . ../build/html -D language='ja' -D html_file_suffix=.ja.html
Not yet
… Maybe need to discuss sphinx upstream to improve it.
Conclusion→Next step?