From 51fad12b1a0155ae00fb3855967c0067caf61cb7 Mon Sep 17 00:00:00 2001 From: Erik Nyquist Date: Sun, 22 Oct 2023 14:16:42 -0700 Subject: [PATCH] README fixes --- README.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 83e8ed2..6d24675 100644 --- a/README.rst +++ b/README.rst @@ -29,8 +29,11 @@ Install with pip (python 3x required): pip install duckargs -Example -======= +Examples +======== + +Generating python code +###################### To generate python code, run duckargs from the command line via ``duckargs`` or ``duckargs-python``, followed by whatever arguments/options/flags you want your program to accept, and duckargs will @@ -79,13 +82,20 @@ The output of the above command looks like this: if __name__ == "__main__": main() -For generating C code, the process is the same, except you should call ``duckargs-c`` +Generating python code +###################### + +For generating C code, the process is the same as for python code, except you should call ``duckargs-c`` instead of ``duckargs-python``: :: $ duckargs-c positional_arg1 positional_arg2 -i --int-val 4 -f 3.3 -f --file FILE -F --otherfile FILE -a -b -c +The output of the above command looks like this: + +.. code:: c + // Generated by duckargs, invoked with the following arguments: // positional_arg1 positional_arg2 -i --int-val 4 -e 3.3 -f --file FILE -F --otherfile FILE -a -b -c