From e741e6d52f57e70146a782c8e84ac77c2e6890d5 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 15 Oct 2021 10:39:33 +1100 Subject: [PATCH] Man page wip --- pkg/yqlib/doc/headers/Main.md | 17 ++++++++++++++--- scripts/genman.sh | 9 ++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/pkg/yqlib/doc/headers/Main.md b/pkg/yqlib/doc/headers/Main.md index 67b17f90..2ccac8b4 100644 --- a/pkg/yqlib/doc/headers/Main.md +++ b/pkg/yqlib/doc/headers/Main.md @@ -1,11 +1,19 @@ # NAME - *yq* is a portable command-line YAML processor (https://github.com/mikefarah/yq/) + *yq* is a portable command-line YAML processor # SYNOPSIS + +yq [eval/eval-all] [expression] files.. + +eval/e - Apply the expression to each document in each yaml file in sequence + +eval-all/ea - Loads all yaml documents of all yaml files and runs expression once + +# DESCRIPTION + a lightweight and portable command-line YAML processor. `yq` uses [jq](https://github.com/stedolan/jq) like syntax but works with yaml files as well as json. It doesn't yet support everything `jq` does - but it does support the most common operations and functions, and more is being added continuously. -This documentation is also available at https://mikefarah.gitbook.io/yq/. - +This documentation is also available at https://mikefarah.gitbook.io/yq/ # QUICK GUIDE ## Read a value: @@ -48,3 +56,6 @@ See the [documentation](https://mikefarah.gitbook.io/yq/) for more. - `yq` attempts to preserve comment positions and whitespace as much as possible, but it does not handle all scenarios (see https://github.com/go-yaml/yaml/tree/v3 for details) - Powershell has its own...opinions: https://mikefarah.gitbook.io/yq/usage/tips-and-tricks#quotes-in-windows-powershell +# BUGS / ISSUES / FEATURE REQUESTS + +Please visit the GitHub page https://github.com/mikefarah/yq/. \ No newline at end of file diff --git a/scripts/genman.sh b/scripts/genman.sh index 93a3bdc5..5f2099ba 100755 --- a/scripts/genman.sh +++ b/scripts/genman.sh @@ -18,4 +18,11 @@ for f in ./pkg/yqlib/doc/*.md; do done -pandoc --variable=title:"yq" --variable=section:"1" --variable=author:"Mike Farah" --standalone --to man man.md -o yq.1 \ No newline at end of file +header=$(./yq --version) + +pandoc \ + --variable=title:"YQ" \ + --variable=section:"1" \ + --variable=author:"Mike Farah" \ + --variable=header:"${header}" \ + --standalone --to man man.md -o yq.1 \ No newline at end of file