feed2twister/README.md

66 lines
2.3 KiB
Markdown
Raw Normal View History

2014-10-13 22:36:06 +02:00
Feed2twister is a simple script to post items from RSS/ATOM feeds to
[Twister](http://twister.net.co).
2014-03-17 20:51:34 +07:00
----
**Note:** If you upgrade an old installation where you don't have
`feed2twister.conf` yet, use a copy of `feed2twister.conf.example`s and
edit it so that it contains similar settings to those you had at `conf.py`
----
2014-03-17 20:51:34 +07:00
### Prerequisites
* Python 2
2014-03-17 20:51:34 +07:00
* [Twister](http://twister.net.co/) (of course)
* [python-bitcoinrpc](https://pypi.python.org/pypi/python-bitcoinrpc/)
* [feedparser](https://pypi.python.org/pypi/feedparser/)
* [gdshortener](https://github.com/torre76/gd_shortener/) (optional)
2014-03-17 20:51:34 +07:00
### Installing
2014-10-13 22:36:06 +02:00
* run `git submodule update --init` (to install a [patched
version](https://github.com/thedod/python-bitcoinrpc/tree/unicode-fix-for-twister)
of bitcoin-rpc (a twister-related unicode fix). If you don't have
git(?) you can [download the
zip](https://github.com/thedod/python-bitcoinrpc/archive/unicode-fix-for-twister.zip),
and copy the bitcoinrpc directory into this directory (overwrite
whatever you have ther now. probably an empty folder).
2014-10-13 22:36:06 +02:00
* Copy `feed2twister.conf.example` to `feed2twister.conf` and edit it
to taste.
2014-03-17 20:51:34 +07:00
### Running
2014-10-13 22:36:06 +02:00
Normally, you would run this as a cron task:
`/path/to/this/feed2twister.py [-c CONFIGFILE] [N]`
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
if [optional] `N` is supplied, it's used as the maximum items to post
(per feed). Default is (by presence order) max_new_items_per_feed from
conf file or 0.
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
If there are more than `N` new items in a feed, "over quota" items get
marked as if they were posted (this can be handy when you add a new feed
with a long history).
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
Specifically, `python feed2twister.py 0` would make all feeds "catch up"
without posting anything.
2014-10-13 22:36:06 +02:00
if [optional] `CONFIGFILE` is supplied, it is used as a custom config
file, instead of the first file found in the following list:
`./feed2twister.conf`, `~/.config/feed2twister.conf`,
`~/.feed2twister.conf`
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
### Hidden configuration
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
Some more options are available:
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
* `do_not_include_link` (boolean, default False): if True, feed2twister
will NOT prepend the feed item title with the item link before posting
it to twister.
2014-03-17 20:51:34 +07:00
2014-10-13 22:36:06 +02:00
* `skip_first_title_char` (int, default None): if set, feed2twister will
strip this amount of character from the begining of the feed item
title. Usefull to skip your login from app.net feed for example.