shomen-yard - generate shomen documentation via yard
shomen-yard [<options>...] [scripts...] - [documents...]
shomen-yard tool is a stand-alone command line tool that can generate
Shomen-formatted documentation from a YARD documentation cache (e.g.
shomen-yard tool can be installed the via RubyGems.
$ gem install shomen-yard
shomen-yard tool is similar to using the
yard command line tool to generate
.yardoc cache. Usage will look something likes this:
$ shomen-yard -r README.rdoc -t "My Docs" lib - [A-Z]*.*
However, it is more helpful to make sure you project has a
.yardopts configuration file.
shomen-yard to work with minimal need of command-line options. With such in
place the command can be simplified:
The .yardoc cache can be pre-generated using YARD.
$ yard -n -b .yardoc lib
-b .yardoc is the default, so it can be left out. Then Shomen can use the cache
without regenerating it via the
$ shomen-yard -c
If the cache is stored elsewhere then the standard
.yardoc location, inform shomen-yard
of the location using the
$ shomen-yard -c -d .yardalt
In all these examples the output has been going to $stdout. To use the output we want to save it to a file. Simply redirect the output to the file.
$ shomen-yard > doc.json
It is a good idea to version your documentation.
$ shomen-yard > doc/myapp-1.0.0.json
Though JSON tends to be the format used by viewers, it can also output YAML.
$ shomen-yard -y > doc/myapp-1.0.0.yaml
Output JSON instead of YAML (default).
Output YAML instead of JSON.
Documentation store directory (default is
Do not regenerate docs, use pre-existing cache.
Include full source in script documentation.
Prefix link to source code.
Specify which document serves as the README file. If not given
the default is the first file found that matches "README*".
Markup type used for comments (rdoc, md).
Title to be used when presenting documentation. If not given
the title is looked for in project metadata and will fallback
to the project's name capitalized.
Force overwrite of preexisting documentation.
Run command with Ruby's $DEBUG flag set to
Run with $VERBOSE set to true.
Display command line help message.
shome-yard -r README.md -t "MyApp Docs" lib - [A-Z]*.*