D port of docopt

2014-06-15 Thread Bob Tolbert via Digitalmars-d-announce
In order to learn D, I've worked up a port of the docopt commandline parser (original in Python http://docopt.org). https://github.com/rwtolbert/docopt.d Since this is my first code in D, I apologize in advance for the mix if Python and C++ idioms. Since this is ported from Python, with the inte

Re: D port of docopt

2014-06-15 Thread Bob Tolbert via Digitalmars-d-announce
On Monday, 16 June 2014 at 00:40:25 UTC, Soulsbane wrote: Thanks for this. Have played with it a whole lot yet but it looks like it will work better for me than getopt does. Hope it works for you. Let me know if you have questions. While there are most likely cases of some command line interfac

Re: D port of docopt

2014-06-16 Thread Bob Tolbert via Digitalmars-d-announce
On Monday, 16 June 2014 at 06:51:41 UTC, Jacob Carlborg wrote: Pretty cool idea. Are you aware of that in D you can, at compile time, parse the doc string and generate a command line parser for that particular documentation. I wondered about that, after looking at the compile-time regex stuf

Re: D port of docopt

2014-06-16 Thread Bob Tolbert via Digitalmars-d-announce
On Monday, 16 June 2014 at 17:59:13 UTC, Sönke Ludwig wrote: Am 15.06.2014 19:35, schrieb Bob Tolbert: One thing that would be nice is support for multiple help screens (e.g. one per command). For DUB [1] (or GIT) for example there is one main help screen that lists all commands along with

Re: D port of docopt

2014-06-17 Thread Bob Tolbert via Digitalmars-d-announce
On Tuesday, 17 June 2014 at 06:29:14 UTC, Jacob Carlborg wrote: On 16/06/14 15:31, Bob Tolbert wrote: While that is true, I'd argue that if you are writing an app with a command line that complicated, then you have your work cut out for you no matter what the system is you use. It would be