Siduction Forum

Siduction Forum => Scripting & Kernelhacking => Topic started by: horo on 2014/03/16, 11:26:22

Title: Sending images from shotwell to icedove
Post 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:
Code: [Select]
#!/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
Title: Re: Sending images from shotwell to icedove
Post by: devil on 2014/03/16, 15:09:32
way cool! :)


greetz
devil
Title: Re: Sending images from shotwell to icedove
Post by: horo on 2015/04/24, 19:07:08
Hi,

geht auch als oneliner: (unter der Voraussetzung, dass die Pfade keine Leerzeichen enthalten, was bei shotwell gegeben ist.)

Code: [Select]
#!/bin/sh
eval "icedove -compose \"attachment='$(echo $* | tr \  ,)'\""