Templates ReaperDoc
uses a file called a Template to determine the format of the output file.
A template is simply a formatted file (usually HTML) with some special keywords
embedded within it. When converting a project file, the keywords will
be replaced with data from the project file. Keywords all start and
end with double pound characters (##) . The
current list of keywords are:
Project Level Info |
##FILE-NAME## |
The name of the Reaper project file |
##VERSION## |
Reaper format version number |
##TEMPO## |
Song tempo |
##SAMPLE-RATE## |
Sample Rate |
##NOTES## |
Project notes / comments |
Track Level Info |
##TRACK-NUM## |
Track Number |
##TRACK-NAME## |
Track Name |
##VOLUME## |
Track Volume |
##PAN## |
Track Pan |
##MUTE## |
Track Muted. "Mute" if muted,
otherwise blank |
##SOLO## |
Track Solo. "Solo" if track solo is
on, otherwise blank |
##FX-LIST## |
Simple list of effects - no
special group tags needed |
##ITEM-LIST## |
Simple list of items - no
special group tags needed |
##SEND-LIST## |
Simple list of sends - no
special group tags needed |
##RCV-LIST## |
Simple list of receives - no
special group tags needed |
Effects Level Info |
##FX-NUM## |
Effects sequence number |
##FX-NAME## |
Effects name |
##FX-TYPE## |
Effects type (ie VST, DX, etc) |
##FX-DLL## |
Effects DLL (used for VSTs) |
##FX-ACTIVE## |
Effects Active? ("Active" if active,
otherwise blank) |
Send Info |
##SEND-NUM## |
Send sequence number |
##SEND-TRACK-NUM## |
Send To track number |
##SEND-TRACK-NAME## |
Send To track name |
##SEND-MUTE## |
Send To Muted. "MUTE" if muted,
otherwise blank |
##SEND-VOLUME## |
Send To Volume |
##SEND-PAN## |
Send To Pan |
Receive Info |
##RCV-NUM## |
Receive From sequence number |
##RCV-TRACK-NUM## |
Receive From track number |
##RCV-TRACK-NAME## |
Receive From track name |
##RCV-MUTE## |
Send To Muted. "MUTE" if muted,
otherwise blank |
##RCV-VOLUME## |
Send To Volume |
##RCV-PAN## |
Send To Pan |
Item Level Info |
##ITEM-NUM## |
Item sequence number |
##ITEM-NAME## |
Item Name (sound file name) |
##ITEM-POS## |
Item Position |
##ITEM-LEN## |
Item Length |
##ITEM-GROUP## |
Item Group Number |
##ITEM-MUTE## |
Item Muted. "MUTE" if muted,
otherwise blank |
##ITEM-VOLUME## |
Item Volume |
##ITEM-PAN## |
Item Pan |
If / Then / Else |
<#IF |
Beginning of If Then Else
structure. ##IF must be followed by one of the following:
- -IN-GROUP - If track is inside a group
- -IS-GROUP - if this track is the group header
- -IS-MUTED - if track is muted
The keyword is followed by user defined tags or text which will
only be output if the condition is met. Note that there cannot be a
space between the ##IF and the condition. For example, "<#IF-IN-GROUP"
is valid but "<#IF -IN-GROUP" is not. |
##ELSE |
Tags or text following the
##ELSE statement will be output if the condition is NOT met |
##END-IF#> |
Ends the If Then Else
structure |
Other Info |
##TEMPLATE-NAME## |
The name of the template used for the
conversion |
##OUTPUT-NAME## |
The name of the HTML output file |
##DATE## |
Current date - uses format
selected in Preferences |
##TIME## |
Current time - uses format
selected in Preferences |
If Then Else Example The If Then Else structure is a little more
complicated than the other tags, but is useful for only outputting certain
tags or text if a particular condition is met. For example: <#IF-IN-GROUP <FONT COLOR=BLUE> ##ELSE <FONT COLOR=BLACK> ##ENDIF#> In the
above example, the blue font will be used if the track is within a group,
otherwise it will use a black font. See the "list_template" template
file to see how the If Then Else structure is used.
Special Tags Templates may also contain special HTML tags.
These tags handle repeating groups of data, like multiple effects per track
and multiple tracks per project.
<!-- TRACK_START --> |
Marks the beginning of the track info |
<!--
TRACK_END --> |
Marks the end of the
track info |
<!-- FX_START --> |
Marks the beginning of the effects info |
<!--
FX_END --> |
Marks the end of the
effects info |
<!--
ITEM_START --> |
Marks the beginning of the item info |
<!--
ITEM_END --> |
Marks the end of the
item info |
<!--
SEND_START --> |
Marks the beginning of the item info |
<!--
SEND_END --> |
Marks the end of the
item info |
<!--
RECEIVE_START --> |
Marks the beginning of the item info |
<!--
RECEIVE_END --> |
Marks the end of the
item info |
With the track start and end tags, you tell ReaperDoc what HTML to
use for every track. So the template defines the track format once,
but ReaperDoc will duplicate that track format for every track in the
project. The effects block is marked with the FX start and end tags, and
both tags should be within the track tags. The best way to see how this is used is to look at the
default_template.html file. |