Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

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

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

        # 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
        mount /dev/cdrom1
        if [ -a /mnt/cdrom1/VIDEO_TS/ ]
         size=`du -B M -s /mnt/cdrom1 | awk '{print $1}'`
         mkdir shh-vob
         (vobcopy -m -o shh-vob) & pid=$!
          while [ -d /proc/$pid ]
           cursize=`du -B M -s shh-vob | awk '{print $1}'`
           expr $cursize \* 100 / $size
           currentfile=`ls -1R shh-vob | tail -n 1`
         } | gdialog --backtitle "ripping-cd bak" --title "ripping-cd"
        --gauge "dvd-rip $currentfile" 8 60 0 #currentfile doesnt print
         mv shh-vob/*/VIDEO_TS/* .; rm -rf shh-vob
         (cdparanoia -B -d /dev/cdrom1 -S 32) & pid=$!
          while [ -d /proc/$pid ]
           cursize=`du -B M -s shh-vob | awk '{print $1}'`
           expr $cursize \* 100 / $size
           currentfile=`ls -1R | tail -n 1`
         } | gdialog --backtitle "ripping-cd bak" --title "ripping-cd"
        --gauge "cd-rip $currentfile" 8 60 0

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


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 02:10 AM.

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