Skip to main content

Parser and Renamer for torrents files (Movies and series)

Project description

PyPI version pypi downloads > Extract informations from torrents files

*This library is in progress.*

It’s a python library to extract infos from a torrent filename. The parser extract a maximun infos to finnaly get the movie or serie title. The infomations store in a tuple with 2 dictonaries The program use regex to get infos. In the futur the program allow to choose options to rename files. And several other features coming soon. Later the library will be transformed in a Program

Install

  1. *Auto* ``` pip install MovieSerieTorrent ````

  2. *Manual*

Clone repo and run setup.py in good directory. git clone https://github.com/JonathanPetit/MovieSerieTorrent cd ../MovieSerieTorrent python setup.py install

  1. *Verify*

Verify that you have install fuzzywuzzy correctly –> GitHub

Usage

Import:

from MovieSerieTorrent import *

Paser:

Extract infos from filename and return a tuple with 2 dictionary.

Parser().parse('[ www.CpasBien.io ] Enrages.2015.FRENCH.BDRip.XViD-FUNKKY.avi')
#({'title': 'Enrages',
#  'year': '2015',
#  'languages': 'FRENCH',
#  'quality': 'BDRip',
#  'extension': 'avi'
#  'type': 'movie'},

#  {'group': 'FUNKKY',
#  'sites': 'www.CpasBien.io',
#  'codec': 'XViD'})

First element from tuple : * Title * Year (Movie) * Language * Extention file * Quality * Season (Serie) * Episode (Serie)

Second element: * Sites download * Resolution * Audio * Uploader * Codec

Renamer:

Rename file with infos extract from Parser.

Renamer().preview('[ www.CpasBien.io ] Enrages.2015.FRENCH.BDRip.XViD-FUNKKY.avi')
#Enrages (2015)-FRENCH-.avi

Preview filename, but but does not rename

path = '/Users/Jonh/Movies/'
Renamer().renaming(path, '[ www.CpasBien.io ] Enrages.2015.FRENCH.BDRip.XViD-FUNKKY.avi')
#Enrages (2015)-FRENCH-.avi
Renamer().renaming(path, '[ www.CpasBien.pw ] Blindspot.S01E03.FASTSUB.VOSTFR.HDTV.XviD-ZT.avi')
#BlindspotS01E03-VOSTFR-.avi

Rename file in directory.

Formatting:

Use Parser to create a table with files.

path = '/Users/Jonh/Movies/'
Formatting().formattting(path)
ScreenShot

ScreenShot

Library used.

  • re (regex compilator and matcher library). DOC

  • os (operating system). DOC

  • tabulate (create table). GitHub

  • colorama (color in terminal) GitHub

  • fuzzywuzzy (string matcher). GitHub

Issues

  • Handler for terminal to set option

  • Continue GUI (tkinter)

  • Option choose path

  • Imdb search for movie and serie to rename better.

  • Unit tests

Contact

Pull requests, commits or issues are welcome!

License

MIT © Jonathan Petit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MovieSerieTorrent-1.0.5.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file MovieSerieTorrent-1.0.5.tar.gz.

File metadata

File hashes

Hashes for MovieSerieTorrent-1.0.5.tar.gz
Algorithm Hash digest
SHA256 db7714abe61a812fbf1138342b396b90e2358bdf4beeeab5f6aa44a92c0611f8
MD5 07a39d7d115344a5e39ab647b3591ae1
BLAKE2b-256 f6321f084bf3b3fdbd4c207853095228281081954bf2867d9a077ea8cc7fde01

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page