Closed st0rmw1ndz closed 5 months ago
Hi st0rmw1ndz, thanks for the pr and sorry for not seeing it sooner. Looks good, I'll review it this weekend, Does using json for the config save time? The primary purpose of having it as a text document was so that users didn't have to fluff about with selecting how to open the file, but if it's slow I don't see why we can't change to json and add a small instruction for setting what program to open it with
Oh hey, I'm not sure if using JSON is any faster. The main thing was that I saw the code to parse the text file was larger than it needed to be, and editing the text file wasn't as intuitive as JSON. If you want, YAML or INI is also an option which likely would be easier for the user to understand and edit.
Oh and by the way, I believe the PrepWork class could be minimized or removed and just use variables defined in a scope of something like a main function, which likely would be easier for future additions.
refactor: PrepWork class now uses a JSON file for reading the config, other uses of the config now call a key from the
config
variable on an instance of PrepWork refactor: make formatting Black compliant refactor: PrepWork class now uses a Path object for reading the config file, instead of os.pathnote: I haven't built the app with PyInstaller, so I'm not sure if doing so would break anything. Running the script itself worked for me, though