Skip to content

Instantly share code, notes, and snippets.

@jiphex
Created April 19, 2010 21:31
Show Gist options
  • Save jiphex/371662 to your computer and use it in GitHub Desktop.
Save jiphex/371662 to your computer and use it in GitHub Desktop.
<?
// obviously you probably want to make this a bit more userfriendly
if($_REQUEST['dvdtitle']) {
$dvdtitle=$_REQUEST['dvdtitle'];
system("touch /var/rip/$dvdtitle.RIP");
} else {
echo "No Title!";
}
?>
#! /usr/bin/env bash
#
# Run this in cron every minute
# Requires dvdbackup (aptitude install dvdbackup)
#
# e.g (in /var/spool/cron/root):
# * * * * * /path/to/dvdripd.sh
#
for NAME in /var/rip/*.RIP; do
if [ -f $NAME ]; then
rm -f $NAME
DVDNAME=`basename $NAME | cut -d "." -f -1`
echo "ripping $DVDNAME"
dvdbackup -M -i /dev/sr0 -o /content/DVDRips/$DVDNAME-`date +%s`
eject /dev/sr0
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment