Closed ghost closed 10 years ago
I never really understood what @dgorissen meant by https://github.com/dgorissen/coursera-dl/pull/80#issuecomment-23517446 to use a wrapper :confused:
I would suggest writing your gui script as a wrapper that wraps the original one
When we could do main(*args2)
and achieve the same result with less code instead... Please clarify about this
There are bugs though:
ctrl-v
allowedRemember me
button doesn't work :key: python gui.py
A GUI is not necessary as the fields expand at an alarming rate therefore there is a risk of failure but the GUI seems a pretty good idea for windows users and for solving issue https://github.com/dgorissen/coursera-dl/issues/79 (however solving this ain't easy)
In case if decided a GUI is unwanted please close the thread so I can continue :walking:
Sorry for the delay, I lost track of this. I had thought you would just call the class constructor with the arguments directly, why emulate the command line arguments when you can just do in the main of your gui (on clicking download):
cd = CourseraDownloader(...) cd.login(cname) cd.download_course(...)
There is no need to touch the original script at all. Also means that if the cmdline parameter names change nothing breaks.
Can you also add an informational message if the the tk toolkit is not installed. This prevents a raw exception.
As for deployment you can just add an extra entry point to setup.py as coursera-dl-gui.
Finally, please use lowercase module names, so gui.py instead of GUI.py.
I implemented most of it however since threading is involved its quite hard :(
could use some help.... from a experienced Tkintitian
Looks good, let me know when you are done with it.
I now have a gui that doesn't affect the main app, Unfortunately I'm not that much of a git expert so I guess I'll open a new pull request to fix it :)
Note: This commit only adds and doesn't subtract, I can't seem to find any reason why Github thinks there are 12 deletions plus there aren't 26 additions too in courseradownloader.py