Live data from Hacker News

Gooey: Turn command line programs into GUI applications

github.com

21–30 of 76 posts

Re: Gooey: Turn command line programs into GUI applications

#21

Earlier quoted context omitted.

With a REST API you can call from curl !?

Yes, good idea ..! At our workplace, we have whole bunch of administration tool running on unix CLIs. I am thinking of way by which having same experience in browser based apps ..!

I'm doing an application that runs scripts for a REST API. Using Django REST API to build the service.

Re: Gooey: Turn command line programs into GUI applications

#23
post #6

Really awesome and promising idea, but I think the implementation is limiting. Couldn't it just as well parse help text? It's not guaranteed to be standard, but there are probably more programs that can be parsed that way than use ArgumentParser.

I actually started out just parsing the help text, but ArgParse gives a ton of extra options that let me better choose the widget type. For instance, things like `Choice` or `Count` options which cue the framework to use dropdowns. Or `StoreTrue` which cues it to generate a CheckBox. Stuff like that.

I'm not totally sure how I could get that level of detail without forcing some kind of markup within the help messages. I'm totally open to ideas (and pull requests) though! :)

Re: Gooey: Turn command line programs into GUI applications

#24

Good idea. I wonder if anyone has done this for general unix command-line apps by parsing out the man pages on the fly. It probably wouldn't work for all programs but may be gnu style ones would be consistent enough.

The fish shell does this with an explicit command (fish_update_completions) and offers an awesome Tab completion in the current Github version

Re: Gooey: Turn command line programs into GUI applications

#25

Good idea. I wonder if anyone has done this for general unix command-line apps by parsing out the man pages on the fly. It probably wouldn't work for all programs but may be gnu style ones would be consistent enough.

I too was expecting something like what you describe but by parsing -h --help output.

Either way, it might be neat to do it dynamically, so command-line programs could be turned into guis live by typing "guify xyz".

The gui could have labels with the command options, and upon hitting enter they could close and send the command back to the command line, so you're learning the commands as you go.

Re: Gooey: Turn command line programs into GUI applications

#27

Earlier quoted context omitted.

Yes, good idea ..! At our workplace, we have whole bunch of administration tool running on unix CLIs. I am thinking of way by which having same experience in browser based apps ..!

I'm doing an application that runs scripts for a REST API. Using Django REST API to build the service.

I'm wondering if such app can support some really complex unix cli apps. Like CLI app which runs(around 1500 commands)in fixed window on terminal and asks user input parameters.

Re: Gooey: Turn command line programs into GUI applications

#29
Back in the days of the classic Mac OS, the Mac Programmer's Workshop included a tool like this, called "commando." One of the neat things about commando was that you could hover over any option to see some descriptive "help" info at the bottom.

http://i.imgur.com/Zxx33DU.png

Re: Gooey: Turn command line programs into GUI applications

#30

Good idea. I wonder if anyone has done this for general unix command-line apps by parsing out the man pages on the fly. It probably wouldn't work for all programs but may be gnu style ones would be consistent enough.

I've done something similar to this a few times, both in Python.

Once to create a TkInter GUI for an internal command line app, and once to wrap sg3_utils for use in Python scripts.

In general, I think it could "mostly work" a good portion of the time, but it'd be pretty difficult to get working 100% of the time without a lot of tweaking to the parser.

Post reply on HN