whole-foods-deliverance icon indicating copy to clipboard operation
whole-foods-deliverance copied to clipboard

Adding Gooey as an easier way to provide arguments

Open eoprede opened this issue 4 years ago • 0 comments

This is a first crack at adding GUI to the script. It's definitely not a full blown GUI , but hopefully good enough and an easy way to do it. I won't be offended if this is not the direction you want to take the project :) It gets very messy and complicated if I run gui and non-gui versions of the code in the same file (have to make a fake decorator, have to add all those extra options to CLI args, etc), so I opted to put gui code to a separate file. This required small modifications to run.py, but it mostly involved moving things into different functions. Since the goal was to be able to adjust config in the GUI, I have added extra options to it. Their default values are set to what's already in the config and upon execution of the script those values are saved to the conf.toml file, so they persist between code execution and the rest of the code doesn't need to be aware of the GUI at all. The -noprofile command is to tell powershell to not load the user profile and it doesn't affect the functionality, but without it on my machine Gooey version of the script generates an error when playing sound. Currently there's a bug between Gooey and the wxpython 4.1.0, so I have to specify an earlier version in the requirements manually. I have done some limited testing and things appear to work just fine, but I didn't try everything.

eoprede avatar Apr 26 '20 18:04 eoprede