Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Sending images from shotwell to icedove  (Read 10240 times)

Offline horo

  • User
  • Posts: 199
[EN] Sending images from shotwell to icedove
« 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
omnia vincit pecunia :(

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.864
Re: Sending images from shotwell to icedove
« Reply #1 on: 2014/03/16, 15:09:32 »
way cool! :)


greetz
devil

Offline horo

  • User
  • Posts: 199
Re: Sending images from shotwell to icedove
« Reply #2 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 \  ,)'\""

omnia vincit pecunia :(