Re: D port of docopt

2014-06-17 Thread Jacob Carlborg via Digitalmars-d-announce
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 nice to see a simpler example of how to use the library after

Re: D port of docopt

2014-06-17 Thread Jacob Carlborg via Digitalmars-d-announce
On 16/06/14 23:11, Dicebot wrote: I don't think it gives any advantage here :) docopt looks cool, though my I'd prefer something that works other way around - automatically generates argument parsing code and help messages from aggregate that represents configuration and/or CLI API (with help

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

Re: D port of docopt

2014-06-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 15/06/14 19:35, Bob Tolbert wrote: 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

Re: D port of docopt

2014-06-16 Thread Colin via Digitalmars-d-announce
On Sunday, 15 June 2014 at 17:35:59 UTC, Bob Tolbert wrote: 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

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

Re: D port of docopt

2014-06-16 Thread Sönke Ludwig via Digitalmars-d-announce
Am 15.06.2014 19:35, schrieb Bob Tolbert: 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.

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

Re: D port of docopt

2014-06-16 Thread Sönke Ludwig via Digitalmars-d-announce
Am 16.06.2014 20:19, schrieb Bob Tolbert: 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

Re: D port of docopt

2014-06-16 Thread Dicebot 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 don't think it gives any advantage here :) docopt looks cool,

Re: D port of docopt

2014-06-16 Thread Robert Schadek via Digitalmars-d-announce
On 06/16/2014 11:11 PM, Dicebot via Digitalmars-d-announce wrote: 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

Re: D port of docopt

2014-06-16 Thread Dicebot via Digitalmars-d-announce
On Monday, 16 June 2014 at 21:21:47 UTC, Robert Schadek via Digitalmars-d-announce wrote: On 06/16/2014 11:11 PM, Dicebot via Digitalmars-d-announce wrote: 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,

Re: D port of docopt

2014-06-16 Thread Leandro Lucarella via Digitalmars-d-announce
Bob Tolbert, el 15 de June a las 17:35 me escribiste: 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 THANK YOU. I love docopt! Since this is my first code in D, I apologize in advance

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

Re: D port of docopt

2014-06-15 Thread Soulsbane via Digitalmars-d-announce
Thanks for this. Have played with it a whole lot yet but it looks like it will work better for me than getopt does. Thanks again.

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