Advanced Export Format Settings

RADIO AdsMan Pro support and discussion
Post Reply
Radiosoft
Forum admin
Posts: 43
Joined: Thu Mar 20, 2003 4:33 pm
Location: Russia, Omsk
Contact:

Advanced Export Format Settings

Post by Radiosoft »

Export formats define the structure of output files when exporting schedules. Each format is described by an XML file containing a filename template, a per-file line template, and optional headers/footers.

File locations

Default formats (read-only):

Code: Select all

C:\Program Files (x86)\RADIO Studio Pro\RADIO AdsMan Pro 2\Rus\Default\ExportFormats\
User formats (profile data folder):

Code: Select all

C:\ProgramData\RADIO Studio Pro\RADIO AdsMan Pro 2\Data\ExportFormats\
The profile folder path is shown in the Profile Manager or in About -> Version. Format filenames must start with export and have the .xml extension.

Adding a new format
  1. Copy a suitable format file from the default folder to the ExportFormats folder in your profile data directory (create it if it does not exist).
  2. Open the file in a text editor and adjust the parameters.
  3. Restart the program — the new format will appear in the export list.
XML structure

<export> — root element. Attributes: info (format name shown in the list), autocreate="Y" (create file if not exists), encoding (e.g. UTF-8).

<filename> — output filename template. Multiple elements are allowed — each variant appears in the selection list. Attribute info = variant description.

<file_header> — written once at the very beginning of the file (before all playlists).
<header> — written before each playlist block.
<first> — template for the first file in a playlist (falls back to <file> if absent).
<file> — main template, repeated for each file in the playlist.
<last> — template for the last file in a playlist (falls back to <file> if absent).
<bottom> — written after each playlist block.
<file_bottom> — written once at the very end of the file (after all playlists).
<mark autodelete="Y"> — marker for insertion into an existing file; data is inserted at the marker position. autodelete — remove the marker line after insertion (Y/N).

Content elements

<field id="..."> — data field; substitutes the value of the named field.
<str value="..."> — static string; outputs the attribute value as-is.
<br/> — line break.
<tab/> — tab character.
<gt/> and <lt/> — the characters > and < respectively.

Formatting attributes

format — value format. Dates: yyyy/mm/dd/hh/nn/ss. Numbers: 0 = integer.
width — pad value with spaces to this width.
backwidth — take the last N characters of the value.
case — upper / lower.
strafter / strbefore — text appended/prepended to the value.
absolute="Y" — interpret time as absolute (clock time), not relative.
timechange="1" — interpret value as seconds.
match — filter: output value only if it matches the given pattern.

XML generation: xml, xmlopen, xmlclose, xmlparam, xmlvalue, tabs (indentation depth).

Available data fields

Playlist: Software, ListDescription, ListID, ListStartTime, ListStopTime, ListDuration, ListDurationSec, DefaultDuration.

File: FileName, FileNameNoExt, FileFolder, FileTitle, FileTime, FileTimeSec, FileStartTime, FileStopTime, FileID, FileActivityID, FileActivityDate, FileActivityTime, FileActivityDateID.

Metadata: FileAlbum, FileArtist, FileComposer, FileCopyright, FileGenre, FileInfo, FileLink, FilePartition, FileSong, FileTextAuthor, FileYear.

Fade: FadeName, FadeVolume, FadeInStart, FadeInVolume, FadeInLength, FadeOutStart, FadeOutVolume, FadeOutLength, FadeOutMix, FadeStopVolume, FadeStopLength, FadeStopMix, FadeTrimStart, FadeTrimEnd.

Examples

Example 1 — Winamp M3U

Code: Select all

<export info="Winamp">
  <filename info="YYYY-MM-DD.m3u">
    <field id="ListStartTime" format="yyyy-mm-dd" strafter=".m3u"/>
  </filename>
  <file_header>
    <str value="#EXTM3U"/><br/>
  </file_header>
  <file>
    <str value="#EXTINF:"/><field id="FileTimeSec" format="0"/><str value=","/>
    <field id="FileTitle"/><br/>
    <field id="FileFolder"/><field id="FileName"/><br/>
  </file>
</export>
Example 2 — File list with absolute time

Code: Select all

<export info="File list">
  <filename info="YYYY-MM-DD.lst">
    <field id="ListStartTime" format="yyyy-mm-dd" strafter=".lst"/>
  </filename>
  <file>
    <field id="FileStartTime" format="hh:nn:ss" absolute="Y"/>
    <tab/><field id="FileTime" format="hh:nn:ss"/>
    <tab/><field id="FileFolder"/><field id="FileName"/>
  </file>
</export>
Result (tab-separated):

Code: Select all

10:00:00    00:03:35    D:\Audio\adv_shop.mp3
10:03:35    00:00:30    D:\Audio\jingle_morning.mp3
Example 3 — SONY BMS (fixed-width fields)

Code: Select all

<file>
  <field id="ListStartTime" format="hh:nn:ss" strafter=" "/>
  <field id="FileNameNoExt" backwidth="5" case="upper" width="10"/>
  <field id="FileTitle" width="25"/>
  <field id="FileTime" format="nnss" timechange="1"/>
</file>
backwidth="5" takes the last 5 characters of the filename; width="10" pads to 10 characters with spaces; case="upper" converts to uppercase.

Post Reply