1
0
Fork 0
forked from len0rd/rockbox

New macro: \config. Use this for tags, config file settings or in other places where a courier font is wanted. Adopted the wps-tag section to use this macro

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9891 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Martin Arver 2006-05-08 21:32:44 +00:00
parent f033902f39
commit f21f914872
2 changed files with 97 additions and 95 deletions

View file

@ -2,166 +2,167 @@
\chapter{\label{ref:wps_tags}WPS Tags} \chapter{\label{ref:wps_tags}WPS Tags}
\section{Status Bar} \section{Status Bar}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%we & Status Bar Enabled\\ \config{\%we} & Status Bar Enabled\\
\%wd & Status Bar Disabled\\ \config{\%wd} & Status Bar Disabled\\
\end{tagmap} \end{tagmap}
These tags override the player setting for the display of the status bar. These tags override the player setting for the display of the status bar.
They must be noted on their own line. They must be noted on their own line.
\section{ID3 Info} \section{ID3 Info}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%ia & ID3 Artist\\ \config{\%ia} & ID3 Artist\\
\%ic & ID3 Composer\\ \config{\%ic} & ID3 Composer\\
\%id & ID3 Album Name\\ \config{\%id} & ID3 Album Name\\
\%ig & ID3 Genre Name\\ \config{\%ig} & ID3 Genre Name\\
\%in & ID3 Track Number\\ \config{\%in} & ID3 Track Number\\
\%it & ID3 Track Title\\ \config{\%it} & ID3 Track Title\\
\%iv & ID3 Version (1.0, 1.1, 2.2, 2.3, 2.4 or empty if no id3 tag)\\ \config{\%iv} & ID3 Version (1.0, 1.1, 2.2, 2.3, 2.4 or empty if no id3 tag)\\
\%iy & ID3 Year\\ \config{\%iy} & ID3 Year\\
\end{tagmap} \end{tagmap}
Remember that this information is not always available, so use the Remember that this information is not always available, so use the
conditionals to show alternate information in preference to assuming. conditionals to show alternate information in preference to assuming.
\section{Power Related Information} \section{Power Related Information}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%bl & Show numeric battery level in percent.\\ \config{\%bl} & Show numeric battery level in percent.\\
& Can also be used in a conditional: & Can also be used in a conditional:
\%?bl{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}4{\textgreater}\\ \config{\%?bl{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}4{\textgreater}}\\
\%bv & Show the battery level in volts\\ \config{\%bv} & Show the battery level in volts\\
\%bt & Show estimated battery time left\\ \config{\%bt} & Show estimated battery time left\\
\%bp & ``p'' if the charger is connected \\ \config{\%bp} & ``p'' if the charger is connected \\
& (only on targets that can charge batteries)\\ & (only on targets that can charge batteries)\\
\%bc & ``c'' if the unit is currently charging the battery\\ \config{\%bc} & ``c'' if the unit is currently charging the battery\\
& (only on targets that have software charge control or monitoring)\\ & (only on targets that have software charge control or monitoring)\\
\%bs & Sleep timer. Shows the remaining time if the sleeptimer is set\\ \config{\%bs} & Sleep timer. Shows the remaining time if the sleeptimer is set\\
\end{tagmap} \end{tagmap}
\section{File Info} \section{File Info}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%fb & File Bitrate (in kbps)\\ \config{\%fb} & File Bitrate (in kbps)\\
\%fc & File Codec (e.g. ``MP3'' or ``FLAC''). % \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC''). %
This tag can also be used in a conditional tag, % This tag can also be used in a conditional tag, %
\%?fc{\textless}mp1\-{\textbar}mp2\-{\textbar}mp3\-{\textbar}wav\-% \config{\%?fc{\textless}mp1\-{\textbar}mp2\-{\textbar}mp3\-{\textbar}wav\-%
{\textbar}vorbis\-{\textbar}flac\-{\textbar}mpc\-{\textbar}a52\-% {\textbar}vorbis\-{\textbar}flac\-{\textbar}mpc\-{\textbar}a52\-%
{\textbar}wavpack\-{\textbar}alac\-{\textbar}aac\-{\textbar}shn\-% {\textbar}wavpack\-{\textbar}alac\-{\textbar}aac\-{\textbar}shn\-%
{\textbar}aiff\-% {\textbar}aiff\-%
{\textbar}unknown{\textgreater}. % {\textbar}unknown{\textgreater}}. %
The codec order is as follows: MP1, MP2, MP3, WAV, Ogg Vorbis (OGG),% The codec order is as follows: MP1, MP2, MP3, WAV, Ogg Vorbis (OGG),%
FLAC, MPC, AC3, WavPack (WV), ALAC, AAC, Shorten (SHN), AIFF\\ FLAC, MPC, AC3, WavPack (WV), ALAC, AAC, Shorten (SHN), AIFF\\
\%ff & File Frequency (in Hz)\\ \config{\%ff} & File Frequency (in Hz)\\
\%fm & File Name\\ \config{\%fm} & File Name\\
\%fn & File Name (without extension)\\ \config{\%fn} & File Name (without extension)\\
\%fp & File Path\\ \config{\%fp} & File Path\\
\%fs & File Size (In Kilobytes)\\ \config{\%fs} & File Size (In Kilobytes)\\
\%fv & ``(avg)'' if variable bit rate or ``'' if constant bit rate\\ \config{\%fv} & ``(avg)'' if variable bit rate or ``'' if constant bit rate\\
\%d1 & First directory from end of file path.\\ \config{\%d1} & First directory from end of file path.\\
\%d2 & Second directory from end of file path.\\ \config{\%d2} & Second directory from end of file path.\\
\%d3 & Third directory from end of file path.\\ \config{\%d3} & Third directory from end of file path.\\
\end{tagmap} \end{tagmap}
Example for the the \%dN commands: If the path is Example for the the \config{\%dN} commands: If the path is
``/Rock/Kent/Isola/11 - 747.mp3'', \%d1 is ``Isola'', \%d2 is ``Kent'' \dots ``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d1} is ``Isola'',
\config{\%d2} is ``Kent'' \dots
You get the picture. You get the picture.
\section{Playlist/Song Info} \section{Playlist/Song Info}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%pb & Progress Bar\\ \config{\%pb} & Progress Bar\\
\opt{player}{ \opt{player}{
& This will display a 1 character ``cup'' % & This will display a 1 character ``cup'' %
that empties as the time progresses.} that empties as the time progresses.}
\opt{recorder,recorderv2fm,h1xx,h300,ipodcolor,ipodnano}{ \opt{recorder,recorderv2fm,h1xx,h300,ipodcolor,ipodnano}{
& This will replace the entire line with a progress bar. \\ & This will replace the entire line with a progress bar. \\
& You can set the height, position and width of the progressbar % & You can set the height, position and width of the progressbar %
(in pixels): \%pb{\textbar}height{\textbar}leftpos% (in pixels): \config{\%pb{\textbar}height{\textbar}leftpos%
{\textbar}rightpos{\textbar}} \\ {\textbar}rightpos{\textbar}}} \\
\opt{player}{ \opt{player}{
\%pf & Full-line progress bar \& time display\\ \config{\%pf} & Full-line progress bar \& time display\\
} }
\%pc & Current Time In Song\\ \config{\%pc} & Current Time In Song\\
\%pe & Total Number of Playlist Entries\\ \config{\%pe} & Total Number of Playlist Entries\\
\%pm & Peak Meter (Recorder only) The entire line is used as volume peak meter.\\ \config{\%pm} & Peak Meter (Recorder only) The entire line is used as volume peak meter.\\
\%pn & Playlist Name (Without path or extension)\\ \config{\%pn} & Playlist Name (Without path or extension)\\
\%pp & Playlist Position\\ \config{\%pp} & Playlist Position\\
\%pr & Remaining Time In Song\\ \config{\%pr} & Remaining Time In Song\\
\%ps & Shuffle. Shows 's' if shuffle mode is enabled.\\ \config{\%ps} & Shuffle. Shows 's' if shuffle mode is enabled.\\
\%pt & Total Track Time\\ \config{\%pt} & Total Track Time\\
\%pv & Current volume. Can also be used in a conditional: \\ \config{\%pv} & Current volume. Can also be used in a conditional: \\
& \%?pv{\textless}0{\textbar}1{\textbar}2{\textbar}3% & \config{\%?pv{\textless}0{\textbar}1{\textbar}2{\textbar}3%
{\textbar}4{\textbar}5{\textbar}6{\textbar}7{\textbar}8% {\textbar}4{\textbar}5{\textbar}6{\textbar}7{\textbar}8%
{\textbar}9{\textbar}10{\textgreater}\\ {\textbar}9{\textbar}10{\textgreater}}\\
\end{tagmap} \end{tagmap}
\section{Runtime Database} \section{Runtime Database}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%rp & Song playcount\\ \config{\%rp} & Song playcount\\
\%rr & Song rating (0-10). This tag can also be used in a conditional tag, % \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag, %
\%?rr{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}% \config{\%?rr{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}%
4{\textbar}5{\textbar}6{\textbar}7{\textbar}8{\textbar}9{\textbar}% 4{\textbar}5{\textbar}6{\textbar}7{\textbar}8{\textbar}9{\textbar}%
10{\textgreater}\\ 10{\textgreater}}\\
\end{tagmap} \end{tagmap}
\opt{SWCODEC}{ \opt{SWCODEC}{
\section{Sound (DSP) settings} \section{Sound (DSP) settings}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%sp & display current playback pitch \\ \config{\%sp} & display current playback pitch \\
\end{tagmap} \end{tagmap}
} }
\opt{h1xx,h300}{ \opt{h1xx,h300}{
\section{Hold Switches} \section{Hold Switches}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%mh & ``h'' if the main unit hold switch is on\\ \config{\%mh} & ``h'' if the main unit hold switch is on\\
\%mr & ``r'' if the remote hold switch is on\\ \config{\%mr} & ``r'' if the remote hold switch is on\\
\end{tagmap} \end{tagmap}
} }
\section{Virtual LED} \section{Virtual LED}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%lh & ``h'' if there is hard disk activity\\ \config{\%lh} & ``h'' if there is hard disk activity\\
\end{tagmap} \end{tagmap}
\section{Repeat Mode} \section{Repeat Mode}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%mm & Repeat mode, 0-4, in the order: Off, All, One, Shuffle \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle
\opt{player,recorder,recorderv2fm}{, A-B}\\ \opt{player,recorder,recorderv2fm}{, A-B}\\
\end{tagmap} \end{tagmap}
Example: \%?mm{\textless}Off{\textbar}All{\textbar}One{\textbar}Shuffle% Example: \config{\%?mm{\textless}Off{\textbar}All{\textbar}One{\textbar}Shuffle%
{\textbar}A-B{\textgreater} {\textbar}A-B{\textgreater}}
\section{Playback Mode Tags} \section{Playback Mode Tags}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%mp & Play status, 0-4, in the order: Stop, Play, Pause, \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause,
Fast forward, Rewind\\ Fast forward, Rewind\\
\end{tagmap} \end{tagmap}
Example: \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}% Example: \config{\%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}%
Ffwd{\textbar}Rew{\textgreater} Ffwd{\textbar}Rew{\textgreater}}
\section{Images} \section{Images}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\opt{h300,x5,ipodcolor,ipodvideo}{ \opt{h300,x5,ipodcolor,ipodvideo}{
\%X{\textbar}filename.bmp{\textbar} \config{\%X{\textbar}filename.bmp{\textbar}}
& Load and set a backdrop image for the WPS. % & Load and set a backdrop image for the WPS. %
This image must be exactly the same size as your LCD.\\ This image must be exactly the same size as your LCD.\\
} }
\%P{\textbar}filename.bmp{\textbar} \config{\%P{\textbar}filename.bmp{\textbar}}
& Load a Progress bar image for the WPS. Use \%pb tag to show the & Load a Progress bar image for the WPS. Use \config{\%pb} tag to show the
progress bar\\ progress bar\\
\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar} \config{\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}}
& Load and display an image\\ & Load and display an image\\
& n: image ID (a-z and A-Z)\\ & \config{n}: image ID (a-z and A-Z)\\
& filename: filename relative to \fname{/.rockbox/} and including .bmp\\ & \config{filename}: filename relative to \fname{/.rockbox/} and including .bmp\\
& x: x coordinate\\ & \config{x}: x coordinate\\
& y: y coordinate.\\ & \config{y}: y coordinate.\\
\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar} \config{\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}}
& Preload an image for later display\\ & Preload an image for later display\\
& n: image ID (a-z and A-Z)\\ & \config{n}: image ID (a-z and A-Z)\\
& filename: filename relative to \fname{/.rockbox/} and including .bmp\\ & \config{filename}: filename relative to \fname{/.rockbox/} and including .bmp\\
& x: x coordinate\\ & \config{x}: x coordinate\\
& y: y coordinate.\\ & \config{y}: y coordinate.\\
\%xdn & Display a preloaded image\\ \config{\%xdn} & Display a preloaded image\\
& n: image ID (a-z and A-Z)\\ & \config{n}: image ID (a-z and A-Z)\\
\end{tagmap} \end{tagmap}
Example: image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109 would be:\\ Example: image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109 would be:\\
\%x{\textbar}a{\textbar}bg.bmp{\textbar}37{\textbar}109{\textbar} \config{\%x{\textbar}a{\textbar}bg.bmp{\textbar}37{\textbar}109{\textbar}}
\note{ \note{
\begin{itemize} \begin{itemize}
@ -176,9 +177,9 @@ Example: image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109 would be:\\
\section{Alignment} \section{Alignment}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%al & Text is left aligned\\ \config{\%al} & Text is left aligned\\
\%ac & Text is center aligned\\ \config{\%ac} & Text is center aligned\\
\%ar & Text is right aligned\\ \config{\%ar} & Text is right aligned\\
\end{tagmap} \end{tagmap}
All alignment tags may be present in one line, but they need to be in the All alignment tags may be present in one line, but they need to be in the
order left -- center -- right. If the aligned texts overlap, they are merged. order left -- center -- right. If the aligned texts overlap, they are merged.
@ -186,23 +187,23 @@ order left -- center -- right. If the aligned texts overlap, they are merged.
\section{Conditional Tags} \section{Conditional Tags}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%?xx{\textless}true{\textbar}false{\textgreater} \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
& If / Else: Evaluate for true or false case \\ & If / Else: Evaluate for true or false case \\
\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater} \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
& Enumerations: Evaluate for first / second / third / \dots / last condition \\ & Enumerations: Evaluate for first / second / third / \dots / last condition \\
\end{tagmap} \end{tagmap}
\section{Other Tags} \section{Other Tags}
\begin{tagmap}{}{} \begin{tagmap}{}{}
\%\% & Display a `\%'\\ \config{\%\%} & Display a `\%'\\
\%{\textless} & Display a `{\textless}'\\ \config{\%{\textless}} & Display a `{\textless}'\\
\%{\textbar} & Display a `{\textbar}'\\ \config{\%{\textbar}} & Display a `{\textbar}'\\
\%{\textgreater} & Display a `{\textgreater}'\\ \config{\%{\textgreater}} & Display a `{\textgreater}'\\
\%; & Display a `;'\\ \config{\%;} & Display a `;'\\
\%s & Indicate that the line should scroll. Can occur anywhere in \config{\%s} & Indicate that the line should scroll. Can occur
a line (given that the text is displayed; see conditionals anywhere in a line (given that the text is
above). You can specify up to 10 scrolling lines. Scrolling displayed; see conditionals above). You can specify
lines can not contain dynamic content such as timers, up to 10 scrolling lines. Scrolling lines can not
peak meters or progress bars.\\ contain dynamic content such as timers, peak meters
or progress bars.\\
\end{tagmap} \end{tagmap}

View file

@ -202,3 +202,4 @@
\newcommand{\setting}[1]{\textsc{#1}} \newcommand{\setting}[1]{\textsc{#1}}
\newcommand{\config}[1]{\texttt{#1}}