Skip to content

Commit

Permalink
Fixed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tamere-allo-peter committed Mar 15, 2022
1 parent 8fb6519 commit cb7b86d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,38 @@ python3 -m pip install yamlfixer-opt-nc
This software automatically fixes some errors and warnings reported by
`yamllint`.



```shell
$ yamlfixer [--debug] [--verbose] [--backup] *.yml - thisfile.yaml
yamlfixer --help
usage: yamlfixer [-h] [-v] [-b] [-d] [-j | -s] [file [file ...]]

Fix formatting problems in YAML documents. If no file is specified,
then reads input from `stdin`.

positional arguments:
file the YAML files to fix. Use `-` to read from `stdin`.

optional arguments:
-h, --help show this help message and exit
-v, --version display this program's version number
-b, --backup make a backup copy of original files as `.orig`
-d, --debug output debug information to stderr.
-j, --jsonsummary output JSON summary to stderr.
-s, --summary output plain text summary to stderr.
```
or:

```shell
$ yamlfixer [--help] [--version]
```

This will launch `yamllint` on each specified filename, then parse its
output and try to fix the reported problems. The special filename `-`
means `stdin`, and is assumed if there's no other filename argument.
yamlfixer launches `yamllint` on each specified filename, then parses
its output and try to fix the reported problems. The special filename
`-` means `stdin`, and is assumed if there's no other filename
argument.

If input is read from `stdin`, the corrected output will be sent to
`stdout`.

Other files will be overwritten if needed. Original files,
`stdin` excepted, can be preserved as `.orig` if the `--backup`
command line option is used.

Diagnostic information is sent to stderr in verbose or debug modes.
Both summaries and diagnostic information are sent to stderr.

This command exits with `-2` if yamllint is not available on your
system. Otherwise it exits with `0` if all input files either are
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
version = 0.3.0
version = 0.3.1
name = yamlfixer-opt-nc
description = automates the fixing of problems reported by yamllint
long_description = file: README.md
Expand All @@ -11,7 +11,8 @@ long_description_content_type = text/markdown
url = https://github.com/opt-nc/yamlfixer
project_urls =
Bug Tracker = https://github.com/opt-nc/yamlfixer/issues
Releases = https://github.com/opt-nc/yamlfixer/releases
GitHub Releases = https://github.com/opt-nc/yamlfixer/releases
Files = https://pypi.org/project/yamlfixer-opt-nc/#files
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Expand Down
2 changes: 1 addition & 1 deletion yamlfixer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import argparse
import json

__version__ = "0.3.0"
__version__ = "0.3.1"
__author__ = "OPT-NC"
__license__ = "GPLv3+"
__copyright__ = "Copyright (C) 2021-%s %s" % (time.strftime("%Y",
Expand Down

0 comments on commit cb7b86d

Please sign in to comment.