TV_GRAB_NA_DD(1p)
π TV_GRAB_NA_DD π
okay bestie, welcome to the TV_GRAB_NA_DD(1p) page β it's the User Contributed Perl Documentation one, and it's literally all about grabbing TV listings. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
tv_grab_na_dd β grab TV listings for North America using Schedules Direct http://www.schedulesdirect.org
π SYNOPSIS π
tv_grab_na_dd --help
tv_grab_na_dd --version
tv_grab_na_dd --capabilities
tv_grab_na_dd --configure [--config-file FILE] [--dd-data FILE]
[--reprocess] [--auto-config add|ignore]
[--gui OPTION]
tv_grab_na_dd --list-lineups [--config-file FILE] [--dd-data FILE]
[--reprocess]
tv_grab_na_dd [--config-file FILE] [--dd-data FILE]
[--reprocess] [--auto-config add|ignore]
[--days N] [--offset N] [--quiet] [--notrim]
[--old-chan-id] [--low-mem] [--output FILE]
[--list-channel] [--share SHAREDIR] [--list-times]
[--download-only] [--padd n] [--dropbadchar] [--agent NAME]
πΈ DESCRIPTION πΈ
This script downloads TV listings using Schedules Direct's data service, converts it to XMLTV format, and outputs the results. it's giving glow-up for your EPG.
You must first register with Schedules Direct at: http://www.schedulesdirect.org
Schedules Direct is a non-profit organization whose mission is to provide low-cost television program guide data to end-users of Open Source and Freeware applications. nonprofit king behavior π
The raw data source is Schedules Direct's SD-DD service, which purchases Data from Gracenote (formerly known as Tribune Media Services).
While the service is not available for free, Schedules Direct strives to keep costs as low as possible. slay, affordable queen π
First you must become a member at the http://www.schedulesdirect.org site.
Next, you use that website to add lineup(s) to your account.
Next, you execute tv_grab_na_dd --configure to set up the grabber.
Finally, you execute tv_grab_na_dd with no arguments and it will output listings in XML format to standard output. See below for other options.
Like many utilities, tv_grab_na_dd tries to exit with a "0" on success and something else on error. bestie is doing her best π«Ά
π Stand-alone options π
--helpβ print a help message and dip. that's it, that's the whole vibe.--versionβ show the version of the grabber.--capabilitiesβ show which capabilities the grabber supports. for more info, seehttp://wiki.xmltv.org/index.php/XmltvCapabilities
π¦ Mode selection (default is grab mode) π¦
--configureβ activates configure mode. if a config file already exists, the values in it are used as defaults.--gui OPTIONβ use this to turn on a graphical interface. OPTION may be'Tk', or left blank for the best available choice. other allowed values of OPTION are'Term'for normal terminal output (that's the default) and'TermNoProgressBar'to disable the use ofTerm::ProgressBar.--list-lineupsβ lists available lineups. only requires username in the config file. used by programs that automate the--configureprocess.
π General Options π
--config-file fileβ set the name of the configuration file. default is~/.xmltv/tv_grab_na_dd.conf. this is the file that gets created during--configuremode.--dd-data fileβ store raw Data Direct data to this file. (default is a temporary file)--reprocessβ don't get data from Data Direct, just reprocess a file saved with--dd-data.--auto-config add|ignoreβ two whole moods, bestie:- when used in
--configuremode: updates the config file, removing old channels and adding or ignoring new channels. prompts are skipped if defaults are available in the current config file. - when used in grab mode: appends new channels to the config file.
- when used in
π Grabber Mode options π
--days nβ grab n days. default is7.--offset nβ start N days after the default.--quietβ suppress some messages normally written to standard error.--notrimβ Data Direct includes shows in progress at the start time. the default behavior is to filter these shows out so data can be cleanly split between days. this option turns off that filter, so you get shows in progress at the start time. (yes, that's the trade, no cap.)--old-chan-idβ use a channel id similar to the one used by the oldtv_grab_nagrabber.--low-memβ omit all but the most basic program information. reduces memory usage.--output fileβ write xml to file rather than standard output.--list-channelβ same as--days 0.--share SHAREDIRβtv_grab_na_iconsstores icons inSHAREDIR/icons. the share directory is set at install time, but there may be times when it needs to be specified. (for example: no write access to the default share directory)--list-timesβ report toSTDERRthe Schedules DirectblockedTime(not currently enforced) andsuggestedTimevalues, to assist automated processes with scheduling.--download-onlyβ don't generate any output, just fetch the data. personally I don't see the point, but it was requested and easy to add. π--padd nβ add n spaces to the front of the start date. this is normally not needed, but can be helpful in working around a SD-DD problem when the request packet spans TCP packets. recommended initial value is"20". this is only needed if you get"invalid start time"messages. if this helps, please post results to the list.--dropbadcharβ DD data is supposed to be in UTF-8 format. sometimes DD sends bad characters which cause a"Bad XML from DD"error. this option causes those bad characters to be deleted. bye felicia π--agent NAMEβ appends NAME to the http agent string when fetching data. this is a polite way to tell Schedules Direct which application is being used. it helps developers know how many people are using their application and gives applications credit towards free accounts. be nice, get credit, periodt. β¨
π§ Automating configuration π§
Sometimes applications want to call tv_grab_na_dd as a standalone application, but automate the configure process. the best way is to hook in to the XMLTV::Ask module, but if that's not available, here is a solution.
Step1. Application creates config file with username (and optionally
password).
Step2. "tv_grab_na_dd --dd-data lineups.xml --list-lineups"
Step3. Application adds desired lineup to config file.
Step4. "tv_grab_na_dd --dd-data lineups.xml --reprocess
--auto-config add --list-channels"
Step5. Application edits config file as needed, and deletes
lineups.xml.
β Grabber Timing β
Data Direct offers a "suggested download time" that can be retrieved with the --list-times option. Its use is encouraged.
πΈ Handling Multiple Linups πΈ
(yes the heading says "Linups", we do not fix it, we respect the typo)
tv_grab_na_dd only outputs a single lineup. If your Schedules Direct account has multiple lineups, they are all downloaded even though only one is output. rude, honestly π
To process multiple lineups, use separate --config-file. Separate config files are also handy if you need different channel sets for a lineup (common with MythTV). To prevent re-downloading the data on subsequent passes, the --reprocess option is recommended.
Here's an example: (the = sign is optional, but helps readability)
tv_grab_na_dd --config-file=lineup1.dat --output=lineup1.xml --dd-data=dd.xml
tv_grab_na_dd --config-file=lineup2.dat --output=lineup2.xml --dd-data=dd.xml --reprocess
tv_grab_na_dd --config-file=lineup3.dat --output=lineup3.xml --dd-data=dd.xml --reprocess
Each config file specifies the desired lineup and channel list.
If you want to merge the lineups into a single file, you can use tv_cat:
tv_cat lineup1.xml lineup2.xml lineup3.xml >guide.xml
π Adding icon links to listings π
tv_grab_na_dd checks for channel icons in a directory share/icons. The share directory is usually set during the install. For windows exe users, it defaults to the location where xmltv.exe is. tv_grab_na_icons is available to download the icons.
π Notes on channel lists π
Channel lists can be configured both at the Schedules Direct website and through the grabber. This is done to allow multiple config files with different channel lists as Schedules Direct only supports a single channel map per lineup.
Similarly, tv_grab_na_dd only supports a single channel mapping for a station. If multiple mappings are detected, only the first one is used and you are advised to adjust your Schedules Direct lineup.
π Notes on episode numbers π
Three episode-num formats are supplied (when available):
xmltv_nsβ always"..a/b"for part"a"of"b". First twoxmltv_nsfields always blank.dd_progidβ Gracenote generated"a.b.c/d"where"a"is a unique program id,"b"is a unique episode id,"c/d"is part"c"of"d"similar toxmltv_ns.onscreenβ Distributor-designated number corresponding to an episode of a specific show. Varies by distributor.
π₯ Notes on passwords π₯
If a password is stored in the config file, the config file should be properly protected. Instead of storing the password in the config file, it can be omitted, and will be prompted for.
protect that config file bestie, it's giving open diary energy π
π¦ Notes on lineup changes π¦
Data Direct currently adds a channel to your lineup automatically when it is available. When tv_grab_na_dd sees the new channel in the Schedules Direct lineup, it prints a message (and potentially adds or ignores it based on --auto-config).
If you are sensitive to bandwidth issues, I would set --auto-config ignore and periodically check your --config-file for ignored channels and remove from your Schedules Direct lineup.
π Notes on previously-shown π
Previous releases of tv_grab_na_dd set XMLTV's "date" field for DD "original-air-date" field. The correct place for the data is "previously-shown->start". The OAD is in both places temporarily for compatibility reasons.
DD has dropped the "repeat" flag and replaced it with a "new" flag. Now we set "previously-shown
and that sentence justβ¦ ends there in the original. iconic, honestly. not me finishing it for you, I will not, that's not in the source π
π Known issues π
none! β¨
π SEE ALSO π
xmltv(5).
π Author π
Author/Maintainer: Robert Eden, rmeden@yahoo.com
Contributors:
- Ed Avis,
ed@membled.com - Don Huettl,
drh@huettl.net - Matti Airas,
mairas@iki.fi(I usedtv_grab_fias a template) - and of course everyone else I forgot to mention. :)
and that's the whole page, bestie π«Ά this was perl v5.40.1, dated 2025-04-19 β go forth and grab those listings, you absolute main character πβ¨
π¦ where this page comes from
- debian trixie: xmltv-util 1.4.0-1 Β· GPL-2.0-only
- ubuntu resolute: xmltv-util 1.4.0-1 Β· GPL-2.0-only
- ubuntu stonking: xmltv-util 1.4.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms