quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

MANPAGE.md (3971B)


      1 <!--
      2   Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 
      4   SPDX-License-Identifier: curl
      5 -->
      6 
      7 # curl man page generator
      8 
      9 `managen` is the curl man page generator. It generates a single nroff man page
     10 output from the set of sources files in this directory.
     11 
     12 The `mainpage.idx` file lists all files that are rendered in that order to
     13 produce the output. The magic `%options` keyword inserts all command line
     14 options documented.
     15 
     16 The `%options` documentation is created with one source file for each
     17 supported command line option.
     18 
     19 The documentation file format is described below. It is meant to look similar
     20 to markdown which is why it uses `.md` file extensions.
     21 
     22 ## Option files
     23 
     24 Each command line option is described in a file named `<long name>.d`, where
     25 option name is written without any prefixing dashes. Like the filename for the
     26 `-v, --verbose` option is named `verbose.d`.
     27 
     28 Each file has a set of meta-data in the top of the file, followed by a body of
     29 text.
     30 
     31 The documentation files that do not document options have no meta-data part.
     32 
     33 A line that starts with `<!--` is a comment. It should also end with `-->`.
     34 
     35 ### Meta-data
     36 
     37     --- (start of meta-data)
     38     Added: (version number in which this was added)
     39     Arg: (the argument the option takes)
     40     c: (copyright line)
     41     Example:
     42       - (an example command line, without "curl" and can use `$URL`)
     43       - (another example)
     44     Experimental: yes (if so)
     45     Help: (short text for the --help output for this option)
     46     Long: (long form name, without dashes)
     47     Magic: (description of "magic" options)
     48     Multi: single/append/boolean/mutex/custom/per-URL (if used more than once)
     49     Mutexed: (space separated list of options this overrides, no dashes)
     50     Protocols: (space separated list for which protocols this option works)
     51     Requires: (space separated list of features this requires, no dashes)
     52     Scope: global (if the option is global)
     53     See-also:
     54       - (a related option, no dashes)
     55       - (another related option, no dashes)
     56     Short: (single letter, without dash)
     57     SPDX-License-Identifier: curl
     58     Tags: (space separated list)
     59     --- (end of meta-data)
     60 
     61 ### Body
     62 
     63 The body of the description. Only refer to options with their long form option
     64 version, like `--verbose`. The output generator replaces such option with the
     65 correct markup that shows both short and long version.
     66 
     67 Text written within `*asterisks*` is shown using italics. Text within two
     68 `**asterisks**` is shown using bold.
     69 
     70 Text that is prefixed with a space is treated like an "example" and gets
     71 output in monospace.
     72 
     73 Within the body, describe a list of items like this:
     74 
     75     ## item 1
     76     description
     77 
     78     ## item 2
     79     second description
     80 
     81 The list is automatically terminated at end of file, or you can do it
     82 explicitly with an empty "header":
     83 
     84     ##
     85 
     86 Angle brackets (`<>`) need to be escaped when used in text like `\<` and
     87 `\>`. This, to ensure that the text renders nicely as markdown.
     88 
     89 ### Headers
     90 
     91 The `#` header can be used by non-option files and it produces a
     92 `.SH` output.
     93 
     94 If the `#` header is used for a command line option file, that header is
     95 simply ignored in the generated output. It can still serve a purpose in the
     96 source file as it helps the user identify what option the file is for.
     97 
     98 ### Variables
     99 
    100 There are three different "variables" that can be used when creating the
    101 output. They need to be written within backticks in the source file (to escape
    102 getting spellchecked by CI jobs): `%DATE`, `%VERSION` and `%GLOBALS`.
    103 
    104 ## Generate
    105 
    106 `managen mainpage [list of markdown option file names]`
    107 
    108 This command outputs a single huge nroff file, meant to become `curl.1`. The
    109 full curl man page.
    110 
    111 `managen ascii [list of markdown option file names]`
    112 
    113 This command outputs a single text file, meant to become `curl.txt`. The full
    114 curl man page in text format, used to build `tool_hugehelp.c`.
    115 
    116 `managen listhelp`
    117 
    118 Generates a full `curl --help` output for all known command line options.