-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
727 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,8 @@ | |
*.egg-link | ||
|
||
/nosetests.xml | ||
/.cache | ||
/.pytest_cache | ||
/.coverage | ||
/.tox | ||
/.achievements | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: python | ||
dist: xenial | ||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
before_install: | ||
- python -m pip install -U pip setuptools | cat | ||
install: | ||
- python -m pip install -U -r requirements.txt | cat | ||
- pip install . | ||
script: | ||
- pytest | ||
- flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Changelog for yaml2rst | ||
========================= | ||
|
||
0.3 (2019-04-03) | ||
---------------- | ||
|
||
* Add options ``--strip-regex`` and ``--yaml-strip-regex`` for | ||
filtering out Fold markers. See docs/fold-markers.rst for details. | ||
* Add an example for formatting as definition lists. | ||
* Make examples' HTML-build deterministic by removing the version | ||
number. | ||
* Add support for Python 3. | ||
* Convert the module into a package. | ||
* Enhance the test-suite. | ||
* Move the project to the `debops` group for shared development. | ||
* Enable CI-tests (at Travis-CI). | ||
|
||
|
||
.. | ||
Local Variables: | ||
mode: rst | ||
ispell-local-dictionary: "american" | ||
End: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# dummy MANIFEST.in to keep zest.releaser calm | ||
# unused since the source is in a git repository | ||
# | ||
#recursive-include docs * | ||
#include * | ||
global-exclude *.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ A Simple Tool and Python-Module for Documenting YAML Files | |
-------------------------------------------------------------------------- | ||
|
||
:Author: Hartmut Goebel <[email protected]> | ||
:Copyright: 2015 by Hartmut Goebel | ||
:Copyright: 2015-2019 by Hartmut Goebel | ||
:Licence: GNU General Public Licence v3 or later (GPLv3+) | ||
|
||
|
||
|
@@ -21,14 +21,19 @@ allows to process the YAML file directly without any pre-processing. | |
|
||
Usage:: | ||
|
||
yaml2rst [-h] infile outfile | ||
yaml2rst [-h] [--strip-regex regex] infile outfile | ||
|
||
positional arguments: | ||
infile YAML-file to read (`-` for stdin) | ||
outfile rst-file to write (`-` for stdout) | ||
infile YAML-file to read (`-` for stdin) | ||
outfile rst-file to write (`-` for stdout) | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
-h, --help show this help message and exit | ||
--strip-regex regex Regex which will remove everything it matches. Can be | ||
used to remove fold markers from headings for example. | ||
Example to strip out [[[,]]] fold markers: | ||
'\s*(:?\[{3}|\]{3})\d?$'. Check the README for more | ||
details. | ||
|
||
|
||
How it works | ||
|
@@ -43,13 +48,34 @@ Additionally at the start and at the end of a "code"-block, lines are | |
added as required by reStructuredText. Also at the begin of a | ||
"code"-block, a ``::`` is added if required. | ||
|
||
``--strip-regex`` can be used to remove matching characters from text-lines | ||
when needed. Refer to documentation about | ||
`Folding marks support <docs/fold-markers.rst>`_ for details. | ||
|
||
|
||
Examples | ||
------------- | ||
|
||
You can find example yaml-input, rst-output and generated html in the | ||
examples directory. You may also view the generated html online at | ||
https://rawgit.com/htgoebel/yaml2rst/develop/examples/main.html. | ||
https://rawgit.com/debops/yaml2rst/develop/examples/main.html. | ||
|
||
|
||
Related Tools | ||
--------------------- | ||
|
||
* `yaml4rst <https://pypi.org/project/yaml4rst/>`_ is a | ||
linting/checking/reformatting tool for YAML files documented with | ||
inline RST which goes hand in hand with yaml2rst. | ||
|
||
|
||
Maintainers | ||
--------------------- | ||
|
||
`yaml2rst` was originally developed 2015 and maintained by Hartmut | ||
Goebel. In 2019 the project moved to the `debops` project for which | ||
`yaml2rst` was developed. | ||
|
||
|
||
.. | ||
Local Variables: | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.