Command-Line YouTube app mock-up program submitted as part of Google's coding challenge for the Bright Network Internship, Technology 2021
- General Info
- Technologies Used
- Features
- Screenshots
- Setup
- Usage
- Project Status
- Acknowledgements
- Contact
- The app is an implementation of different sorting, searching and IO methods meant to simulate the workings of
- YouTube in a Command-Line environment (ie. without the web element)
- The app lets you simulate playing and stopping videos, managing playlists and searching videos by name and tag
- This project was implemented as a submission to the Google Coding challenge for Bright Network Internship Technology 2021
- Python - version 3.8
NUMBER_OF_VIDEOS
: returns the number of videos stored in the video librarySHOW_ALL_VIDEOS
: displays a list of all videos in the library by lexicographical orderPLAY <video_id>
: simulates playing a video specified using an alphanumeric id with no whitespacesSTOP
: simulates stopping the video that is currently playingPLAY_RANDOM
: selects a random, unflagged video from the library and plays itPAUSE
: simulates pausing the video that is currently playingCONTINUE
: simulates resuming the video that was pausedSHOW_PLAYING
: displays the video that is currently being played along with its state (PAUSED or not)CREATE_PLAYLIST <playlist_name>
: simulates creating a playlistADD_TO_PLAYLIST <playlist_name><video_id>
: simulates adding a video to a playlistSHOW_ALL_PLAYLISTS
: displays a list of all the names of the created playlistsSHOW_PLAYLIST <playlist_name>
: shows all videos in a playlistREMOVE_FROM_PLAYLIST <playlist_name><video_id>
: simulates deleting a video from a playlistCLEAR_PLAYLIST <playlist_name>
: deletes all videos from a playlist without deleting the playlistDELETE_PLAYLIST <playlist_name>
: deletes a playlist and its content from the video playerSEARCH_VIDEOS <search_term>
: searches videos by title given a string pattern to lookupSEARCH_VIDEOS_WITH_TAG <tag_name>
: searches videos by tag given a string pattern to lookupFLAG_VIDEO <video_id><flag_reason>
: flags a video so it can't be added to a playlist or reproduced, optional attribute provides reason for flagging or defaults to "Not provided" if omittedALLOW_VIDEO <video_id>
: allows users to unflag video
What are the project requirements/dependencies? Where are they listed? A requirements.txt or a Pipfile.lock file perhaps? Where is it located?
- Python 3+ installed
- pytest module (pip install pytest)
Run program using python3 -m src.run
Run tests using python3 -m pytest
How does one go about using it?
Use one of the commands listed above along with the required arguments. Arguments should not contain any whitespaces.
Example:
YT> CREATE_PLAYLIST my_playlist_name
Project is: complete
- Code could be refactored further to improve readability
- This project was based on Google's Coding Challenge for the Bright Network Technology Internship 2021.
VideoPlayer solution by @josflesan - feel free to contact me!