Siduction Forum > Scripting & Kernelhacking (EN)

Sending images from shotwell to icedove

(1/1)

horo:
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: ---#!/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;


--- End code ---

Ciao, Martin

devil:
way cool! :)


greetz
devil

horo:
Hi,

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


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

--- End code ---

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks WYSIWYG Editor