NAME

A2E::NewsTmplfil

DESCRIPTION

Generate an RSS file for a given channel(s), language(s) and timeframe, using a given output template that uses either the RSS format or any kind of equivalent thereof, based on date read from tables in a database whose structure is to some extent configurable.

BUGS

Report to adv@a2e.de

VERSION

our $VERSION = '0.0.2';

PREREQUISITES

A2E::Dokfs(3)
Template(3)
A2E::SArb::Make(3)

The workhorse of make-like macro expansion in lexical source files.

OPTIONS

The options of the prerequisite library A2E::Prog(3) are also available here.

--kanal0

default channel from which title and description info is taken when no more specific info is available.

--news_babylon

also print links to news items that are not available in the native language

--lang de

print only news document references that are available in this language This variable is inherited from a parent library but has a special meaning here.

CONFIGURATION FILE

The

        /etc/opt/a2e/news_tmplfil.konf
        ~/news_tmplfil.konf
        @news_tmplfil

are read. Moreover configuration files of the prerequisite libraries are inherited.

IMPLEMENTATION

With administrator-servicable internal configuration possibilities.

Internal Constants

Overwritable Functions

The bulk of each function is forked out into a non-overwritable variant used for mix-in applications such as mlht(1)

Function defvars and forkout news_tmplfil_defvars

Function news_tmplfil_postkonfig

Here the work of reading makefiles into template variables is done. Any application that inherits this library will have the template variables read in, based on configuration and commandline options, before the main program starts.

Function postkonfig

Wrapper around news_tmplfil_postkonfig for automatic use in A2E::Prog::new_ready constructor mechanism.

Top level functions

Function tmplfil1

Process one template.

Function subkanals

recursively find all subchannels of a channel, return a list with the ancestor channel at the beginning and the descendants at the end.

Function kanal_doks uses this to build a search expression that collects newsitems. The channel-subchannel relation is expressed in the database table kanal with supkanal being the ancestor of kanal, much the same way in which a dokprop.predok is an ancestor of a dok.

Function kanal_doks

list of hashrefs regarding documents of one channel.

Function news_tmplfil

Process all templates supplied through the infaylz option and the [commandline] arguments.

TODO

mostly done, see dok:rss090314