Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

convert SGML guide to RST #241

Merged
merged 16 commits into from
Mar 25, 2017
Merged

Conversation

anarcat
Copy link
Contributor

@anarcat anarcat commented Mar 25, 2017

the rationale behind switching away from SGML/Docbook is the following:

  • SGML is hard to edit for humans
  • the output is not much prettier
  • the toolchain is not well supported and missing from the build
  • the build is not hooked into anywhere, no automation

the reason why RST was chosen:

  • it allows for a strong structure like Docbook
  • the theme from Read The Docs is pretty
  • it also supports mobile devices
  • sphinx can easily output to PDF and ePUB formats
  • RST is plaintext that can be easily edited and diff'd
  • RST can be automatically built by ReadTheDocs and the toolchain is
    readily available
  • the output is also parsed by Github so documentation can be read
    straight from GH

the reason why Markdown was not chosen:

  • the current strong structure would be hard to replicate
  • markdown is not standardized and output varies according to the
    implementation

the docs were converted with Pandoc, using the following commands:

mkdir oper-guide
for source in sgml/oper-guide/*.sgml; do
    pandoc --toc -s -f docbook -t rst $source -o oper-guide/$(basename $source .sgml).rst
done
cd oper-guide
sphinx-quickstart
git add *.rst make.bat conf.py
git add -f Makefile
git rm -r ../sgml

the rationale behind switching away from SGML/Docbook is the following:

 * SGML is hard to edit for humans
 * the output is not much prettier
 * the toolchain is not well supported and missing from the build
 * the build is not hooked into anywhere, no automation

the reason why RST was chosen:

 * it allows for a strong structure like Docbook
 * the theme from Read The Docs is pretty
 * it also supports mobile devices
 * sphinx can easily output to PDF and ePUB formats
 * RST is plaintext that can be easily edited and diff'd
 * RST can be automatically built by ReadTheDocs and the toolchain is
   readily available
 * the output is also parsed by Github so documentation can be read
   straight from GH

the reason why Markdown was not chosen:

 * the current strong structure would be hard to replicate
 * markdown is not standardized and output varies according to the
   implementation

the docs were converted with Pandoc, using the following commands:

    mkdir oper-guide
    for source in sgml/oper-guide/*.sgml; do
        pandoc --toc -s -f docbook -t rst $source -o oper-guide/$(basename $source .sgml).rst
    done
    cd oper-guide
    sphinx-quickstart
    git add *.rst make.bat conf.py
    git add -f Makefile
    git rm -r ../sgml
turn all +flags into preformatted flags, fix admonitions
@anarcat
Copy link
Contributor Author

anarcat commented Mar 25, 2017

result should look like this, more or less: http://anarcat-charybdis.readthedocs.io/en/rst-guide/

@aaronmdjones aaronmdjones merged commit 8b96afb into charybdis-ircd:release/3.5 Mar 25, 2017
@anarcat anarcat deleted the rst-guide branch March 25, 2017 20:24
@anarcat
Copy link
Contributor Author

anarcat commented Mar 27, 2017

i created a charybdis project on RTD to build those docs automatically in https://readthedocs.org/projects/charybdis/

however, it has trouble syncing webhooks here, which means it's not automatic just yet. this is probably because i don't have the right credentials, which was reported against rtd.org here: readthedocs/readthedocs.org#2746

i would be happy to grant developers here access to the docs project, let me know what your RTD username is and I'll add you.

@anarcat
Copy link
Contributor Author

anarcat commented Mar 27, 2017

now the build is fixed:

http://charybdis.readthedocs.io/en/latest/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants