summaryrefslogtreecommitdiff
path: root/docs/CUSTOM_WPS_FORMAT
blob: f5634a71ff78a4f598269995cc48d7879e0478a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Custom WPS Display
wps.config File Format Specifications

Description / General Info
--------------------------
* The Custom WPS Display is used on both the Rockbox Player and Recorder, 
  as a means to customize the WPS to the user's likings.
* After editing the wps.config file, you may need to reboot your Rockbox.
* The file may be 2 lines long for the Player, and 6 lines for the Recorder.
* The line that has the time displayed on it MUST NOT be the line that
  is scrolled, or the time will not be updated.
* All characters not preceded by % are displayed as typed.

File Location
-------------
The configuration file must be located in the /.rockbox folder of the
device and must be named wps.config (lowercase)

Tags
----
ID3 Info Tags:
  %ia : ID3 Artist
  %it : ID3 Track Title
  %in : ID3 Track Number
  %id : ID3 Album Name

File Info Tags:
  %fb : File Bitrate (in kbps)
  %ff : File Frequency (in Hz)
  %fp : File Path
  %fn : File Name (without extension)
  %fm : File Name
  %fs : File Size (In Kilobytes)
  %fv : "(vbr)" if variable bit rate or "" if constant bit rate
  %d1 : First directory from end of file path.
  %d2 : Second directory from end of file path.
  %d2 : Third directory from end of file path.

Example for the the %dN commands: If the path is "/Rock/Kent/Isola/11 -
747.mp3", %d1 is "Isola", %d2 is "Kent"... You get the picture.

Playlist/Song Info Tags:
  %pb : Progress Bar (Player ONLY)
        This will display a 1 character "cup" that empties as the song goes
        forward.
  %pp : Playlist Position
  %pe : Total Number of Playlist Entries
  %pc : Current Time In Song
  %pr : Remaining Time In Song
  %pt : Total Track Time

Conditional Tags (If/Else block):
  %?xx<|> : Conditional: if the tag specified by "xx" has a value, the 
            text between the "<" and the "|" is displayed, else the text
            between the "|" and the ">" is displayed. 
            The else part is optional, so the "|" does not have to be
            specified if no else part is desired. The conditionals nest, 
            so the text in the if and else part can contain all % 
            commands, including conditionals.

Other Tags:
  %%  : Display a '%'
  %<  : Display a '<'
  %|  : Display a '|'
  %>  : Display a '>'
  %s  : Indicate that the line should scroll. Can occur anywhere in 
        a line (given that the text is displayed; see conditional 
        below). Only the first line with a %s will actually scroll.
        %s is ignored if combined with %pb, %pc or %pr on the same
        line (the result wouldn't be good anyway).

Example wps.config
------------------
%s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
%pb%pc/%pt

That is, "tracknum - title [artist, album]", where most fields are only
displayed if available. Could also be rendered as "filename" or
"tracknum - title [artist]".