1- ``docopt.cpp ``: A C++11 port of the Python `` docopt ``
2- =====================================================
3- creates *beautiful * command-line interfaces
4- -------------------------------------------
1+ ``docopt.cpp ``: A C++11 Port
2+ ============================
3+ doctopt creates *beautiful * command-line interfaces
4+ ---------------------------------------------------
55
66Isn't it awesome how ``getopt `` (and ``boost::program_options `` for you fancy
77folk!) generate help messages based on your code?! These timeless functions
@@ -64,7 +64,7 @@ that. The basic idea is that *a good help message has all necessary
6464information in it to make a parser *.
6565
6666C++11 port details
67- ======================================================================
67+ ---------------------------------------------------
6868
6969This is a port of the ``docopt.py `` module (https://github.com/docopt/docopt),
7070and we have tried to maintain full feature parity (and code structure) as the
@@ -85,18 +85,18 @@ use this code under the terms of either license.
8585
8686The differences from the Python port are:
8787
88- * the addition of a ``docopt_parse `` function, which does not terminate
89- the program on error
90- * a ``docopt::value `` type to hold the various value types that can be parsed.
91- We considered using boost::variant, but it seems better to have no external
92- dependencies (beyond a good STL).
93- * because C++ is statically-typed and Python is not, we had to make some
94- changes to the interfaces of the internal parse tree types.
95- * because ``std::regex `` does not have an equivalent to Python's regex.split,
96- some of the regex's had to be restructured and additional loops used.
88+ * the addition of a ``docopt_parse `` function, which does not terminate
89+ the program on error
90+ * a ``docopt::value `` type to hold the various value types that can be parsed.
91+ We considered using boost::variant, but it seems better to have no external
92+ dependencies (beyond a good STL).
93+ * because C++ is statically-typed and Python is not, we had to make some
94+ changes to the interfaces of the internal parse tree types.
95+ * because ``std::regex `` does not have an equivalent to Python's regex.split,
96+ some of the regex's had to be restructured and additional loops used.
9797
9898API
99- ======================================================================
99+ ---------------------------------------------------
100100
101101.. code :: c++
102102
@@ -174,7 +174,7 @@ the return dictionary will be:
174174 " <y>" : " 150" }
175175
176176 Help message format
177- ======================================================================
177+ ---------------------------------------------------
178178
179179Help message consists of 2 parts:
180180
@@ -373,7 +373,7 @@ we implemented a subset of git command-line interface as an example:
373373`examples/git
374374<https://github.com/docopt/docopt/tree/master/examples/git> `_
375375
376- Compiling the code and running the tests
376+ Compiling the example / Running the tests
377377----------------------------------------------------------------------
378378The original Python module includes some language-agnostic unit tests,
379379and these can be run with this port as well.
@@ -394,7 +394,7 @@ example.cpp)::
394394 [ ... ]
395395
396396Development
397- ======================================================================
397+ ---------------------------------------------------
398398
399399Comments and suggestions are *very * welcome! If you find issues, please
400400file them and help improve our code!
@@ -405,7 +405,7 @@ we might want to first negotiate these changes into the Python code first.
405405However, bring it up! Let's hear it!
406406
407407Changelog
408- ======================================================================
408+ ---------------------------------------------------
409409
410410**docopt ** follows `semantic versioning <http://semver.org >`_. The
411411first release with stable API will be 1.0.0 (soon).
0 commit comments