XMLTV::Supplement (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
XMLTV::Supplement - Supplementary file loader for XMLTV grabbersDESCRIPTION
Utility library that loads supplementary files for xmltv-grabbers and other programs in the xmltv-distribution.Supplementary files can be loaded either via http or from a local file, depending on the configuration of the module. The default is to load the files from supplement.xmltv.org This can be changed by setting the environment variable
EXPORTED FUNCTIONS
All these functions are exported on demand.- GetSupplement
-
Load a supplement file and return it as a string. Takes two parameters:
directory and filename.
my $content = GetSupplement( 'tv_grab_uk_rt', 'channel_ids' );
GetSupplement will always return a string with the content. If it fails to get the content, it prints an error-message and aborts the program.
- GetSupplementLines
-
Load a supplement file and return it as an array. Any comments or blank lines
will be removed. Takes two parameters: directory and filename.
my $content = GetSupplementLines( 'tv_grab_uk_rt', 'channel_ids' );
GetSupplementLines will always return an array with the content. If it fails to get the content, it prints an error-message and aborts the program.
- GetSupplementFile
- Get the supplement file from the local machine
- GetSupplementUrl
-
Get the supplement file from a URL
- GetSupplementDir
-
Get the base directory containing supplementary files.
e.g. $ENV{HOME}/.xmltv/supplement - SetSupplementRoot
-
Set the root directory for loading supplementary files.
SetSupplementRoot( '/usr/share/xmltv' ); SetSupplementRoot( 'my.server.org/xmltv );
- GetSupplementRoot
- Get the root directory for loading supplementary files.
CACHING
The module stores all downloaded files in a cache. The cache is stored on disk in ~/.xmltv/supplement on Unix and in CSIDL_LOCAL_APPDATA//xmltv/supplement on Windows.If a file has been downloaded less than 1 hour ago, the file from the cache is used without contacting the server. Otherwise, if the file has been downloaded more than 1 hour ago, then the module checks with the server to see if an updated file is available and downloads it if necessary.
If the server does not respond or returns an error-message, a warning is printed to
ENVIRONMENT VARIABLES
The
XMLTV_SUPPLEMENT=/usr/share/xmltv XMLTV_SUPPLEMENT=supplementary.xmltv.se
The
XMLTV_SUPPLEMENT_VERBOSE=1
COPYRIGHT
Copyright (C) 2007 Mattias Holmlund.This program is free software; you can redistribute it and/or modify it under the terms of the
This program is distributed in the hope that it will be useful, but
You should have received a copy of the