Closed PySimpleGUI closed 4 years ago
Hi, awesome work, thanks! I'll leave the code for the original project just on CLI, though. It's for the sake of simplicity. For some people this was their introduction to python, so I'll keep it as simple as possible.
@PySimpleGUI you should fork the repo and add your GUI and link us to it.
Yea, I did that for a bit, but the focus is on the GUI and wanted to name like the other PySimpleGUI projects. I'll add some info in the Readme and link back in a more serious manner however.
Here's my repo: https://github.com/PySimpleGUI/SpringerFreeBooks_GUI
I see now that I look that I link back to this repo in the first sentence of the readme.
Awesome program!
I've added a GUI onto your code and replaced tqdm with a graphical progress meter that includes stats and a mechanism to cancel the operation. It only changed 7 lines in the code.
A GUI provides a number of benefits at little / no cost
I forked your project and made the changes to my version. I didn't want to do a pull request as you may be fine with running on the command line, or maybe want to enable both modes by adding a "-gui" parameter when the program is started. It's your project so don't want to be presumptuous about any changes I made. If you're not interested, no problem, I'll just rename my version so there's no confusion.
GUI Screenshots
Startup
You can copy and paste the folder location into the window or use the Browse button.
After the download starts, the progress meter is shown that shows the current book as well as stats about time spent so far and time remaining (based on how long it's taken so far)
If you click "cancel" or close the progress meter window, then you'll be shown another popu-up window so that you understand why the download has stopped and the program exited
Possible confusing situation with "not responsive" message.
Because the GUI was added on top of code that blocks for long periods of time while downloading, Windows will sometimes display a "not responsive" message then the user tries to cancel the operation.
The problem could be solved by threading the downloading portion so that it doesn't simply pend for long periods of time, but the added complexity isn't likely worth it. A simple message "Your program hasn't locked up, it just looks busy during downloading" would explain the situation to users if desired.