Module:Book

From Eli's Software Encyclopedia
Revision as of 12:09, August 19, 2025 by WikiVisor (talk | contribs)

Documentation for this module may be created at Module:Book/doc

local p = {}

local function getData(frame)
  local parent = frame and frame:getParent()
  if not parent then return {} end
  local args = parent.args or {}
  return args
end

function p.semanticStore(infobox)
	
end

function p.semanticStore(frame)

	local titleObj    = mw.title.getCurrentTitle()
	local data = getData(frame)

    local props = {
    	'Has Title=' .. data.booktitle,
    	'Author=' .. data.authors,
    	'+sep=,',
    	'Publisher=' .. data.publisher,
    	'Release Date=' .. data.releaseDate,
    	'Genre=' .. data.genre,
    	'ISBN=' .. data.isbn,
    	'LCC=' .. data.lcc,
    	'Book Format=' .. data.bookformat,
    	'Country=' .. data.country,
    	'Language=' .. data.language
	}
	mw.smw.set( data )

end

return p