The Exporting function in Now Playing creates an external file that typically includes information about what QCD is currently playing.

Realtime (standard) exporting is usually to a web page, but it can be to any file. The process can be repeated automatically at timed intervals and/or every time track info changes. Each time realtime exporting is performed, Now Playing uses one of two template files, based on the player's current state: playing or stopped; at the end of the process, the page may be optionally uploaded to a website.

Now Playing also provides two special types of exporting, archiving and HTML playlist.

Archiving differs from realtime exporting in that each time archiving is performed, a new file is created (with a new name), to automatically create a set of matching web pages (or other files). A table of contents (TOC) page is also created automatically, and it may include links to the various pages. In essence, a full-blown website with a page for each album can be automatically generated as albums are listened to, or the current playlist can be added manually to the archive when needed. An example of an archive created with Now Playing can be viewed here.

The HTML Playlist is meant to populate QCD's music browser with a clickable tracklist, similar to playlists provided with most skins. The difference is that Now Playing's HTML Playlist is resizable and fully configurable. By manipulating the provided playlist template file, the user can set colors, fonts and sizes, unlike the standard playlists which are of fixed width and offer no configuration options. Now Playing always makes sure the playlist is synchronized with the player, eliminating the need to set exporting frequency, refresh rates and other configurations that are required when using realtime exporting.

All exporting types use the same general scheme, although the template files chosen for each type of exporting will usually be different. Template files for all exporting types are included in the Now Playing package.

  1. The template file is scanned for special QCD tags, each of which is replaced with the actual value it represents. For example, the tag <QCD_ALBUM> represents the name of the album that is currently playing, so each time this tag appears in the template file, Now Playing replaces the tag with the actual album name.
  2. Some tags are control tags for Now Playing, like conditionals and playlist tags. These will be explained later.
  3. The target file is written (the template file is not changed).

Anything in the template file which is not a QCD tag is copied "as is" to the target file; therefore, the target file can be any type of ASCII (text) file, as defined by the template file. It is probably most natural (and simple) to create a target HTML file which can easily be displayed via a web browser (this is required for the HTML playlist), and such templates are included in the Now Playing package. The actual target file generated in real time by the author's copy of Now Playing can be viewed here.

For a complete description of the various tags that can be used, see the Creating Template Files section.