trakBan / spongebob-cli

Watch classic spongebob from the terminal! 🎥🧽
GNU General Public License v3.0
570 stars 23 forks source link

improvements and new feature #10

Closed iaacornus closed 2 years ago

iaacornus commented 2 years ago

I just noticed todo in the top, so I add --download-all feature, with a shorthand of -da, I also reorganized some parts and tried to minimized the redundancy of some part. Furthermore, the exception handling were also changed a bit, and I added func.py, to hold other functions, so the main source won't be clustered or become deorganized. I also add the deetupendencies and scripts to setup.py.

Also I added spinner while it is doing a task,e.g. downloading it shows as :

Downloading all fetched episodes. #<- green
Downloading episode 1 #<- cyan
▐____|\________▌#<- green Downloading the episode
Download complete! #<- green

Which is this in terminal :

Downloading all fetched episodes.
Downloading episode 1
▐____|\________▌Downloading the episode
Download complete! 

However, it removed the verbosity, so I think in order to add a verbose option or output, and making the code more organized, using argparse would be a better choice. I still don't touched or tried moving it to argparse yet, as I'm not the author of the file. And pardon for my partial intrusion in the development.

Also this feature is tested to some degree, but not intensively, so I think before merging it, playing with the patch first a handful of times would be a good idea.

trakBan commented 2 years ago

I will have to test this before merging because quite a few changes were made. I will look into argparse but i doubt i will switch to that unless it proves to be better than the method we are currently using. I just have to thank you for doing so much for this project with countless pull requesting :) I will merge it but i have to do just some testing first.

iaacornus commented 2 years ago

also, I forgot to include Halo as dependency in setup.py, so it would have a little problem in compilation just add it to avoid that, and in the merging, you can add it, so another pull request won't be necessary

from setuptools import setup

setup(
   name='spongebob-cli',
   version='1.1',
   install_requires=["termcolor", "BeautifulSoup4", "prettytable", "youtube-dl", "halo"], 
   scripts=[
            'spongebob-cli',
            "func.py"
           ]
)
trakBan commented 2 years ago

I also forgot to mention that. I would like to have as little 3rd party dependecies as possible so its less bloated and less likely to fail. However if you find it necessary to add some 3rd party dependecies feel free to do so.

trakBan commented 2 years ago

Thanks for contributing to spongebob-cli!