docs

command
v0.0.0-...-b1bb88e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2021 License: LGPL-2.1 Imports: 12 Imported by: 0

README

Documentation

OCP node documentation. It does document node specific topics like DML language and WAMP api. No general OCP documentation is provided here, that is in the documentation repository. The documentation tool of choice is sphinx, and hence all documentation is written in restructured text.

Toolchain

The docs are partially handwritten (see folder ocpsource) and partially autogenerated from the source via the docgen executable. This allows to have API documentation rigth where it is implemented, and hence is way easier to keep up to data. Compiling and running the docgen extracts all marked source file comments into .rst files according to the comment instructions. Those generated .rst files are included in the handwritten files. Note that generated files are not added to git and must be created everytime one wants to generate the documentation

  • Source comments with the "+extract" tag are added to packagename.rst. If a custom filename should be used one can specify it via target:name
  • ordering of comments in a file can be manipulated by adding prio:num (same prio comments are ordered by order of encounter)
  • adding indent in the source file can be achieved by indent:num (num being the number of tabs)

Generate docs

For previewing the OCP node docs one can generate them directly with a basic layot using sphinx

go run docgen.go 
make html

The result can be viewed via build/html/index.html. Of course all other sphinx outputs like epub are suported.

Automation

The purpose of this documentation is to be integrated into the general OCP documentation, as there should be only a single documentation resource in the end. Therefore a github action is setup to automatically generate all source files and pushes them into the OCP documentation repository. This happens on every push to the github master.

Documentation

Overview

 	A little tool to extract documentation

	It processes two sources into rst files:
	- Source comments with the "+extract" tag are added to packagename.rst
	  - ordering of comments can be manipulated by adding prio:num (same prio
	    comments are ordered by order of encounter)
	  - adding indent can be achieved by indent:num (num being the number
	    of tabs)

	- CLI help information into cli.rst

	It should be build and run in this folder, as it uses the relative path to
	find the OCP source code

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL