Git Product home page Git Product logo

media-file-tools's Introduction

media-file-tools

Description

Media File Tools is a Python package designed to automate some of the tedious tasks of organizing your video files.

Features

  • Bulk rename TV series episodes that have undescriptive names.
  • Create a TV show database with episode title, air date and plot summary.
  • Create a movies database organized alphabetically or by folder.
  • Find duplicate music files.
  • Uses BeautifulSoup4 and Cinemagoer to scrape data from IMDB.

Installation

You can install media-file-tools using pip:

pip install media-file-tools

How to use

To create a csv file with the seasons, titles and plot summaries of a TV series:

from mediafiletools import make_seriesdb

make_seriesdb(imdb_id='tt0098904')

To overwrite the old file names of the show on your disc with the ones one the csv file:

from mediafiletools import rename_episodes

rename_episodes('C:\Users\user\Videos\Seinfeld', csv_path='C:\Users\user\episodes.csv')

Use caution with this command. Right now, this only looks for folders titled 'Season 1', 'Season 2', 'Season 3' etc. Any folders not following this naming convention will be skipped. The names of the files before and after they're renamed are recorded in a log.

To get the episodes and write the file names in one command, pass the imdb_id as a keyword to rename_episodes:

rename_episodes('C:\Users\user\Videos\Seinfeld', imdb_id='tt0098904')

Sometimes the episodes on IMDB are in a different order or have episode 0/unaired pilots not on a DVD or BlueRay. Make sure the episodes list lines up perfectly with the ones on your disc.

To specify which season(s) to get, pass the season numbers as the start and end keywords:

make_seriesdb(imdb_id='tt0098904', start=3, end=6)

To create an organized movie database from every movie file in the directory:

from mediafiletools import make_moviedb

make_moviedb('C:\Users\user\Movies')

Calling with no arguments will sort the movies alphabetically by default. To organize movies by folder instead, use the sort_type keyword:

make_moviedb('C:\Users\user\Movies', sort_type='folder')

To clean up the filenames, use the strip keyword:

make_moviedb('C:\Users\user\Movies', sort_type='folder', strip=True)

This will remove extraneous text from the filename. e.g. Double.Down.2005.DVDRip.x264.mkv will be written as: Double Down 2005

To find duplicate music files:

from mediafiletools import find_music_dupes

find_music_dupes(r'C:/Users/user/Music')

To output to the console or a text file instead of a csv, use the output_type keyword:

make_moviedb('C:\Users\user\Movies', output_type='txt')

Supported keywords are csv, txt and console.

media-file-tools's People

Contributors

saranti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.