TSCRAPERC(5)

NAME
tscraperc - tscrape_update(1) configuration file

DESCRIPTION
tscraperc is the configuration file for tscrape_update(1).

VARIABLES

tscrapepath
    can be set for the directory to store the TAB-separated feed files. The default is $HOME/.tscrape/feeds.

maxjobs
    can be used to change the amount of concurrent feed() jobs. The default is 8.

FUNCTIONS

feeds()
    This function is the required "main" entry-point function called from tscrape_update(1).

feed(name, twittername)
    Inside the feeds() function feeds can be defined by calling the feed() function, its arguments are:

    name
        Name of the feed, this is also used as the filename for the TAB-separated feed file. The feedname cannot contain '/' characters, they will be replaced with '_'.

    twittername
        Name of Twitter account to fetch data from.

OVERRIDE FUNCTIONS
Because tscrape_update(1) is a shellscript each function can be overridden to change its behaviour, notable functions are:

fetch(name, twittername, feedfile)
    Fetch feed from url and writes data to stdout, its arguments are:

    name
        Specified name in configuration file (useful for logging).

    twittername
        Name of Twitter account to fetch data from.

    feedfile
        Used feedfile (useful for comparing modification times).

    By default the tool curl(1) is used.

filter(name)
    Filter tscrape(5) data from stdin, write to stdout, its arguments are:

    name
        Feed name.

merge(name, oldfile, newfile)
    Merge data of oldfile with newfile and writes it to stdout, its arguments are:

    name
        Feed name.

    oldfile
        Old file.

    newfile
        New file.

order(name)
    Sort tscrape(5) data from stdin, write to stdout, its arguments are:

    name
        Feed name.

EXAMPLES
An example configuration file is included named tscraperc.example and also shown below:

    #tscrapepath="$HOME/.tscrape/feeds"
    # list of feeds to fetch:
    feeds() {
    	# feed <name> <twittername>
    	feed "Rich Felker" "richfelker"
    	feed "Internet of shit" "internetofshit"
    	feed "Donald Trump" "realdonaldtrump"
    }

SEE ALSO
curl(1), sh(1), tscrape_update(1)

AUTHORS
Hiltjo Posthuma <hiltjo@codemadness.org>