8000 README: more formatting updates · JasCodes/docopt.cpp@856d582 · GitHub
[go: up one dir, main page]

Skip to content

Commit 856d582

Browse files
committed
README: more formatting updates
1 parent f70864c commit 856d582

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

README.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
``docopt.cpp``: a C++11 port of docopt
2-
======================================================================
1+
``docopt.cpp``: A C++11 port of the Python ``docopt``
2+
=====================================================
3+
creates *beautiful* command-line interfaces
4+
-------------------------------------------
35

46
Isn't it awesome how ``getopt`` (and ``boost::program_options`` for you fancy
57
folk!) generate help messages based on your code?! These timeless functions
@@ -71,16 +73,18 @@ original.
7173
This port is written in C++11 and also requires a good C++11 standard library
7274
(in particular, one with ``regex`` support). The following compilers should
7375
be able to handle this:
74-
* clang 3.3
75-
* gcc 4.9 (If someone can verify this, or provide patches, that would be great!)
76-
* Visual C++ 2013: will *not* compile this code. Hopefully next year.
76+
77+
- clang 3.3
78+
- gcc 4.9 (If someone can verify this, or provide patches, that would be great!)
79+
- Visual C++ 2013: will *not* compile this code. Hopefully next year.
7780

7881
This port is licensed under the MIT license, just like the original module.
7982
However, we are also dual-licensing this code under the Boost License, version 1.0,
8083
as this is a popular C++ license. The licenses are similar and you are free to
8184
use this code under the terms of either license.
8285

8386
The differences from the Python port are:
87+
8488
* the addition of a ``docopt_parse`` function, which does not terminate
8589
the program on error
8690
* a ``docopt::value`` type to hold the various value types that can be parsed.
@@ -96,7 +100,7 @@ API
96100

97101
.. code:: c++
98102

99-
docopt::docopt(doc, argv, help=true, version="", options_first=false)
103+
docopt::docopt(doc, argv, help /* =true */, version /* ="" */, options_first /* =false */)
100104
101105
``docopt`` takes 1 required and 4 optional arguments:
102106

@@ -374,13 +378,15 @@ Compiling the code and running the tests
374378
The original Python module includes some language-agnostic unit tests,
375379
and these can be run with this port as well.
376380

377-
For example, with the clang compiler on OSX:
381+
For example, with the clang compiler on OSX::
382+
378383
$ clang++ --std=c++11 --stdlib=libc++ docopt.cpp run_testcase.cpp -o run_testcase
379384
$ python run_tests.py
380385
PASS (175)
381386

382387
You can also compile the example show at the start (also included as
383-
example.cpp):
388+
example.cpp)::
389+
384390
$ clang++ clang++ --std=c++11 --stdlib=libc++ -I . docopt.cpp examples/naval_fate.cpp -o naval_fate
385391
$ ./naval_fate --help
386392
[ ... ]

0 commit comments

Comments
 (0)
0