Project

iml

0.0
No release in over 3 years
Low commit activity in last 3 years
Library which parses strings into media objects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 0.11
~> 12.3
~> 3.7
~> 0.16
~> 0.9

Runtime

~> 0.3
 Project Readme

Gem Version Maintainability

IML

Intricate (Media) Matching Logic

This is a media file handling library which is supposed to "guess" the intended type of media file based on specific naming patterns. Its main purpose is to serve as runtime for renaming media files according to specified patterns. The gem includes an executable iml through which rename operations are possible.

Installation

This gem requires ruby >= 2.4

Add this line to your application's Gemfile:

gem 'iml'

And then execute:

$ bundle

Or install it yourself as:

$ gem install iml

Usage

Command Line

Usage: iml [options] MEDIA_FILE [MEDIA_FILE] ...
    -v, --[no-]verbose               Run verbosely
    -p, --[no-]pretend               Dry run, do not move any files
    -t, --target PATH                Path to move media files to, default: current directory
    -o, --movie-format FORMAT        Format of the output path of movies, default: '%T (%Y).%f'
    -O, --tv-format FORMAT           Format of the output path of TV series, default: '%T/Season %s/%T - S%SE%E.%f'
    -l, --list-formats               Format description
    -f, --force                      Use the force, override output files

$ iml -v Some.Cool.Movie.2018.1080p.BRRip.x264.aac-GROUP.mp4
I, [2018-07-06T13:38:29.836887 #70771]  INFO -- : Some.Cool.Movie.2018.1080p.BRRip.x264.aac-GROUP.mp4 looks like a movie
I, [2018-07-06T13:38:29.837047 #70771]  INFO -- : Moving Some.Cool.Movie.2018.1080p.BRRip.x264.aac-GROUP.mp4 to Some Cool Movie (2018).mp4

Code

title = "An.Interesting.TV.Show.S01E01.1080p.WEBRIP.h265-GROUP.mkv"
=> "An.Interesting.TV.Show.S01E01.1080p.WEBRIP.h265-GROUP.mkv"
IML::Text.new(title).detect
=> #<IML::TVSeries title="An Interesting Tv Show", season="01", episode="01", quality="1080p", source="WEBRIP", codec="h265", group="GROUP", extension="mkv">

License

The gem is available as open source under the terms of the MIT License.