Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -x
#### Media file extraction script.
# This script processes files in a directory and extracts them and places them somewhere else for filebot.
#
command -v unrar >/dev/null 2>&1 || { echo >&2 "I require unrar but it's not installed or in my $PATH. Aborting."; exit 1; }
# Set up some logging
@werkkrew
werkkrew / unrar_files.lst
Created March 25, 2016 14:57
List of file extensions we want to get from rar files, ignore anything else.
//List of file extensions to extract from RAR files
//Video Files
*.avi
*.mpg
*.mov
*.flv
*.wmv
*.asf
*.mpeg
*.m4v
@werkkrew
werkkrew / torrent-process.sh
Last active August 29, 2017 13:10
Script to get called by Deluge on Torrent completion
#!/bin/bash
#### Torrent post-processing script.
# This script gets triggered by deluge and moves/extracts a file to another place for further processing (filebot)
# The reason this script does not handle the filebot processing itself (which it could) is for flexbility of using multiple methods of downloading (e.g. usenet)
# The idea is that a filebot script monitors a folder for new files and deals with them, regardless of the source.
# This script puts the files in a central location for processing and allows them to continue seeding.
# Uncomment the following line to enable debugging
#set -x
@werkkrew
werkkrew / beets-process.sh
Last active October 7, 2020 00:58
Process with Beets
#!/bin/bash
#### Media file processing script for Beets
# This script gets triggered by some means (inotify, auditd, cron, etc.) and processes music files in some locations.
#
# Uses the already defined beets configuration for the user this script runs as.
command -v beet >/dev/null 2>&1 || { echo >&2 "I require beets but it's not installed or in my $PATH. Aborting."; exit 1; }
@werkkrew
werkkrew / filebot-process.sh
Last active April 2, 2021 13:10
Filebot Process
#!/bin/bash
#### Media file processing script for Filebot
# This script gets triggered by some means (inotify, auditd, cron, etc.) and processes media files in some locations.
# It will run the filebot amc.groovy script against these files and output them into user defined locations for HTPC use.
#
# Known Limitations:
# Not dealing with music files, just video files. I use beets for music tagging.
# Not dealing with unique video types just yet, such as comedy specials, concerts, etc. Filebot might match it okay but I am not confident about it.
#!/bin/bash
#### Seedbox Sync
#
# Sync various directories between home and seedbox, do some other things also.
#
# To use rsync, this script requires you have ssh key based logins with no passphrase
# set up between the user this script runs as and your seedbox.
logdir="/var/log/htpc"
xferlog="xferlog.log"
@werkkrew
werkkrew / process-pyroscope.sh
Last active February 21, 2022 11:28
Torrent Processing Script
#!/bin/bash
#### Torrent post-processing script.
# This script runs on an interval and checks the status of labels in rTorrent via PyroScope.
# If the label matches one which we want to process, extract/copy/move the files to where we collect them from.
# After processing, change the label to something else which we will then not process again.
#
#
# Requires: rTorrent or rTorrent-PS
# PyroScope tools (https://pyrocore.readthedocs.org/en/latest/)