Live data from Hacker News

Gooey: Turn command line programs into GUI applications

github.com

51–60 of 76 posts

Re: Gooey: Turn command line programs into GUI applications

#51

As much as I like the CLI, I really find this useful, because it takes time to go through document and find the desired option. I think the real solution is that every CLI program comes with a description file (probably in XML) that describes its CLI options, their types, combination, etc. The description file should help automatic GUI creating or shell completion.

I think you just described a man page. Except for the xml part. That sounds a lot more like something MS would do.

The man pages are intended for human and are not meant to be specs. An advanced NLP program is required to parse man pages and infer appropriate types and combinations and I suspect it would not be perfect.

I agree that this might lead to something which is not in Unix spirit but already shell completion provide such information and this shows the need for such specs.

Re: Gooey: Turn command line programs into GUI applications

#53

Earlier quoted context omitted.

http://docopt.org/ This project attempted to make argument parsing and the help string synonymous. I'm not sure if it is being actively maintained.

The problem with docopt is that it's very hard to process internally. There is no real internal representation. I tried to write a docopt to click converter but I had to give up.

I'm not sure quite what you're looking for, but you may be interested in my (not yet announced) docopt parser in C++: https://github.com/ridiculousfish/docopt_fish . It's got a richer feature set than the "reference" docopt.

Re: Gooey: Turn command line programs into GUI applications

#54

"Transform your command line apps into user friendly GUIs" - https://raw.githubusercontent.com/chriskiehl/Gooey/master/re... Encoder (-e). OpenCV FOURCC Type. {Empty text box}. Just take all possible options and ... shove them right in the user's face. Is that user friendly? Whom is it helping, who doesn't want a CLI but also knows how the CLI program works, but also can't script it?

Yeesh.

The picture in readme is one running a fake program I was using for testing. If you'll notice, none of the options particularly make sense -- heck, the output of the program (shown toward the bottom of the readme) is "printing message at: {hash}"

If you take another look at the readme, you'll see that it supports `choice` style params. Which reads in the options available and presents them to the user via a dropdown.

So, friendly options are a'plenty! :)

Re: Gooey: Turn command line programs into GUI applications

#56

Earlier quoted context omitted.

I think you just described a man page. Except for the xml part. That sounds a lot more like something MS would do.

The man pages are intended for human and are not meant to be specs. An advanced NLP program is required to parse man pages and infer appropriate types and combinations and I suspect it would not be perfect. I agree that this might lead to something which is not in Unix spirit but already shell completion provide such information and this shows the need for such specs.

If only there were an IEEE standard for utility conventions.

Re: Gooey: Turn command line programs into GUI applications

#57
post #37

> Turn (almost) any command line program into a full GUI application with one line and lose the ability to pipe, check exit status, run from cron, run through ssh or a different machine, call from other scripts... The last couple of months as I know about more and more the command line, and can configure my shell and tools the way I like, I feel I'm more productive with the terminal than any other GUI application.

[deleted]

Re: Gooey: Turn command line programs into GUI applications

#59

Clever. However, it is not for any command line program. It works only for python programs that use argument parser. Though, one can write a python argument parser around a cli to make it work.

Something similar could be done for Go. Since most of Go programs simply import the standard "flag" package for their command line parsing, you could have a pretty large coverage.

Re: Gooey: Turn command line programs into GUI applications

#60

Similar workflow for Macs: http://www.sveinbjorn.org/platypus + http://mstratman.github.io/cocoadialog/ or http://www.bluem.net/en/mac/pashua/

I've used them all to good effect, but I don't think it's fair to call them similar to Gooey. They require a bit of tinkering to work and your script has to adapt to running with a GUI. Zero effort to turn your ArgumentParser into a GUI is really a brilliant feature.
Post reply on HN