Module:SB: Difference between revisions
(Created page with "local sb = {} -- function package for HPB Scrapbooks function sb.hello( frame ) return "Hello, world!" end return sb") |
No edit summary |
||
Line 1: | Line 1: | ||
local sb = {} -- | local sb = {} -- functions package for HPB Scrapbooks | ||
function sb.hello( frame ) | function sb.hello( frame ) | ||
return "Hello, world!" | return "Hello, world!" | ||
end | end | ||
function sb.item_id( volume, page, item ) | |||
id = volume ..'-'.. page ..'-'.. item | |||
return id | |||
end | |||
return sb | return sb |
Revision as of 09:48, 15 April 2021
Lua functions for HPB Scrapbooks.
Functions
item_id
Called from {{HPB-SB-item}} for setting semantic property [[HPB SB item ID]].
{{#invoke: SB | item_id | volume=1 | page=17 | item=4 }}
footnote
Called from {{HPB-SB-item}}.
{{#invoke: SB | footnote | title= | author= | author_signed= | type= | source_title= | source_details= | notes= | archivist_notes= | language = | translator = }}
Debug example
=p.item_id{args={["volume"]="1",["page"]="17.2",["item"]="3"}}