README.adoc
:toc: [id="readme"] = README: The `newdoc` script [id="installation"] == How do I install the script? The script is now compatible with both Python 3 (for Fedora and community distributions) and Python 2.7 (for RHEL 7 and macOS). It hasn't been tested on Windows. [discrete] === Procedure . Clone this repository somewhere on your system: + [subs=+quotes] ---- $ git clone git@gitlab.cee.redhat.com:ccs-tools/newdoc.git ---- . In your shell configuration, add an alias to the `newdoc` script. + ** If you are using Fedora or a community Linux distribution: + [subs=+quotes] ---- alias newdoc="python**3** _path-to-cloned-repo_/newdoc.py" ---- + For example, if you are using the `bash` shell, you might add something like the following in your `~/.bashrc` file: + [subs=+quotes] ---- alias newdoc="python3 __/home/msuchane/RH/newdoc/__newdoc.py" ---- ** If you are using RHEL 7: + [subs=+quotes] ---- alias newdoc="python**2** __/home/msuchane/RH/newdoc/__newdoc.py" ---- + For example, if you are using the `bash` shell, you might add something like the following in your `~/.bashrc` file: + [subs=+quotes] ---- alias newdoc="python2 __/home/msuchane/RH/newdoc/__newdoc.py" ---- ** If you are using macOS: + [subs=+quotes] ---- alias newdoc="python**2** __/Users/msuchane/RH/newdoc/__newdoc.py" ---- + For example, if you are using the `bash` shell, you might add something like the following in your `~/.bashrc` file: + [subs=+quotes] ---- alias newdoc="python2 __/Users/msuchane/RH/newdoc/__newdoc.py" ---- If you prefer `newdoc` to generate file without the explanatory comments, change the alias to include the `--no-comments` option: [subs=+quotes] ---- alias newdoc="_python3_ __/home/msuchane/RH/newdoc/__newdoc.py *--no-comments*" ---- [id="new-module"] == How do I add a new module? [discrete] === Prerequisites * Install the script. See xref:installation[] for details. [discrete] === Procedure . In the directory where modules are located, use the `newdoc` script to create a new file: + [subs=+quotes] ---- _modules-dir_]$ newdoc _--procedure_ "_Setting up thing_" ---- + The script also accepts the `--concept` and `--reference` options. You can use these short forms instead: `-p`, `-c`, and `-r`. . Rewrite the information in the template with your docs. [id="new-assembly"] == How do I add a new assembly? [discrete] === Prerequisites * Install the script. See xref:installation[] for details. [discrete] === Procedure . In the directory where assemblies are located, use the `newdoc` script to create a new file: + [subs=+quotes] ---- _assemblies-dir_]$ newdoc --assembly "_Achieving thing_" ---- + You can use the short form of the option instead: `newdoc -a "_Achieving thing_"`. . Rewrite the information in the template with your docs. + Add AsciiDoc include statements to include modules. See link:https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files[Include Files] in the AsciiDoc Syntax Quick Reference. == Additional resources * link:https://redhat-documentation.github.io/modular-docs/[Modular Documentation Reference Guide] * link:https://redhat-documentation.github.io/asciidoc-markup-conventions/[AsciiDoc Mark-up Quick Reference for Red Hat Documentation]