@@ -14,8 +14,8 @@ hyphenate: false
1414
1515# DESCRIPTION
1616
17- Queue Sheet is a utility that builds PDFs of lists. The printed PDFs can be
18- used to track progress through the queues when offline.
17+ Queue Sheet is a utility that builds PDFs of lists. Printed PDFs can be used
18+ to track progress through queues when offline.
1919
2020# OPTIONS
2121
@@ -34,75 +34,113 @@ used to track progress through the queues when offline.
3434# ARGUMENTS
3535
3636*QUEUES.yaml*
37- : YAML file specifying queue information
37+ : queue file
3838
3939# FILES
4040
4141# # `QUEUES.yaml`
4242
43- This file is an object with two properties.
43+ A queue is a named list of items. For example, a podcast can be represented
44+ as a queue where the queue name is the name of the podcast and each item in
45+ the queue is an episode of the podcast. Queues can optionally be organized
46+ into sections. For example, sections can be used to organize podcast queues
47+ by theme.
4448
45- The *sections* property is a list of section names (strings). Note that the
46- order determines the order in the output .
49+ Queues are specified in YAML format. They may be specified in a few different
50+ ways, depending on how you want to organize them .
4751
48- The *queues* property is a list of queue objects with the following
49- properties :
52+ To create a queue sheet of queues without sections, the YAML file consists of
53+ a list of queue objects, which have the following properties :
5054
5155*name*
52- : name of the queue (string, required)
56+ : queue name (string, required)
5357
5458*url*
5559: queue URL (string, optional)
5660
57- *section*
58- : name of the section (string, required)
59-
60- *split*
61- : *true* to display items on separate lines (boolean, default *false*)
61+ *date*
62+ : date of last update (string, optional)
6263
6364*tags*
6465: list of tags (list of string, optional)
6566
66- *date*
67- : date of last update (string, optional)
68-
6967*prev*
70- : previous (complete) item (item, optional)
68+ : previous item (item, optional)
7169
7270*next*
7371: list of next items (list of items, optional)
7472
75- If both *prev* and *next* are specified, then *prev* is ignored .
73+ The only required property is *name* .
7674
77- An item name may be specified using a string. To associate a URL with an
78- item, use an object with the following properties :
75+ The *tags* property is a list of string tags that are associated with the
76+ queue. A tag must consist of at least one ASCII letter, number, period,
77+ underscore, or dash. For example, tag "complete" can be used to indicate that
78+ there will be no new episodes of a podcast that is complete.
79+
80+ The *next* property is a list of next items in the queue. When the list is
81+ exhausted, the previous item can be specified using the *prev* property. If
82+ both *prev* and *next* are specified, *prev* is ignored.
83+
84+ Items can be specified by name only, using a string or a number. To associate
85+ a URL with an item, use an object with the following properties :
7986
8087*name*
8188: name of the item (string, required)
8289
8390*url*
8491: item URL (string, optional)
8592
86- The following tags are supported :
93+ To organize queues into sections, the YAML file should be written as an object
94+ with two properties :
8795
88- *complete *
89- : no new items will be added to the queue
96+ *sections *
97+ : list of sections names (optional)
9098
91- *partial*
92- : not all items of the source queue are added to the queue
99+ *queues*
100+ : list of queue objects (required)
101+
102+ Sections names are specified using strings. The order that the sections are
103+ listed determines the order that they are displayed on the queue sheet.
104+
105+ Queue objects are as above, with an additional property to specify the
106+ section :
107+
108+ *section*
109+ : name of the section (string, optional)
110+
111+ Queues that are not explicitly associated with a section are associated with
112+ an implicit default section.
113+
114+ To make it easier to share queue files, imports are also supported. Import
115+ another queue file using an import object instead of a queue object in a list
116+ of queues. An import object has the following properties :
117+
118+ *import*
119+ : path to the queue file to import (string, required)
120+
121+ *section*
122+ : section to associate all of the imported queues with (string, optional)
123+
124+ Paths are relative to the current file. For example, simply specify the
125+ filename of the file to import when the file is in the same directory.
126+
127+ When you specify *section*, the section must be defined in the current file.
128+ When you do not specify *section*, the sections of the imported queues are
129+ used, but they must also be defined in the current file.
93130
94131# # Template
95132
96- A LaTeX template is used to build the PDF, using XeTeX. Unless specified
97- otherwise, `template.tex` is used.
133+ YAML files specify the data, and templates determine how that data is
134+ displayed. A LaTeX template is used to build the PDF, using XeTeX. Unless
135+ specified otherwise, `template.tex` is used.
98136
99137It is a Jinja2-style template using the following syntax :
100138
101139Interpolations
102140: `<< section.name >>`
103141
104142Tags
105- : `<! if queue.isSplit !>`
143+ : `<! if section.name !>`
106144
107145Comments
108146: `<# comment # >`
@@ -120,6 +158,9 @@ A section is an object with the following properties:
120158*queues*
121159: list of queues
122160
161+ Only sections that contain queues are passed to the template. The *name*
162+ property of the default section is empty.
163+
123164A queue is an object with the following properties :
124165
125166*name*
@@ -128,24 +169,18 @@ A queue is an object with the following properties:
128169*url*
129170: queue URL or empty string if no URL (string)
130171
131- *isSplit*
132- : *true* to display items on separate lines (boolean)
133-
134- *isPartial*
135- : *true* if the partial tag is set (boolean)
136-
137- *isComplete*
138- : *true* if the complete tag is set (boolean)
139-
140172*date*
141173: date or empty string if no date (string)
142174
143- *prevItem *
175+ *prev_item *
144176: previous item or empty string if not set (item)
145177
146- *nextItems *
178+ *next_items *
147179: list of next items (list of items)
148180
181+ Queue tags are exposed as boolean properties prefixed with "tag_". For
182+ example, a tag named "complete" is exposed as "tag_complete".
183+
149184An item is an object with the following properties :
150185
151186*name*
0 commit comments