Question

Web Series Renamer & Regular Expression

Using Regex is mandatory

A sample set of srt+mp4 is given to you in separate folders. You need to rename mp4 + srt files. You know that in VLC/any media play will auto-include the srt if the filename and srt name is same. There shall be two folders. wrong srt - containing pre-renamed file name corrected srt - after rename, ensure that new filenames are placed here. You need to ask 3 inputs from the users 

  1. Initially make a menu based program that will ask which web series to rename. The sample python code I have already given along with the variables.

  2. Season Number Padding (take int input): The padding given to the season number. A padding of three digits means if the series have 20 seasons then it will be renamed as season 001, 002, 003..., 019, 020.

  3. 3. Episode Number Padding (take int input): For example, a padding of two means if the series have 30 episodes then it will be renamed as episode 01, 02, ..., 30

There are 3 folders that you need to rename: 1. Breaking Bad 2. Game of Thrones 3. Lucifer

 Lets say the user provides these inputs: 

1. Main Title of the Web Series: 2

2. Season Number Padding (take int input): 1

3. Episode Number Padding (take int input): 2 

Original:: ‘Game of Thrones - 8x05 - The Bells.WEB.REPACK.MEMENTO.en.srt” New: “Game of Thrones - Season 8 Episode 05 - The Bells.srt” 

Also look, there is an interesting case: Look at one of the names: “Game of Thrones - 8x05 - The Bells.WEB.REPACK.MEMENTO.en.srt” 

Original:: ‘Game of Thrones - 8x05 - The Bells.WEB.REPACK.MEMENTO.en.srt” New: “Game of Thrones - Season 8 Episode 05 - The Bells.srt”

 Here you can see that ”.WEB.REPACK.MEMENTO.en” is the string that is not required. Usually every srts have common strings towards the end that needs to be identified manually and stripped. So in case of Game of Thrones, you need to find out manually such non-useful string and strip them in the final code. A recommended approach will be regex. Like splitting on the WEB and other such string (e.g., 720p). Similar manner do it for mp4 also. So both srt and mp4 will have same name and only the extensions shall differ.

 Task: Based on the received input, the filename should be seriesname season number (depending on the padding) episode number (depending on the padding) + episode name ()if any). 

The following series needs to be renamed (srt+mp4) via the os module. 

  1. Breaking Bad

2. Game of Thrones 

3. Lucifer 

Spaces should be strictly one between characters and numbers.


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Web Series Renamer & Regular Expression
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • This Exercise contains two classes: ValidateTest and Validate. The Validate class uses try-catch and Regex expressions...

    This Exercise contains two classes: ValidateTest and Validate. The Validate class uses try-catch and Regex expressions in methods to test data passed to it from the ValidateTest program. Please watch the related videos listed in Canvas and finish creating the 3 remaining methods in the class. The regular expression you will need for a Phone number is: "^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$" and for an SSN: "^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$" This exercise is meant to be done with the video listed in the...

  • language is java Restrictions: You are not allowed to use anything from the String, StringBuilder, or...

    language is java Restrictions: You are not allowed to use anything from the String, StringBuilder, or Wrapper classes. In general, you may not use anything from any other Java classes, unless otherwise specified. You are not allowed to use String literals in your code ("this is a string literal"). You are not allowed to use String objects in your code. The methods must be implemented by manipulating the data field array, The CSString Class: NOTE: Pay very careful attention to...

  • Star Database Program. This is a more sophisticated assignment, it will take longer to do. Write...

    Star Database Program. This is a more sophisticated assignment, it will take longer to do. Write a program which uses file IO, loops, and function calls. The following files are provided in pub: Assignment.cpp stars.dat solution_stars.dat solution.o when you log in the first time, make a directory for this project mkdir prog3 then copy down the files. (WARNING! This will overwrite any file in the directory named Assignment.cpp, so don't copy down Assignment.cpp if you have already done work): cp...

  • I am having trouble trying to output my file Lab13.txt. It will say that everything is...

    I am having trouble trying to output my file Lab13.txt. It will say that everything is correct but won't output what is in the file. Please Help Write a program that will input data from the file Lab13.txt(downloadable file); a name, telephone number, and email address. Store the data in a simple local array to the main module, then sort the array by the names. You should have several functions that pass data by reference. Hint: make your array large...

  • You need to implement a web application that is split in three parts, namely, Webpage, PHP and My...

    You need to implement a web application that is split in three parts, namely, Webpage, PHP and MySQL. Each of them will be used accordingly to solve a simple problem described below. Remember to implement the logic in the most secure way of your knowledge. PHP Implement a PHP function that reads in input a string from the user and store it in a table (e.g., in a field called "Content Name"). The function should be able to read the...

  • Please write the following code in C++ for Data Structures class. Please follow all the instructions...

    Please write the following code in C++ for Data Structures class. Please follow all the instructions in the picture below. Please write the program with zero warnings. Description: Please write a short program, randomStream, that asks for the name of a file and a number, and produces a files satisfying the following conditions: The file name is the name given by the user (exactly--no added suffixes please) The number of lines in the file is exactly the same as the...

  • C++ Write a function parseScores which takes a single input argument, a file name, as a string. Your function should read each line from the given filename, parse and process the data, and print the r...

    C++ Write a function parseScores which takes a single input argument, a file name, as a string. Your function should read each line from the given filename, parse and process the data, and print the required information. Your function should return the number of student entries read from the file. Empty lines do not count as entries, and should be ignored. If the input file cannot be opened, return -1 and do not print anything.     Your function should be named...

  • Project Description Complete the Film Database program described below. This program allows users to store a...

    Project Description Complete the Film Database program described below. This program allows users to store a list of their favorite films. To build this program, you will need to create two classes which are used in the program’s main function. The “Film” class will store information about a single movie or TV series. The “FilmCollection” class will store a set of films, and includes functions which allow the user to add films to the list and view its contents. IMPORTANT:...

  • (C++ programming) Need help with homework. Write a program that can be used to gather statistical...

    (C++ programming) Need help with homework. Write a program that can be used to gather statistical data about the number of hours per week college students play video games. The program should perform the following steps: 1). Read data from the input file into a dynamically allocated array. The first number in the input file, n, represents the number of students that were surveyed. First read this number then use it to dynamically allocate an array of n integers. On...

  • 13.13 Final - Problem 2 (Chapter 8) Google Docs (20 points) Given the Document class below,...

    13.13 Final - Problem 2 (Chapter 8) Google Docs (20 points) Given the Document class below, you will write a basic version of Google Drive. Your program will store two lists of documents, one for documents the user has created and one for created documents the user has shared with a friend. The user will have a few options which you will need to implement (note: the menu will only be displayed once at the beginning of the program): Add...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT