@@ -4,12 +4,12 @@ See [zap2xml](https://web.archive.org/web/20200426004001/zap2xml.awardspace.info
44
55## Docker
66
7- | Tag | Description |
8- | ---| ---|
9- | latest | Stable zap2xml releases |
10- | nightly | HEAD zap2xml release |
7+ | Tag | Description |
8+ | ------- | ----------------------- |
9+ | latest | Stable zap2xml releases |
10+ | nightly | HEAD zap2xml release |
1111
12- ### Compose
12+ ### docker-compose (recommended)
1313
1414``` yaml
1515services :
@@ -19,11 +19,72 @@ services:
1919 environment :
2020 OPT_ARGS : >-
2121 -I -D -C /config/.zap2xmlrc -o /xmltv/xmltv.xml
22- SLEEPTIME : 43200 # 12 hours in seconds
23- TZ : America/New_York
24- USER_AGENT : " Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" # Optional: customize user agent
22+ TZ : America/New_York # Consider using your timezone
2523 volumes :
26- - /path/to/appdata/ zap2xml:/config
27- - /path/to/appdata/ xmltv:/xmltv # nice for mapping other drives to this that may use xmltv.xml
24+ - /path/to/zap2xml/config :/config
25+ - /path/to/xmltv:/xmltv # nice for mapping other drives to this that may use xmltv.xml
2826 restart : unless-stopped
2927` ` `
28+
29+ ## Configuration
30+
31+ ### Optional environment variables
32+
33+ | Variable | Description | Type | Default |
34+ | ------------ | ---------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
35+ | ` USER_AGENT` | Custom user agent string for HTTP requests. | String | `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36` |
36+ | `SLEEPTIME` | Number of seconds to sleep between runs (useful for scheduling in Docker or cron). | Integer | `43200` |
37+ | `TZ` | Timezone for program times (affects output XML and Perl's time calculations). | String | System default |
38+
39+ # ## Optional run configurations
40+
41+ | Option | Type | Default | Description | Config File | Command Line |
42+ | ---------------- | --------- | ----------- | ------------------------------------------------------ | ----------------------------- | ------------ |
43+ | `start` | Integer | `0` | Number of days to offset from today for the start date | `start=1` | `-s` |
44+ | `days` | Integer | `7` | Number of days of program data to fetch | `days=14` | `-d` |
45+ | `retries` | Integer | `3` | Number of connection retries before failure (max 20) | `retries=5` | `-r` |
46+ | `user` | String | (empty) | Username/email for Zap2it account | `[email protected] ` | `-u` | 47+ | `pass` | String | (empty) | Password for Zap2it account | `pass=mypassword` | `-p` |
48+ | `cache` | Directory | `cache` | Directory to store cached data files | `cache=/config/cache` | `-c` |
49+ | `ncdays` | Integer | `0` | Number of days from the end to not cache | `ncdays=2` | `-n` |
50+ | `ncsdays` | Integer | `0` | Number of days from the start to not cache | `ncsdays=1` | `-N` |
51+ | `ncmday` | Integer | `-1` | Specific day number to not cache (1-based) | `ncmday=3` | `-B` |
52+ | `outfile` | File path | `xmltv.xml` | Output XML file path | `outfile=/xmltv/xmltv.xml` | `-o` |
53+ | `outformat` | String | `xmltv` | Output format (xmltv/xtvd) | `outformat=xtvd` | `-x` |
54+ | `lang` | String | `en` | Language code for program data | `lang=es` | `-l` |
55+ | `icon` | Directory | (disabled) | Directory to store channel icons | `icon=/config/icons` | `-i` |
56+ | `trailer` | Directory | (disabled) | Directory to store movie trailers | `trailer=/config/trailers` | `-t` |
57+ | `proxy` | URL | (none) | HTTP proxy server URL | `proxy=http://localhost:8080` | `-P` |
58+ | `lineuptype` | String | (none) | Type of lineup (XTVD only) | `lineuptype=Cable` | - |
59+ | `lineupname` | String | (none) | Name of the lineup (XTVD only) | `lineupname=My Provider` | - |
60+ | `lineuplocation` | String | (none) | Location of the lineup (XTVD only) | `lineuplocation=New York, NY` | - |
61+ | `lineupid` | String | (none) | Lineup ID for TV Guide | `lineupid=X:80000` | `-Y` |
62+ | `postalcode` | String | (none) | Postal code for TV Guide | `postalcode=01010` | `-Z` |
63+ | `shiftMinutes` | Integer | `0` | Offset program times by minutes | - | `-m` |
64+ | `sleeptime` | Integer | `0` | Sleep between requests (seconds) | - | `-S` |
65+ | `allChan` | Boolean | `false` | Output all channels (not just favorites) | - | `-a` |
66+ | `outputXTVD` | Boolean | `false` | Force XTVD output format | - | `-x` |
67+ | `includeDetails` | Boolean | `false` | Include program details (extra requests) | - | `-D` |
68+ | `includeIcons` | Boolean | `false` | Include program icons (extra requests) | - | `-I` |
69+ | `retainOrder` | Boolean | `false` | Retain website channel order | - | `-b` |
70+ | `quiet` | Boolean | `false` | Quiet mode (no status output) | - | `-q` |
71+ | `wait` | Boolean | `false` | Wait on exit (require keypress) | - | `-w` |
72+ | `hexEncode` | Boolean | `false` | Hex encode HTML entities | - | `-e` |
73+ | `utf8` | Boolean | `false` | UTF-8 encoding (default : ISO-8859-1) | - | `-U` |
74+ | `liveTag` | Boolean | `false` | Output `<live />` tag | - | `-L` |
75+ | `noTBA` | Boolean | `false` | Don't cache files with "TBA" titles | - | `-T` |
76+ | `channelFirst` | Boolean | `false` | Output channel names first | - | `-F` |
77+ | `oldStyle` | Boolean | `false` | Use old tv_grab_na style channel IDs | - | `-O` |
78+ | `appendFlags` | String | (none) | Append flags to program titles | - | `-A` |
79+ | `copyYear` | Boolean | `false` | Copy movie_year to sub-title tags | - | `-M` |
80+ | `addSeries` | Boolean | `false` | Add "series" category to non-movies | - | `-j` |
81+ | `includeXMLTV` | File | (none) | Include XMLTV file in output | - | `-J` |
82+ | `useTVGuide` | Boolean | `false` | Use tvguide.com instead of gracenote.com | - | `-z` |
83+
84+ # ## Notes
85+
86+ - Configuration file values can be overridden by command line options
87+ - The configuration file supports comments (lines starting with `#`)
88+ - Empty lines are ignored
89+ - Values are trimmed of leading/trailing whitespace
90+ - Boolean options (like `outformat=xtvd`) are case-insensitive
0 commit comments