Supplement(3)
π Supplement(3) π
hiii bestie π«Ά welcome to the Supplement(3) page β it's from User Contributed Perl Documentation, and the main-character module here is XMLTV::Supplement. Yes, the supplementary file loader for XMLTV grabbers is about to get the full group-chat treatment β¨
πΈ NAME πΈ
XMLTV::Supplement β Supplementary file loader for XMLTV grabbers. Lowkey iconic, ngl π
π¦ DESCRIPTION π¦
Okay so this is a 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 http://supplement.xmltv.org π This can be changed by setting the environment variable XMLTV_SUPPLEMENT to the new root-directory or root-url for supplementary files. Periodt.
β¨ EXPORTED FUNCTIONS β¨
All these functions are exported on demand. Cute, right? π
π
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 β dramatic, but fair π
π 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. Same energy, different return type π
π¦ GetSupplementFile
Get the supplement file from the local machine. Local-bestie behavior π«Ά
πΈ GetSupplementUrl
Get the supplement file from a URL. Internet-bestie behavior β¨
π§ 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( 'http://my.server.org/xmltv' );
β GetSupplementRoot
Get the root directory for loading supplementary files. Slay π
π§ 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 STDERR and the file from the cache is used. No panic, bestie β the cache has your back π
π ENVIRONMENT VARIABLES π
The XMLTV_SUPPLEMENT environment variable can be used to tell the module where the supplementary files are found.
XMLTV_SUPPLEMENT=/usr/share/xmltv
XMLTV_SUPPLEMENT=http://supplementary.xmltv.se
The XMLTV_SUPPLEMENT_VERBOSE environment variable can be used to get more debug output from XMLTV::Supplement.
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 GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
mwah π β this tea is from perl v5.42.2, dated 2025-06-30, and it's the Supplement(3) manual page. Byeee bestie π«Άβ¨
π¦ where this page comes from
- alpine 3.24: xmltv-doc 1.4.0-r1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms