Skip to content

Instantly share code, notes, and snippets.

View jonjomckay's full-sized avatar
🚀
¯\_(ツ)_/¯

Jonjo McKay jonjomckay

🚀
¯\_(ツ)_/¯
View GitHub Profile
@jonjomckay
jonjomckay / anime_renamer.php
Last active December 8, 2015 23:58
Anime Renamer
<?php
/* Anime Rename script v1.0 by Werner Buck updatdate by squareatom 02/17/2011 and again update by fda 04/17/2011 and updated by jonjomckay 08/12/2015
*
* Searches directory recursively for .mkv/.avi/.mp4 video files.
* When found it tries to find the season and episode on www.thetvdb.com to rename
* the file so it can be correctly scraped by XBMC's TvDB scraper.
*
* Can be used for SABnzbd and or as standalone script
* Requires:
* - PHP-CLI (ubuntu apt-get install php5-cli)
@jonjomckay
jonjomckay / song.rb
Created September 9, 2012 15:19 — forked from natew/song.rb
Rails model for parsing artist information from a song
class Song
# Regular expressions
RE = {
:featured => /(featuring | ?ft\.? |feat\.? |f\. |w\/){1}/i,
:remixer => / remix| rmx| edit| bootleg| mix| remake| re-work| rework| extended remix| bootleg remix/i,
:mashup_split => / \+ | x | vs\.? /i,
:producer => /^(produced by|prod\.? by |prod\. )/i,
:cover => / cover/i,
:split => /([^,&]+)(& ?([^,&]+)|, ?([^,&]+))*/i, # Splits "one, two & three"
:open => /[\(\[\{]/,