App-txtnix
view release on metacpan or search on metacpan
$ echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >> ~/.bashrc
$ cpanm https://github.com/mdom/txtnix.git
=head1 CONFIGURATION FILE
twtxt uses a simple INI-like configuration file. It checks
~/.config/twtxt/config for its configuration, but you can overwrite it
with the command line switch I<--config>.
Here's an example conf file, showing every currently supported option:
[twtxt]
nick = bob
twtfile = ~/twtxt.txt
twturl = http://example.org/twtxt.txt
check_following = 0
use_pager = 0
use_cache = 1
disclose_identity = 0
limit_timeline = 20
timeout = 5
sorting = descending
pre_tweet_hook = "scp buckket@example.org:~/public_html/twtxt.txt {twtfile}"
post_tweet_hook = "scp {twtfile} buckket@example.org:~/public_html/twtxt.txt"
[following]
alice = https://example.org/alice.txt
charlie = https://example.org/charlie.txt
=head2 twtxt
=over 4
=item nick
Your nick, will be displayed in your timeline, expanded in your tweets
and send in your user agent string if you set I<disclose_identity>
to true. Defaults to your local username.
=item twtfile
Path to your local twtxt file. Defaults to I<~/twtxt.txt>.
=item twturl
URL to your public twtxt file. This is only needed in case you decide
to disclose your identity.
=item use_pager
Use a pager (less) to display your timeline. Defaults to false.
=item use_cache
Cache remote twtxt files locally. This defaults to true as their usually is no
reason not to do this. Every URL is checked with a I<If-Modified-Since>
header, so you still get always the most up-to-date timeline.
=item ca_file
Path to TLS certificate authority file used to verify the peer
certificate. Also activates hostname verification. Defaults to
I</etc/ssl/certs/ca-certificates.crt>. The file does not have to exist
to activate hostname verification. Setting this to an empty value
disables hostname verification on a global basis which is definitely
not recommended.
=item key_file
Path to TLS key file.
=item cert_file
Path to TLS cert file.
=item disclose_identity
Include nick and twturl in twtxt's user-agent. To respect your privacy this
feature is disabled by default. But you may enable it to let other users
discover that you follow them.
=item limit_timeline
Limit amount of tweets shown in your timeline. Defaults to 20.
=item timeout
Time a http request is allowed to take. Defaults to 5 seconds.
=item rewrite_urls
Rewrite urls you are following depending on their http response
code. Addresses that return 301 (moved permanently) are rewritten
to their new url. Return code 410 (gone) results in unfollowing that
address. Defaults to true. You get a warning if a url is rewritten.
=item embed_names
I<txtnix> expands the local names in your tweets to their urls. So I<@bob>
becomes I<@E<lt>http://example.com/twtxt.txtE<gt>>. With embed names you can
also share your local nickname with your followers. If this is set to true
mentions will be rewritten to I<@E<lt>bob http://example.com/twtxt.txtE<gt>>.
Defaults to true.
=item sorting
Order in which to sort the timeline. Can be either I<descending> or
I<ascending>. Defaults to I<descending>, so the newest tweets are on the top of
the timeline.
=item time_format
How to format dates in your timeline. This should be a strftime-like
format string. Defaults to I<%F %H:%M>.
=item pre_tweet_hook
Command to be executed before tweeting.
=item post_tweet_hook
( run in 2.311 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )