App-txtnix
view release on metacpan or search on metacpan
Command to be executed before tweeting.
=item post_tweet_hook
Command to be executed after tweeting.
=item write_metadata
Write metadata about who you followed or unfollowed in your twtfile. The twtxt
file format does not specify any way to add metadata to your feed, so the
current implementation to use a text starting with I<//> is a properiaty
extension of txtnix. Use at your own risk. Defaults to false.
=item hide_metadata
Hide txtnix style metadata. Defaults to true.
=item use_colors
Use ANSI-colors for the I<pretty> layout. Defaults to true.
=item display_layout
In which format to display your timeline. I<txtnix> defines two different
layout: I<simple> is a line oriented very basic layout. I<pretty> looks
less dense and supports ANSI colors and text wrapping. Defaults to simple.
=item wrap_text
If to wrap text in pretty display. Defaults to true.
=back
=head2 followings
This section holds all your followings as nick, URL pairs. You can edit
this section manually or use the follow/unfollow commands of twtxt for
greater comfort.
=head2 colors
In I<pretty mode> mentions, hashtags, the nick and timestamp can be colorized
with ANSI colors. You can set either I<mention>, I<hashtag>, I<time> or
I<nick>:
[colors]
nick = blue on_magenta
time = grey09
hashtag = rgb515
mention =
Setting a value to an empty string will disable coloring for that element.
=head1 Hooks
I<pre_tweet_hook> and I<post_tweet_hook> are very useful if you want to
push your twtxt file to a remote server. The following examples are just
some ideas, basically the sky is the limit.
Transmit the the latest tweet via curl to an http endpoint:
post_tweet_hook = "tail -1 {twtfile} | curl -s -d @- -d 'name=foo' -d 'password=bar' http://example.com/feeds"
Publish your twtfile on aws s3:
post_tweet_hook = "aws s3 cp {twtfile} s3://mybucket.org/twtxt.txt --cache-control 'max-age=60,public'"
Update your git hosted twtfile before tweeting and push it afterwards:
pre_tweet_hook = "cd ~/git/website && git pull --rebase --prune"
post_tweet_hook = "cd ~/git/website && git commit -m tweet twtxt.txt && git push"
=head1 COPYRIGHT AND LICENSE
Copyright 2015 Mario Domgoergen C<< <mario@domgoergen.com> >>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
=cut
( run in 1.392 second using v1.01-cache-2.11-cpan-524268b4103 )