Merge branch 'derek' of github.com:ahnooie/automatic-ripping-machine into derek

Added devname to abcde command
Added logging stats (timers).  "grep STAT" to see parse them out.
This commit is contained in:
Derek Christensen
2016-09-20 23:14:42 -07:00
3 changed files with 76 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
logs/*
test.sh
archive/
config

71
config.sample Normal file
View File

@@ -0,0 +1,71 @@
#!/bin/bash
# ARM (Automatic Ripping Machine) oonfig file
#####################
## Directory setup ##
#####################
#Base directory of ARM media directory
#Ripped and transcoded files end up here
ARMPATH="/mnt/media/ARM/"
#Path to raw MakeMKV directory
#Destination for MakeMKV and source for HandBrake
RAWPATH="/mnt/media/ARM/raw/"
#Path to directory to hold log files
#Make sure to include trailing /
LOGPATH="/opt/arm/logs/"
#How long to let log files live before deleting (in days)
LOGLIFE=1
########################
## MakeMKV Parameters ##
########################
#Minimum length of track for MakeMKV rip (in seconds)
MINLENGTH="600"
##########################
## HandBrake Parameters ##
##########################
# Handbrake preset profile
# See https://trac.handbrake.fr/wiki/BuiltInPresets
HB_PRESET="High Profile"
#Extension of the final video file
DEST_EXT=mkv
#Handbrake binary to call
HANDBRAKE_CLI=HandBrakeCLI
#############################
## Notification Parameters ##
#############################
#Pushbullet API Key
#Leave empty or comment out to disable Pushbullet notifications
#PB_KEY=""
#IFTTT API KEY
#Leave empty or comment out to disable IFTTT notifications
#IFTTT_KEY=""
#IFTTT Event Name
IFTTT_EVENT="arm_event"
#Determine logfile name
#use the label of the DVD/CD or else use empty.log
#this is required for udev events where there is no media available
#such as ejecting the drive
if [ -z $ID_FS_LABEL]; then
LOGFILE="empty.log"
else
LOGFILE=${ID_FS_LABEL}".log"
fi
#Set full logfile path
LOG=$LOGPATH$LOGFILE

View File

@@ -2,9 +2,13 @@
#
source /opt/arm/config
# Create log dir if needed
mkdir -p $LOGPATH
{
echo "Starting Identify Script..." >> $LOG
#Clean up old log files
FILESFOUND=( $(find $LOGPATH -mtime +$LOGLIFE -type f))
echo "Deleting ${#FILESFOUND[@]} old log files:"${FILESFOUND[@]} >> $LOG