Skip to content

Commit

Permalink
README fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknyquist committed Oct 22, 2023
1 parent f54c289 commit 51fad12
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 51fad12

Please sign in to comment.