Beagle::Cmd::Command::spread - spread entries
$ 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
spread is used to broadcast entries via command specified by --command. By default, each entry will be converted to an MIME message,
spread
--command
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.)
--template
--template-file
Text::Xslate
There are 3 items you can customize: from, to and subject.
from
to
subject
In MIME messages, it's the value of head field From.
From
By default it's the beagle owner's email( a.k.a the one in file info )
In MIME messages, it's the value of head field To.
To
By default it's empty.
In MIME messages, it's the value of head field Subject.
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:
short
long
full
share/spread_templates
spread_templates_root
$ beagle config --set spread_templates_root=/path/to/templates
sunnavy <sunnavy@gmail.com>
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.
To install Beagle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beagle
CPAN shell
perl -MCPAN -e shell install Beagle
For more information on module installation, please visit the detailed CPAN module installation guide.