Thread overview | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 15, 2016 Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Hi, I would like some options for a library, preferably json configurable, that helps with command line tool development. Doesn't have to be in D specifically. Currently I am using using std.getopt. I had a search in the DUB repos and in github but didn't really find anything appealing. ty ss <3 |
August 15, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to UDW | On 2016-08-15 09:29, UDW wrote: > Hi, > > I would like some options for a library, preferably json configurable, > that helps with command line tool development. Doesn't have to be in D > specifically. > > > Currently I am using using std.getopt. I had a search in the DUB repos > and in github but didn't really find anything appealing. I think you need to be a bit more specific on what you need. -- /Jacob Carlborg |
August 15, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Monday, 15 August 2016 at 09:26:21 UTC, Jacob Carlborg wrote: > On 2016-08-15 09:29, UDW wrote: >> Hi, >> >> I would like some options for a library, preferably json configurable, >> that helps with command line tool development. Doesn't have to be in D >> specifically. >> >> >> Currently I am using using std.getopt. I had a search in the DUB repos >> and in github but didn't really find anything appealing. > > I think you need to be a bit more specific on what you need. Are you trying to parse arguments? There's a lot of good stuff for it already: https://dlang.org/phobos/std_getopt.html https://code.dlang.org/packages/darg https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ For configuration files: https://code.dlang.org/packages/onyx-config https://code.dlang.org/packages/inid https://code.dlang.org/packages/yamkeys https://code.dlang.org/packages/runtimer https://code.dlang.org/packages/variantconfig |
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On Monday, 15 August 2016 at 10:48:11 UTC, Seb wrote: > Are you trying to parse arguments? > There's a lot of good stuff for it already: > > https://dlang.org/phobos/std_getopt.html > https://code.dlang.org/packages/darg > https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ > > > For configuration files: > > https://code.dlang.org/packages/onyx-config > https://code.dlang.org/packages/inid > https://code.dlang.org/packages/yamkeys > https://code.dlang.org/packages/runtimer > https://code.dlang.org/packages/variantconfig Thanks for the suggestions Seb, https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ looks very nice :). I just thought there would be a standard library, stdclib, phobos or otherwise for making CLI tools that would generate sub-commands, options, help text and handle input for it all. Unfortunately my gumby searching didn't find much yesterday. Sort of like this https://github.com/tj/commander.js which I found after a bit more searching. ty again |
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to UDW | On Tuesday, 16 August 2016 at 01:23:16 UTC, UDW wrote: > On Monday, 15 August 2016 at 10:48:11 UTC, Seb wrote: > >> [...] > > Thanks for the suggestions Seb, > https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/ > looks very nice :). > > I just thought there would be a standard library, stdclib, phobos or otherwise for making CLI tools that would generate sub-commands, options, help text and handle input for it all. Unfortunately my gumby searching didn't find much yesterday. Sort of like this > https://github.com/tj/commander.js > which I found after a bit more searching. > > ty again Have you had a detailed look at std.getopt? https://dlang.org/phobos/std_getopt.html That's very similar to commander.js ;-) |
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On Monday, 15 August 2016 at 10:48:11 UTC, Seb wrote:
>
> Are you trying to parse arguments?
> There's a lot of good stuff for it already:
>
> https://dlang.org/phobos/std_getopt.html
> https://code.dlang.org/packages/darg
> https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/
>
>
> For configuration files:
>
> https://code.dlang.org/packages/onyx-config
> https://code.dlang.org/packages/inid
> https://code.dlang.org/packages/yamkeys
> https://code.dlang.org/packages/runtimer
> https://code.dlang.org/packages/variantconfig
Seb how in the heck do you know about all these libraries, geeze.
|
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | On 2016-08-16 04:29, Jonathan Marler wrote: > Seb how in the heck do you know about all these libraries, geeze. Currently Dub has so few libraries that it's possible to manually scan the list. -- /Jacob Carlborg |
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to UDW | On Monday, 15 August 2016 at 07:29:58 UTC, UDW wrote: > Hi, > > I would like some options for a library, preferably json configurable, that helps with command line tool development. Doesn't have to be in D specifically. > I am using: http://code.dlang.org/packages/docopt It's not really json configurable, but that shouldn't be to complex to implement yourself. |
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Tuesday, 16 August 2016 at 06:27:12 UTC, Jacob Carlborg wrote: > On 2016-08-16 04:29, Jonathan Marler wrote: > >> Seb how in the heck do you know about all these libraries, geeze. > > Currently Dub has so few libraries that it's possible to manually scan the list. Manual work? O_o Just open code.dlang.org and either hit CTRL-F or use the search bar (Martin added elastic search two months ago) as the packages usually have a very low PageRank. Furthermore the knowledge that the "big/old" players in the D community (CyberShadow, Adam Ruppe, ...) have their own library solution for everything, helps in finding what one is searching for. Additionally there are quite a few discussions about (Phobos) packages, for example a recent one is here: https://forum.dlang.org/thread/ng7iiq$1gnv$1@digitalmars.com?page=1 (the most interesting finding in there is that std.getopt has nothing to do with the getopt program) So no dark magic involved ;-) |
August 16, 2016 Re: Command Line Utility Library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On 2016-08-16 11:37, Seb wrote: > Manual work? O_o > Just open code.dlang.org and either hit CTRL-F or use the search bar > (Martin added elastic search two months ago) as the packages usually > have a very low PageRank. It's a bit problematic when you don't know what to search for. Not all projects have a descriptive name ;) -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation