diff options
author | Volpeon <git@volpeon.ink> | 2022-06-12 12:07:29 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-06-12 12:07:29 +0200 |
commit | 7f2deacd64ee2e4cb5d4850a99ff298c0353017d (patch) | |
tree | 68459de3257282a8d49750d0c7d80c061e91a19b /scripts | |
parent | Only import used UI elements from iro (diff) | |
download | volpeon.ink-7f2deacd64ee2e4cb5d4850a99ff298c0353017d.tar.gz volpeon.ink-7f2deacd64ee2e4cb5d4850a99ff298c0353017d.tar.bz2 volpeon.ink-7f2deacd64ee2e4cb5d4850a99ff298c0353017d.zip |
Fixed list, updated fonts, fixed source wrapping
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/metadata_filter.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 314f2b0..cb060fa 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
@@ -185,10 +185,11 @@ function d1_page_to_list_item(meta, p) | |||
185 | } | 185 | } |
186 | end | 186 | end |
187 | 187 | ||
188 | function d2_page_to_list_item(meta, cat, p) | 188 | function d2_page_to_list_item(meta, cat, p, set_cat_title) |
189 | return { | 189 | return { |
190 | title = p.title, | 190 | title = p.title, |
191 | subtitle = p.subtitle, | 191 | subtitle = p.subtitle, |
192 | category = set_cat_title and cat.title, | ||
192 | date = p.date, | 193 | date = p.date, |
193 | position = p.position, | 194 | position = p.position, |
194 | url = p.url, | 195 | url = p.url, |
@@ -229,7 +230,7 @@ function generate_list(meta) | |||
229 | return meta.pages.all | 230 | return meta.pages.all |
230 | :map(function(cat) | 231 | :map(function(cat) |
231 | local allItems = ((cat.pages and cat.pages.all) or pandoc.List()) | 232 | local allItems = ((cat.pages and cat.pages.all) or pandoc.List()) |
232 | :map(function(p) return d2_page_to_list_item(meta, cat, p) end) | 233 | :map(function(p) return d2_page_to_list_item(meta, cat, p, false) end) |
233 | 234 | ||
234 | return cat_to_list_cat(cat, allItems) | 235 | return cat_to_list_cat(cat, allItems) |
235 | end) | 236 | end) |
@@ -241,7 +242,7 @@ function generate_list(meta) | |||
241 | :map(function(cat) | 242 | :map(function(cat) |
242 | local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) | 243 | local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) |
243 | if c.pages then | 244 | if c.pages then |
244 | return c.pages.all:map(function(p) return d2_page_to_list_item(cat, c, p) end) | 245 | return c.pages.all:map(function(p) return d2_page_to_list_item(cat, c, p, true) end) |
245 | else | 246 | else |
246 | return pandoc.List({ d1_page_to_list_item(cat, c) }) | 247 | return pandoc.List({ d1_page_to_list_item(cat, c) }) |
247 | end | 248 | end |