[Python] rescepy - automated ReScene reconstruction.
[Python] rescepy - automated ReScene reconstruction.
Hi again.
rescepy (formerly SceneSort) is a cross-platform Python script for automated ReScene reconstruction.
https://github.com/dryes/rescepy
* Zero user intervention required - entirely automated.
* Grabs the latest srrs from srrdb.com.
* Option to process samples only.
## dependencies:
* Python3 - http://www.python.org/
* ReScene - http://www.srrdb.com/software.php
* ReSample - http://www.srrdb.com/software.php
* UnRAR - http://www.rarlab.com/
* cfv - http://cfv.sourceforge.net/
## usage:
* Simply download, retaining directory structure, and run resce.py (-h for help).
* By default the srr is saved inside the release directory - this can be changed with the '--srr-dir' option.
## notes:
* If rars exist without passing '-f' (force), the directory structure may be disrupted - run Goober's Awescript with: '--no-srr --no-srs' to remedy this.
* *nix users: it is assumed that you have created scripts in /usr/bin/ to call: mono /path/to/srr.exe
* Windows users: ensure all dependencies are included in your PATH.
* Releases determined to be fixes (eg. DiRFiX, SUBFiX, etc.) or non-video are skipped.
(everything below dated < 4th May 2012 is no longer relevant.)
rescepy (formerly SceneSort) is a cross-platform Python script for automated ReScene reconstruction.
https://github.com/dryes/rescepy
* Zero user intervention required - entirely automated.
* Grabs the latest srrs from srrdb.com.
* Option to process samples only.
## dependencies:
* Python3 - http://www.python.org/
* ReScene - http://www.srrdb.com/software.php
* ReSample - http://www.srrdb.com/software.php
* UnRAR - http://www.rarlab.com/
* cfv - http://cfv.sourceforge.net/
## usage:
* Simply download, retaining directory structure, and run resce.py (-h for help).
* By default the srr is saved inside the release directory - this can be changed with the '--srr-dir' option.
## notes:
* If rars exist without passing '-f' (force), the directory structure may be disrupted - run Goober's Awescript with: '--no-srr --no-srs' to remedy this.
* *nix users: it is assumed that you have created scripts in /usr/bin/ to call: mono /path/to/srr.exe
* Windows users: ensure all dependencies are included in your PATH.
* Releases determined to be fixes (eg. DiRFiX, SUBFiX, etc.) or non-video are skipped.
(everything below dated < 4th May 2012 is no longer relevant.)
Last edited by sweetie on June 6th, 2012, 2:34 pm, edited 6 times in total.
Re: [Linux - Bash] SceneSort scripts.
Nice scripts! I had no clue how to write a working CD1/CD2 skript
Re: [Linux - Bash] SceneSort scripts. [v2]
UPDATE: 25/6/09
Sorry for bump, but post is brand new!
Sorry for bump, but post is brand new!
[Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]
all posts below regarding MKV2M2TS, dated <21st Nov. 2009, are no longer of relevence.
Last edited by sweetie on November 21st, 2009, 5:26 am, edited 1 time in total.
[Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.
EDIT: Updated first post instead, sorry for bump.
Last edited by sweetie on July 14th, 2009, 5:29 pm, edited 1 time in total.
Re: [Linux - Bash] SceneSort scripts. [v2]
Would love to see the Verify, ReScene, and Subs / extra / Samples scripts converted to batch or perl for people who run sabnzbd on a windows box.
ReScene seems like a great idea!
ReScene seems like a great idea!
Re: [Linux - Bash] SceneSort scripts. [v2]
Yes, it would be nicer to have platform-independent scripts, such as maybe in Python, etc.
Windows batch really would be terrible.
Windows batch really would be terrible.
Re: [Linux - Bash] SceneSort scripts. [v2]
Well, ideally they'd be in Python (multi-platform), but, what you see above really is the extent of my scripting/coding knowledge. (learned from scratch as I was writing them.)
Anyone and everyone is welcome to post multi-plat. rewrites - (if you beat me to it.) I'll start with the basics (subs/sample/extras) and work from there, don't expect them to be posted too soon though.
Anyone and everyone is welcome to post multi-plat. rewrites - (if you beat me to it.) I'll start with the basics (subs/sample/extras) and work from there, don't expect them to be posted too soon though.
Last edited by sweetie on August 21st, 2009, 9:15 am, edited 1 time in total.
Re: [Linux - Bash] SceneSort scripts. [v2]
I created a Subs, Extras, NFO (and sfv) script that will automatically make Subs, Extras, Sample, or NFO directories if needed and move the respective files to them.
Its in python, and although I tested it it may mess up. This is my first python script so it is probably horribly inefficient and stupid but it seemed to work when I tested it so.
It was created on a windows platform but I believe the os.path calls should work for linux too but I really don't know.
Its in python, and although I tested it it may mess up. This is my first python script so it is probably horribly inefficient and stupid but it seemed to work when I tested it so.
It was created on a windows platform but I believe the os.path calls should work for linux too but I really don't know.
Code: Select all
import os
import string
import re
import shutil
import sys
#source = "C:\python26\"
scriptHome = os.path.abspath(os.path.join(os.path.dirname(sys.argv[1]),sys.argv[2]))
subtitle = os.path.join(scriptHome,"Subtitle")
nfo = os.path.join(scriptHome,"NFO")
extras = os.path.join(scriptHome,"Extras")
sample = os.path.join(scriptHome,"Sample")
for object in os.listdir(scriptHome):
print object
extension = object[-4:]
path = os.path.join(scriptHome,object)
if re.search(".idx",extension) or re.search(".sub",extension) or re.search(".rar",extension) and re.search("sub",object):
if os.path.isdir(subtitle):
shutil.move(path,subtitle)
else:
os.mkdir(subtitle)
shutil.move(path,subtitle)
if re.search("sample",object) and re.search(".avi",extension) or re.search(".srs",extension) or re.search("sample",object) and re.search(".mkv",extension):
if os.path.isdir(sample):
shutil.move(path,sample)
else:
os.mkdir(sample)
shutil.move(path,sample)
if re.search("extras",object) and re.search(".avi",extension) or re.search("extras",object) and re.search(".mkv",extension):
if os.path.isdir(extras):
shutil.move(path,extras)
else:
os.mkdir(extras)
shutil.move(path,extras)
if re.search(".nfo",extension) or re.search(".sfv",extension):
if os.path.isdir(nfo):
shutil.move(path,nfo)
else:
os.mkdir(nfo)
shutil.move(path,nfo)
Last edited by Jesus on September 3rd, 2009, 7:28 pm, edited 1 time in total.
Re: [Linux - Bash] SceneSort scripts. [v2]
Oh awesome.
I'll scrunitise it sometime tomorrow and update the first post.
Meanwhile, adding another (bash,sorry) ReScene script. This one really is intended as a standalone, though you could have it as post-proc. if you were overly paranoid I suppose. ;p
Entirely automated RAR rebuild. (Even downloads the flippin' SRR - (database is currently x264 only.))
I call it that.
I'll scrunitise it sometime tomorrow and update the first post.
Meanwhile, adding another (bash,sorry) ReScene script. This one really is intended as a standalone, though you could have it as post-proc. if you were overly paranoid I suppose. ;p
Entirely automated RAR rebuild. (Even downloads the flippin' SRR - (database is currently x264 only.))
I call it that.
Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.
How do i install this?
Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.
HOWTO now in original post.
Last edited by sweetie on November 21st, 2009, 6:18 am, edited 1 time in total.
Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.
nice, thanks
Correction: Replace tsMuxer variable in the second script with 'tsMuxeR'. (or location if not /usr/bin)
its case sensitive.
Correction: Replace tsMuxer variable in the second script with 'tsMuxeR'. (or location if not /usr/bin)
its case sensitive.
Last edited by stabu on September 14th, 2009, 7:39 pm, edited 1 time in total.
Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.
everything was working last night but now i get
/home/crc/NZB/Scripts/mkv2m2ts: line 38: [: too many arguments thats with a bluray x264 rip with DTS audio
and i just got this. this was a bluray rip x264 non dts
External processing by /home/crc/NZB/Scripts/noarchive-tv:
removed `rls.nfo'
removed `rls.sfv'
removed `rls.srr'
removed `/tmp/tmp.skXWISzYoo'
removed `/tmp/tmp.CrzexRiqzT'
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Can't find ttf file for font Arial
removed `xxx.x246.rls.name.here.mkv.meta'
mv: cannot stat `xxx.x246.rls.name.here-1.m2ts': No such file or directory
mv: cannot stat `*.m2ts': No such file or directory
HDTV shows seem to work. I only got one bluray x264 rip to work.
/home/crc/NZB/Scripts/mkv2m2ts: line 38: [: too many arguments thats with a bluray x264 rip with DTS audio
and i just got this. this was a bluray rip x264 non dts
External processing by /home/crc/NZB/Scripts/noarchive-tv:
removed `rls.nfo'
removed `rls.sfv'
removed `rls.srr'
removed `/tmp/tmp.skXWISzYoo'
removed `/tmp/tmp.CrzexRiqzT'
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Can't find ttf file for font Arial
removed `xxx.x246.rls.name.here.mkv.meta'
mv: cannot stat `xxx.x246.rls.name.here-1.m2ts': No such file or directory
mv: cannot stat `*.m2ts': No such file or directory
HDTV shows seem to work. I only got one bluray x264 rip to work.
Last edited by stabu on September 15th, 2009, 3:20 pm, edited 1 time in total.
Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.
I'm not entirely sure on the first problem, try the following in a backup script:stabu wrote: everything was working last night but now i get
/home/crc/NZB/Scripts/mkv2m2ts: line 38: [: too many arguments thats with a bluray x264 rip with DTS audio
and i just got this. this was a bluray rip x264 non dts
External processing by /home/crc/NZB/Scripts/noarchive-tv:
removed `rls.nfo'
removed `rls.sfv'
removed `rls.srr'
removed `/tmp/tmp.skXWISzYoo'
removed `/tmp/tmp.CrzexRiqzT'
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Can't find ttf file for font Arial
removed `xxx.x246.rls.name.here.mkv.meta'
mv: cannot stat `xxx.x246.rls.name.here-1.m2ts': No such file or directory
mv: cannot stat `*.m2ts': No such file or directory
HDTV shows seem to work. I only got one bluray x264 rip to work.
Replace lines 38 to 42 with:
Code: Select all
#if [ $VIDEO_ID -lt $AUDIO_ID ]; then
VIDEO_FPS=`grep "Frame rate" ${MKV_INFO} | sed -n 1p | cut -d'(' -f2 | cut -d' ' -f1`
#else
#VIDEO_FPS=`grep "Frame rate" ${MKV_INFO} | sed -n 2p | cut -d'(' -f2 | cut -d' ' -f1`
#fi
The second error seems to be a missing font, it's unlikely the HDTV rips will have subs, hence why it only seems to work with those. Try another font (variable at start of second script) and report back.
Last edited by sweetie on September 16th, 2009, 11:20 am, edited 1 time in total.