Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/zshall/program-guide/llms.txt

Use this file to discover all available pages before exploring further.

data/guide.xml is the data layer for the entire simulator. Every channel entry, program listing, advertisement, and station notice that appears in the on-screen guide grid is driven by this single XML file. TV.startUp() fetches it via $.ajax after the YouTube IFrame API is ready, parses it with $.parseXML, and stores the result in window.guideData. Channel implementations query this document using jQuery’s .find() to render their UI.

Root Element

<guide>
  ...
</guide>
The document root. All other elements are children or descendants of <guide>.

<videos>

<videos>
  <video id="YOUTUBE_ID" />
</videos>
Contains one or more <video> elements. Each <video> carries an id attribute set to a YouTube video ID.
<videos>
  <video id="oemoqEuJdFE" />
</videos>
The <videos> block is present in guide.xml but is not read by any channel implementation. Channel12 hardcodes videoId: '9NSVU4Gv_wA' directly in its YT.Player constructor and does not query <video> elements from guideData. The <videos> element is vestigial and reserved for future use.

<ads>

The <ads> block contains rotating advertisement content displayed in the left panel of the Channel12 layout. Each <ad> element represents one slide in the rotation.
<ads>
  <ad duration="30">
    <p>HBO<br />12 months $10.95 / mo.</p>
    <p>Sign up today!<br />1-800-555-9485</p>
  </ad>
  <ad duration="30">
    <p>Showtime Value Package<br/>Showtime, Sundance &amp; Movie Channel</p>
    <p>$10.95 / mo.<br/>1-800-555-9485</p>
  </ad>
</ads>

<ad> attributes

duration
integer
How long this ad is displayed before fading to the next, in seconds. If omitted, Channel12.defaultAdDuration (30) is used.
The element’s inner content is raw HTML markup that is injected directly into the ad panel’s .inner-box via jQuery .html(). Any valid HTML — including <p>, <br />, <strong>, and HTML entities — is supported.
If adList contains 0 entries, Channel12 displays “THIS SPACE FOR RENT” in place of ads. If adList contains exactly 1 entry, nextAd() returns immediately without advancing, so the single ad stays on screen indefinitely. The rotation cycle requires at least 2 ads.

<channel>

Each <channel> element represents one row in the program guide grid. A channel may contain <notice> elements and/or <listing> elements.
<channel number="3" name="KCBS" watchable="watchable">
  <notice>Public offices closed Monday for renovation.</notice>
  <listing timeslot="19" type="1">News</listing>
  <listing timeslot="20" type="1" rating="TV-PG">Bold and the Beautiful</listing>
</channel>

<channel> attributes

number
string
required
The channel number. Must match the numeric suffix of the corresponding JavaScript class name — e.g., number="12" maps to the Channel12 class registered in TV.classes. Also used as the channels/{padded-number}/ directory name for layout HTML.
name
string
required
Short station identifier shown in the leftmost cell of the channel’s grid row (e.g., "PRV", "KCBS", "CNN"). Truncation is handled by the CSS stylesheet.
watchable
string
Presence of this attribute (any value) means the channel appears as a data row in the listings grid. Channels without watchable are omitted from grid rows but their <notice> children still render. Channel12 itself has watchable="watchable" so it appears in its own listing grid.
default
string
Presence of this attribute marks this channel as the one loaded at startup. TV.startUp() queries channel[watchable][default] and passes the first match’s number to showChannel. Only the first matching element is used.
noticeonly
string
Presence of this attribute causes Channel12 to skip the channel’s data row entirely (no channel number cell, no listing cells), but still render any <notice> children as full-width banner rows. Used for decorative header and footer banners.
The default channel must have its Channel subclass registered in TV.classes inside js/core/tv.js. If number="12" is marked default but Channel12 is not in this.classes, showChannel will throw a TypeError at startup.

<notice>

<notice>The Greenhill County public offices will be closed Monday.</notice>
Can appear inside any <channel> element, regardless of whether the channel has watchable or noticeonly. Renders as a full-width red banner row spanning all four table columns (the channel box plus three listing columns). HTML content inside <notice> is rendered via .html(), so markup is supported.

<listing>

<listing timeslot="33" type="movie" rating="TV-PG">
  "A Christmas Story" (1983) Peter Billingsley, Darren McGavin. (1 hr 38 min)
</listing>
Defines a single program entry for a channel. The element’s text content is used as the program title displayed in the grid cell.

<listing> attributes

timeslot
integer
required
Half-hour index counting from midnight. 0 = 12:00 AM, 1 = 12:30 AM, 2 = 1:00 AM, and so on. See the timeslot reference table below.
type
string
Controls cell styling. "1" is standard programming (default grid styling). "movie" applies the .movie CSS class, which renders a blue gradient cell background. Other values (e.g., "9" seen in several channels) are stored but not currently styled differently in the UI.
rating
string
Content rating string. Any value is valid — the original data uses G, TV-Y, TV-PG, TV-MA, PG-13, R, and adult. Currently stored in the XML but not visually rendered in the grid cells.
continuous
string
Present in the original Prevue Channel data format (e.g., continuous="continuous" on Channel 2’s Hotel Information listing). Channel12 does not implement any special rendering for this attribute — it is parsed and stored in the XML but has no effect on grid layout or cell styling in the current codebase.
data2
Internal data field from the original Prevue Channel data format. Not rendered in the current UI.
data3
Internal data field from the original Prevue Channel data format. Not rendered in the current UI.
data4
Internal data field from the original Prevue Channel data format. Not rendered in the current UI.

Timeslot Reference

Each timeslot unit represents one 30-minute interval from midnight. The Channel12 grid defaults to showing curTsStart = 19 as its first column.
TimeslotTime
012:00 AM
112:30 AM
63:00 AM
126:00 AM
189:00 AM
199:30 AM
2412:00 PM (Noon)
303:00 PM
334:30 PM
366:00 PM
397:30 PM
418:30 PM
429:00 PM
4410:00 PM
4611:00 PM
4812:00 AM (next day)

Complete Example

A well-formed guide.xml demonstrating all supported elements and attributes:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<guide>
  <videos>
    <video id="oemoqEuJdFE" />
  </videos>
  <ads>
    <ad duration="30">
      <p>HBO<br />12 months $10.95 / mo.</p>
      <p>Sign up today!<br />1-800-555-9485</p>
    </ad>
  </ads>
  <channel number="5" name="MYCH5" watchable="watchable">
    <notice>Welcome to My Channel 5!</notice>
    <listing timeslot="33" type="1" rating="TV-PG">Evening News</listing>
    <listing timeslot="35" type="movie" rating="PG">Classic Movie (1985)</listing>
  </channel>
  <channel number="12" name="PRV" default="default" watchable="watchable">
    <listing timeslot="1" type="1" continuous="continuous">Prevue Channel</listing>
  </channel>
  <channel noticeonly="noticeonly">
    <notice>Greenhill Cable TV</notice>
  </channel>
</guide>
The channel with default="default" must also have watchable="watchable" for the startup query channel[watchable][default] to find it. A channel marked default but not watchable will be ignored and no channel will load at startup.
The final <channel noticeonly="noticeonly"> at the end of the real guide.xml — containing <notice>TS99 Networks, Inc</notice> — is purely decorative. It renders as a footer banner row at the bottom of the listings grid but contributes no program data. This pattern is also used at the top of the grid to display header messages or service announcements across all channels.

Build docs developers (and LLMs) love