Skip to content
Snippets Groups Projects
Commit a8346496 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Documentation work.

parent 8f03f81f
No related branches found
No related tags found
No related merge requests found
muppet*.rst
muppet.*.rst
modules.rst
Gathering information
=====================
For each module (``get_module``)
run ``puppet-strings`` (todo hyperlink) on the module, using the hash
of ``metadata.json`` as the cache key
Manual documentation files
--------------------------
``*.md`` + ``LICENSE``
Parsing Puppet Code
-------------------
``puppet strings --format json`` is run, generating a json
representation of the Puppet code. However, this format is overly
verbose. So it's passed to ``muppet.puppet.parser.puppet_parser``
(TODO link) which transforms it into a much simpler json tree.
This is then passed to ``muppet.puppet.ast.build_ast`` (TODO link)
which creates an AST in python objects.
These modes can be tested with
.. code-block:: sh
python -m muppet.puppet {parser,ast,serialize}
Formatting Output
=================
.. toctree::
syntax-highlighting
......@@ -6,13 +6,17 @@
Welcome to Muppet Strings's documentation!
==========================================
Muppet Strings is a tool for documenting entire Puppet environments.
.. toctree::
:maxdepth: 2
:maxdepth: 3
:caption: Contents:
modules
Here is some content.
doc-gather
output-formats
syntax-highlighting
parser-combinator
muppet
Indices and tables
==================
......
muppet package
==============
Subpackages
-----------
.. toctree::
:maxdepth: 4
muppet.puppet
muppet.syntax_highlight
Submodules
----------
.. toctree::
:maxdepth: 4
muppet.breadcrumbs
muppet.cache
muppet.format
muppet.gather
muppet.intersperse
muppet.lookup
muppet.markdown
muppet.output
muppet.parser_combinator
muppet.symbols
muppet.tabs
muppet.templates
muppet.util
Module contents
---------------
.. automodule:: muppet
:members:
:undoc-members:
:show-inheritance:
Output Formats
==============
TODO something here about how output can be generated (see
muppet.puppet.format)
Output is handled module per module.
- index.html
- *REFERENCE*/index.html
- ...
- manifests/
- *classname*
- index.html
- source.pp.html
- source.pp.txt
- ...
For each *class* (or *resource*, *type-alias*, ...) a directory is
generated. The index.html contains the documentation for the class,
followed by the source code, but syntax highlighted and hyperlinked.
TODO link to parser combinator usage here.
TODO source.pp.html isn't needed since "rendered" now contains the
original source code.
source.pp.txt contains the unaltered source, as it appeared on disk.
Parser Combinator
=================
Syntax Highlighting
===================
andre simons
plain
pygments
__init__ finds best possible match
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment