[ALUG] Gnome context menu integration
samwise
samwise at bagshot-row.org
Thu Dec 18 10:51:14 GMT 2008
Maybe I'm missing something (I'm a primarily a KDE user), but last
time I had to do something like this, I just created a simple shell
script which was named after what I wanted to see in the Gnome context
menu:
~/.gnome2/nautilus-scripts/Convert\ XLS\ to\ CSV...
with the contents performing the action I required, so something like:
#!/bin/bash
# Convert XLS files to CSV...
notrailspace=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | sed -e
's/^ *//' -e 's/ *$//')
sh /usr/bin/xls2csv "$notrailspace"
should do what you want (not tested tho). I needed the extra sed
gubbings for the command I was calling, but you might get away with
removing it, depending on how xls2csv works. Don't forget to make it
executable.
The above isn't perfect, as I don't think it will differentiate what
files you have selected and then only show when you right-click on XLS
files, which might be possibly if you read around.
Peter.
More information about the main
mailing list