mastorss/man/mastorss.1.adoc
tastytea b76f79632c
Some checks failed
continuous-integration/drone/push Build is failing
Document usage and configuration in manpage.
2019-12-25 03:29:30 +01:00

5.4 KiB
Raw Blame History

mastorss(1) Manual Page

NAME

mastorss - Another RSS to Mastodon bot.

SYNOPSIS

mastorss [--help|--version] <profile>

DESCRIPTION

mastorss reads RSS feeds and posts the items via the Mastodon API. Does not support Atom at the moment.

OPTIONS

--help

Show help message.

--version

Show version, copyright and license.

USAGE

Put watchwords.json into ${XDG_CONFIG_HOME}/mastorss/. Launch with profile name. The first occurence of every watchword in an RSS item will be turned into a hashtag. For profile-specific watchwords see the example in watchwords.json. In the first run only the newest entry is posted.

The profile is the identifier for a feed and cant be named "global".

Example 1. Launch mastorss with the profile “example”.
% mastorss example

Configuration

If the profile does not exist yet, a configuration will be created interactively and then saved to ${XDG_CONFIG_HOME}/mastorss/config-<profile>.json.

access_token

The API token needed to communicate with the Mastodon API on the instance youre using to post.

append

This string will be appended to every post.

feedurl

The URI of the source feed.

fixes

Array of regular expressions that should be deleted from the text. For information about the syntax see perlre(1).

instance

Hostname of the instance youre using to post.

interval

Time to wait between posts.

max_size

Maximum number of characters a post can have.

skip

Array of strings with titles of posts that should be skipped. Matched against the beginning of the title; this means: “Good Day” will match “Good Day in Happytown” but not “A Good Day in Happytown”.

titles_as_cw

If true, the title will be used as the subject (also known as spoiler warning or content warning) of the post.

titles_only

If true, only post titles, no descriptions.

EXAMPLES

Configuration file

{
    "example" :
    {
        "access_token" : "123abc",
        "append" : "#bot",
        "feedurl" : "https://example.com/feed.rss",
        "fixes" :
        [
            "delete this",
            "<p>[Rr]ead more(\.{3}|…)</p>"
        ],
        "instance" : "newsbots.eu",
        "interval" : 600,
        "max_size" : 500,
        "skip" :
        [
            "If the title starts with this, skip it",
            "Skip me too!"
        ],
        "titles_as_cw" : true,
        "titles_only" : false
    }
}

PROTOCOL SUPPORT

Currently only HTTP and HTTPS are supported.

PROXY SERVERS

mastorss supports HTTP proxies set via the environment variable http_proxy. Accepted format: \http://[user[:password]@]host[:port]/ No SOCKS proxy support yet, sorry.

Example 2. Use mastorss with a proxy server
% http_proxy="http://localhost:3128/" mastorss example

FILES

Configuration file directory

${XDG_CONFIG_HOME}/mastorss/

${XDG_CONFIG_HOME} is usually ~/.config.

ERROR CODES

Code Explanation

1

No profile specified.

2

Network error.

3

File error.

4

Mastodon API error.

9

Unknown error.

DEBUGGING

Define the variable MASTORSS_DEBUG to enable debug output.

Example 3. Debug mastorss while using the profile “example”.
MASTORSS_DEBUG=1 mastorss example

SEE ALSO

perlre(1), crontab(1), crontab(5)