LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-15-2006, 04:23 PM   #1
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 3,989

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
nautilus scripting - shh-cd-rip


hi, i wonder how to make this print the current file it is working on:

Code:
        #!/bin/bash
        
        # shh-cd-rip-v0.5.ksh
        # rips cda's or vob's to present working directory
        # depends: vobcopy, cdparanoia, gdialog
        # this software can be distributed or modified as needed -
        season to taste.
        # schneidz
        # 12.05.2006
        
        pwd=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'`
        cd $pwd
        
        size=700
        
        mount /dev/cdrom1
        
        if [ -a /mnt/cdrom1/VIDEO_TS/ ]
        then
         size=`du -B M -s /mnt/cdrom1 | awk '{print $1}'`
         mkdir shh-vob
         (vobcopy -m -o shh-vob) & pid=$!
         {
          while [ -d /proc/$pid ]
          do
           cursize=`du -B M -s shh-vob | awk '{print $1}'`
           expr $cursize \* 100 / $size
           currentfile=`ls -1R shh-vob | tail -n 1`
          done
         } | gdialog --backtitle "ripping-cd bak" --title "ripping-cd"
        --gauge "dvd-rip $currentfile" 8 60 0 #currentfile doesnt print
        out
         mv shh-vob/*/VIDEO_TS/* .; rm -rf shh-vob
        else
         (cdparanoia -B -d /dev/cdrom1 -S 32) & pid=$!
         {
          while [ -d /proc/$pid ]
          do
           cursize=`du -B M -s shh-vob | awk '{print $1}'`
           expr $cursize \* 100 / $size
           currentfile=`ls -1R | tail -n 1`
          done
         } | gdialog --backtitle "ripping-cd bak" --title "ripping-cd"
        --gauge "cd-rip $currentfile" 8 60 0
        fi

Last edited by schneidz; 12-15-2006 at 04:35 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nautilus Scripting Questions fatsheep Programming 3 10-14-2006 10:17 PM
Dvd:rip / transcode users: when you rip dvds, is the output file the size you expect? 144419855310001 Linux - Software 0 09-02-2006 08:56 AM
Naive scripting question (for Nautilus) the_rydster Programming 3 11-15-2003 02:58 PM
Naive scripting question (for Nautilus) the_rydster Linux - General 0 11-15-2003 10:58 AM
Can't rip DVDs with dvd::rip Hammett Linux - Software 2 10-27-2003 08:35 AM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration