|
| 1 | +# Render Mandoc Example |
| 2 | + |
| 3 | +This example shows how to render man pages from your bashly commands, and how |
| 4 | +to use custom properties to add more information to the man page. |
| 5 | + |
| 6 | +This example was generated with: |
| 7 | + |
| 8 | +```bash |
| 9 | +$ bashly init --minimal |
| 10 | +# ... now edit src/bashly.yml to match the example ... |
| 11 | +$ bashly render :mandoc docs |
| 12 | +``` |
| 13 | + |
| 14 | +----- |
| 15 | + |
| 16 | +## `bashly.yml` |
| 17 | + |
| 18 | +```yaml |
| 19 | +name: download |
| 20 | +help: Sample application |
| 21 | +version: 0.1.0 |
| 22 | + |
| 23 | +# Optional, custom properties that are used by the mandoc renderer |
| 24 | +x_mandoc_authors: Lana Lang |
| 25 | +x_mandoc_footer: |- |
| 26 | + # ISSUE TRACKER |
| 27 | +
|
| 28 | + Report issues at <https://github.com/lanalang/smallville> |
| 29 | +
|
| 30 | +dependencies: |
| 31 | + aws-cli: Download from <https://aws.amazon.com/cli/> |
| 32 | + |
| 33 | +args: |
| 34 | +- name: source |
| 35 | + required: true |
| 36 | + allowed: [server1, server2] |
| 37 | + repeatable: true |
| 38 | + help: Source to download from |
| 39 | +- name: target |
| 40 | + help: "Target filename (default: same as source)" |
| 41 | + |
| 42 | +flags: |
| 43 | +- long: --force |
| 44 | + short: -f |
| 45 | + help: Overwrite existing files |
| 46 | +- long: --debug |
| 47 | + short: -d |
| 48 | + help: Show debug information |
| 49 | +``` |
| 50 | +
|
| 51 | +
|
| 52 | +
|
| 53 | +## Generated script output |
| 54 | +
|
| 55 | +### `$ man docs/download.1 | col -bx` |
| 56 | + |
| 57 | +```shell |
| 58 | +download(1) Sample minimal application without commands download(1) |
| 59 | +
|
| 60 | +NAME |
| 61 | + download - Sample minimal application without commands |
| 62 | +
|
| 63 | +SYNOPSIS |
| 64 | + download SOURCE... [TARGET] OPTIONS |
| 65 | +
|
| 66 | +DESCRIPTION |
| 67 | + Sample minimal application without commands |
| 68 | +
|
| 69 | +ARGUMENTS |
| 70 | + SOURCE Source to download from |
| 71 | +
|
| 72 | + • Required |
| 73 | +
|
| 74 | + • Repeatable |
| 75 | +
|
| 76 | + • Allowed Values: server1, server2 |
| 77 | +
|
| 78 | + TARGET Target filename (default: same as source) |
| 79 | +
|
| 80 | +OPTIONS |
| 81 | + --force, -f |
| 82 | + Overwrite existing files |
| 83 | +
|
| 84 | + --debug, -d |
| 85 | + Show debug information |
| 86 | +
|
| 87 | +DEPENDENCIES |
| 88 | + aws-cli |
| 89 | + Download from <https://aws.amazon.com/cli/> |
| 90 | +
|
| 91 | +ISSUE TRACKER |
| 92 | + Report issues at <https://github.com/lanalang/smallville> |
| 93 | +
|
| 94 | +AUTHORS |
| 95 | + Lana Lang. |
| 96 | +
|
| 97 | +Version 0.1.0 August 2023 download(1) |
| 98 | +
|
| 99 | +
|
| 100 | +``` |
| 101 | + |
| 102 | + |
| 103 | + |
0 commit comments