3 ms·
I would love something that could do the reverse.
by nathanfig 3y ago
I would love something that could do the reverse.
- SOLAR_FIELDS 3y agoA WYSIWYG editor that spits out a CLI you mean? That would pretty neat, though I think would necessarily be kind of constrained. I wonder who has tried that approach, I can't think of any examples
- andy99 3y agoActually, something like a "zotero for argparse" would be cool. Where you enter arguments, their type, help string, defaults etc in a gui and then you can check the ones you need for a given python script and copy the relevant python code into your paste buffer. I don't think it would be a massive time saver however what I usually do now is find some previous script that had similar arguments and copy them, and then copy-paste-edit to add new arguments. The other advantage is you could enter the arguments agnostically and export as whatever language you're working in.
- exe34 3y agohttp://docopt.org/ http://docopt.org/ Not quite what you asked for, but close: type example invocations to generate the CLI, and just pull the arguments from a dictionary at runtime.
- andy99 3y agoI would like to be able to use a gui to set up parameter sweeps based on info pulled from argparse and then convert back to a shell script that runs and saves the output sensibly.
- nathanfig 3y agoNot quite; turn any GUI application into a Python command line program.
- rocqua 3y agoThis feels maybe possible with QT. Since the inputs are all defined in code.
- blooop 3y agoI'm trying to solve the part of the problem that generates the output, the argparse part would not be that hard to write. https://github.com/blooop/bencher/tree/main https://github.com/blooop/bencher/tree/main
- jmfldn 3y agoChatgpt soon probably!
- unnouinceput 3y agohow? you're going to modify the binary so that it can accept command line parameters? or clone the GUI's functionality in a CLI? that's akin to just creating the application from scratch.