clacker
Group: Members
Posts: 570
Joined: June 2004 |
|
Posted: April 16 2005,11:52 |
|
cbagger01, that's a great idea using the %D to get the path of the directory of the inactive pane. I modified my button script to use that idea. Now it handles file names with spaces, multiple file selections, and puts the converted files in the inactive pane's directory. It' works fine and it's short, but it is a little cryptic:
ls %f | xargs -i lame -S -b 96 "{}" "%D/96-{}"
the ls part puts the file names on separate lines. %f is the list of selected files in the active emelfm panel.
The xargs command runs the same command for a bunch of files. xargs -i replaces every occurance of {} and replaces it with the file name. The files are in quotes to handle files with spaces in there names.
The -S switch in lame keeps lame from using ncurses which filles up the emelfm output window with text and control charecters. The -b 96 switch sets the quality of the mp3. I kept the 96-*.mp3 format, although if you're putting the output into a different directory it might not be needed.
It still requires gnu-utils to be loaded first.
|