NAME
Beagle::Cmd::Command::spread - spread entries
SYNOPSIS
$ beagle spread --command /path/to/cmd id1 id2
$ beagle spread --command /path/to/cmd --template '<: $url :>' id1 id2
$ beagle spread --command /path/to/cmd --template-file short id1 id2
DESCRIPTION
spread
is used to broadcast entries via command specified by --command
. By default, each entry will be converted to an MIME message,
You can use --template
or --template-file
to override this, in which case each entry will be converted to a plain message based on the template. (All the templates use Text::Xslate
engine.)
There are 3 items you can customize: from
, to
and subject
.
- from
-
In MIME messages, it's the value of head field
From
.By default it's the beagle owner's email( a.k.a the one in file info )
- to
-
In MIME messages, it's the value of head field
To
.By default it's empty.
- subject
-
In MIME messages, it's the value of head field
Subject
.By default it's the entry's summary with 80 chars at most.
Vars bound to Text::Xslate
templates are:
{
handle => $bh,
entry => $entry,
id => $id,
url => $bh->info->url . '/entry/' . $id,
to => $to,
from => $from,
subject => $subject,
}
There are 3 template files in core: short
, long
and full
, which live in share/spread_templates
, you can expand the templates root via config item spread_templates_root
:
$ beagle config --set spread_templates_root=/path/to/templates
AUTHOR
sunnavy <sunnavy@gmail.com>
LICENCE AND COPYRIGHT
Copyright 2011 sunnavy@gmail.com
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.