Siduction Forum
Siduction Forum => Scripting & Kernelhacking => Topic started by: horo on 2014/03/16, 11:26:22
-
Hi,
I organize all my pictures in shotwell because "it just works". Some days ago I wanted to mail some pictures out of shotwell and found the menu entry "Send To". It opens a window where you can resize your way to big pictures (3MB) to a suitable size for mail transport (200K). But unfortunately it wants to open "nautilus-sendto". My quick'n'dirty perl script called "nautilus-sendto" takes the filenames and opens an icedove window with the resized pictures as attachment - put this into your path, e.g. /usr/local/bin:
#!/usr/bin/perl
# send pictures from shotwell via icedove
# arguments are absolute file names
# the icedove invocation looks like:
# icedove -compose "attachment='file1,file2,file3'"
# start command
$cmd = "icedove -compose \"attachment=\'";
#parse args
foreach my $a(@ARGV) {
$cmd=$cmd.$a.",";
}
#remove last comma
chop $cmd;
# closing quotation marks
$cmd = $cmd."\'\"";
exec $cmd;
Ciao, Martin
-
way cool! :)
greetz
devil
-
Hi,
geht auch als oneliner: (unter der Voraussetzung, dass die Pfade keine Leerzeichen enthalten, was bei shotwell gegeben ist.)
#!/bin/sh
eval "icedove -compose \"attachment='$(echo $* | tr \ ,)'\""