8000 README: more formatting updates · switch-st/docopt.cpp@bdb94d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bdb94d6

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

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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

66
Isn't it awesome how ``getopt`` (and ``boost::program_options`` for you fancy
77
folk!) 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
6464
information in it to make a parser*.
6565

6666
C++11 port details
67-
======================================================================
67+
---------------------------------------------------
6868

6969
This is a port of the ``docopt.py`` module (https://github.com/docopt/docopt),
7070
and 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

8686
The 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

9898
API
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

179179
Help 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
----------------------------------------------------------------------
378378
The original Python module includes some language-agnostic unit tests,
379379
and these can be run with this port as well.
@@ -394,7 +394,7 @@ example.cpp)::
394394
[ ... ]
395395

396396
Development
397-
======================================================================
397+
---------------------------------------------------
398398

399399
Comments and suggestions are *very* welcome! If you find issues, please
400400
file them and help improve our code!
@@ -405,7 +405,7 @@ we might want to first negotiate these changes into the Python code first.
405405
However, bring it up! Let's hear it!
406406

407407
Changelog
408-
======================================================================
408+
---------------------------------------------------
409409

410410
**docopt** follows `semantic versioning <http://semver.org>`_. The
411411
first release with stable API will be 1.0.0 (soon).

0 commit comments

Comments
 (0)
0