Spongebob-cli - Watch classic spongebob from the terminal

Overview

spongebob-cli

Watch classic spongebob from the terminal! Thanks to everyone that is starring, forking, writing issues, pull requesting and just users of spongebob-cli!

updatedgif

Dependecies (all python dependecies will automatically be installed):

  1. mpv player https://mpv.io/
  2. youtube-dl https://github.com/ytdl-org

Usage:

 If the programm was ran without arguments it will ist all the episodes an it will let you play them.
 --download | -d, usage --download {a number of a episode}, This will download that video under a directory the command was run
 --list | -l,     usage --list, this will list all the episodes and then exit the programm
 --list | -l, usage --list {number} this will show the number of episodes with the limit you provided.
 --play | -p      usage --play {a number of a episode}, This will play the episode without listing the episodes
 --random | -r, usage spongebob-cli --random, This will play a random episode
 --help | -h      usage --help this will print what each argument does

How to install:

Download this repository with git or other.

cd spongebob-cli
sudo chmod +x spongebob-cli; sudo python setup.py install

Arch and arch based distributions

There is an AUR package for spongebob-cli mantained by getchoo

yay -S spongebob-cli-git

Troubleshooting

If setup.py fails try this:

pip3 install termcolor beautifulsoup4 prettytable

If video wont play check if you have mpv and youtube-dl installed. If you dont have youtube-dl but a fork of it, make a alias in your .zshrc or .bashrc and alias it to youtube-dl

Comments
  • improve readme more

    improve readme more

    i fixed the formatting to be a bit more traditional with the title always being the largest element, as well as just more appealing in my opinion. i also improved some wording and removed sudo where it did not need to be used (such as with the chmod command being used with sudo even when the user will have permission to make the file the executable).

    opened by getchoo 5
  • improvements and new feature

    improvements and new feature

    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.

    opened by iaacornus 4
  • add verbose parameter

    add verbose parameter

    I added a verbose parameter to show the download speed and other processes happening in download mode which can be done using -v or --verbose

    [devel@fedora spongebob-cli]$ spongebob-cli -da -v
    Downloading all fetched episodes : 338
    Downloading episode 1
    [generic] SpongeBob-SquarePants-Reef-Blower: Requesting header
    [download] SpongeBob-SquarePants-Reef-Blower-SpongeBob-SquarePants-Reef-Blower.mp4 has already been downloaded
    [download] 100% of 28.57MiB
    
    Download complete!
    Downloading episode 2
    [generic] SpongeBob-SquarePants-Tea-at-the-Treedome: Requesting header
    [download] Resuming download at byte 523264
    

    and for single downloads :

    [devel@fedora spongebob-cli]$ spongebob-cli -d 4 -v
    Downloading episode 4
    [generic] SpongeBob-SquarePants-Bubblestand: Requesting header
    [download] SpongeBob-SquarePants-Bubblestand-SpongeBob-SquarePants-Bubblestand.mp4 has already been downloaded
    [download] 100% of 77.02MiB
    
    opened by iaacornus 3
  • Some improvements

    Some improvements

    This PR contains the following changes:

    • removing unnecessary variables
    • improve some functionalities
    • refactoring
    • linting with black
    • add other stuff to .gitignore
    • Edit the contributor's list to be dynamically generated with icons
    opened by kaboussi 2
  • Add windows support

    Add windows support

    Installing on windows works fine When selecting episode an exception is raised:

    .....
    What episode do you want to watch? (type a number by the right side): 1
    Now playing: https://www.megacartoons.net/video/SpongeBob-SquarePants-Help-Wanted.mp4
    
    Traceback (most recent call last):
      File "C:\Users\User\spongebob-cli\spongebob-cli", line 214, in <module>
        Play(real)
      File "C:\Users\User\spongebob-cli\spongebob-cli", line 55, in Play
        subprocess.run(["mpv", DirectLink])
      File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 505, in run
        with Popen(*popenargs, **kwargs) as process:
      File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    
    opened by daniel-lightlytics 2
  • using colored when it is missing

    using colored when it is missing

    in https://github.com/trakBan/spongebob-cli/blob/main/spongebob-cli#L5-L11 if colored is missing code will use colorer to tell that colored is missing and fail because colored is missing

    opened by k26pl 2
  • Fix failed removal after default installation

    Fix failed removal after default installation

    Some Unix Systems install this software under /usr/local/bin, and the uninstall script was not considering this.

    Now, an OR statement was included to deal whether the app is inside /usr/bin or /usr/local/bin

    *Also: After failed removal, the app is not launched anymore

    opened by solisoares 1
  • Removing quit messages from SystemExit exceptions so exit status is 0

    Removing quit messages from SystemExit exceptions so exit status is 0

    The lines of code that raise SystemExit for the program to leave have arguments, those being simple quit messages, which mean when the program leaves it will return 1. This has been fixed by using a print instead.

    opened by loudercake 1
  • Error: Permission denied: '/usr/local/lib/python3.8'

    Error: Permission denied: '/usr/local/lib/python3.8'

    Hi there! Love your work, man, but I cannot install it properly. Your code asks to install packages to the root files and I don't want to mess up my system. Should I create venv or maybe you should consider using another solution for automatic installation of packages?

    Code

    ➜  spongebob-cli git:(main) chmod +x spongebob-cli
    python3 setup.py install
    running install
    /usr/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /usr/lib/python3.8/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    error: can't create or remove files in install directory
    
    The following error occurred while trying to add or remove files in the
    installation directory:
    
        [Errno 13] Permission denied: '/usr/local/lib/python3.8'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        /usr/local/lib/python3.8/site-packages/
    
    This directory does not currently exist.  Please create it and try again, or
    choose a different installation directory (using the -d or --install-dir
    option).
    
    opened by indicozy 1
  • another source?

    another source?

    sometimes the source returns 503 status error due to server issues I think.

    ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by <HTTPError 503: 'Service Unavailable'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    
    opened by iaacornus 1
  • reorganized the code

    reorganized the code

    • The spinner in download function were put back again, since it does not cause any error. During my testing before putting the spinner, the program is already returning only 143 or only 140's episode, not 300+, so I think it is rather a source problem. But I still didn't touched the Play function, only the download function.
    • The code were also reorganized, the one prominent changes made is the function were passed onto each other instead of putting the returned value to another variable that will be used by another function. So instead of this :
    ...
    source = VideoSource(episodes[x+1])
    Download(source)
    print(f"Episode {x+1} downloaded!", end="")
    ...
    

    This was done instead :

    ...
    Download(VideoSource(episodes[x+1]))
    ...
    
    • raise SystemExit(ERROR_MESSAGE) was also used instead of :
    ...
    print(ERROR_MESSAGE)
    sys.exit()
    ...
    

    since this one is more efficient.

    • Duplicates of except KeyboardInterrupt were also removed.
    • the output of subprocess calling youtube-dl were also redirected back into subprocess.DEVNULL and its STDERROR were also redirected back into subprocess.STDOUT
    • else block were also used instead of try/except in some cases.
    • Also, instead of specifying the number of episodes in list function, len(episodes) were used instead to avoid error.
    opened by iaacornus 1
Owner
I program for GNU/linux systems. I mainly do CLI applications.
null
Command line interface to watch your childhood shows in hindi and english, designed with python

Sweet dreams: Most of your childhood shows Command line interface to watch your

Not Your Surya 3 Feb 13, 2022
This CLI give the possibility to do a queries in Star Wars API and returns a JSON in a terminal.

Star Wars CLI (swcli) This CLI give the possibility to do a queries in Star Wars API and returns a JSON in a terminal. Install $ pip install swcli Qu

Pery Lemke 5 Nov 5, 2021
WA Terminal is a CLI application that allows us to login and send message with WhatsApp with a single command.

WA Terminal is a CLI application that allows us to login and send message with WhatsApp with a single command.

Aziz Fikri 15 Apr 15, 2022
Voidlx is a terminal cli apps launcher made in python

Voidlx is a terminal cli apps launcher made in python

null 2 Nov 13, 2021
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.

Interactive Redis: A Cli for Redis with AutoCompletion and Syntax Highlighting. IRedis is a terminal client for redis with auto-completion and syntax

null 2.2k Dec 29, 2022
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

mycli A command line client for MySQL that can do auto-completion and syntax highlighting. HomePage: http://mycli.net Documentation: http://mycli.net/

dbcli 10.7k Jan 7, 2023
Python commandline tool for remembering linux/terminal commands

ehh Remember linux commands Commandline tool for remembering linux/terminal commands. It stores your favorite commands in ~/ehh.json in your homedir a

null 56 Nov 10, 2022
Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections.

code-connect Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections. Motivation VS Code supports opening

Christian Volkmann 56 Nov 19, 2022
Darkdump - Search The Deep Web Straight From Your Terminal

Darkdump - Search The Deep Web Straight From Your Terminal About Darkdump Darkdump is a simple script written in Python3.9 in which it allows users to

Josh Schiavone 264 Dec 30, 2022
Random scripts and other bits for interacting with the SpaceX Starlink user terminal hardware

starlink-grpc-tools This repository has a handful of tools for interacting with the gRPC service implemented on the Starlink user terminal (AKA "the d

null 270 Dec 29, 2022
asciinema - Terminal session recorder 📹

asciinema - Terminal session recorder ??

asciinema 11.1k Dec 27, 2022