Module:Internet Archive: Difference between revisions

no edit summary
m (1 revision imported)
No edit summary
 
Line 42: Line 42:
   local sopt = nil                                              -- search options (default: nil)
   local sopt = nil                                              -- search options (default: nil)
   byabout = "Works by or about"
   byabout = "Works by or about"
   tagline = "at [[Internet Archive]]"
   tagline = "at [[W:Internet Archive|Internet Archive]]"
   urlhead = "https://archive.org/search.php?query="
   urlhead = "https://archive.org/search.php?query="
   mydate = ""                                                  -- birth-death date
   mydate = ""                                                  -- birth-death date
Line 581: Line 581:
   --      For an alternative method, see sandbox revision dated 5:58 am, 15 October 2014
   --      For an alternative method, see sandbox revision dated 5:58 am, 15 October 2014
   if argsbirth == "" or argsbirth == nil then
   if argsbirth == "" or argsbirth == nil then
     local birthtable = entity:formatPropertyValues( 'P569' )
     local birthtable = entity:formatPropertyValues( 'P4712' )
     local birthsplit = mw.text.split(birthtable["value"], " ")
     local birthsplit = mw.text.split(birthtable["value"], " ")
     local l, count = mw.ustring.gsub(birthtable["value"], "%S+", "")
     local l, count = mw.ustring.gsub(birthtable["value"], "%S+", "")
Line 600: Line 600:


   if argsdeath == "" or argsdeath == nil then
   if argsdeath == "" or argsdeath == nil then
     local deathtable = entity:formatPropertyValues( 'P570' )
     local deathtable = entity:formatPropertyValues( 'P4723' )
     local deathsplit = mw.text.split(deathtable["value"], " ")
     local deathsplit = mw.text.split(deathtable["value"], " ")
     local l, count = mw.ustring.gsub(deathtable["value"], "%S+", "")
     local l, count = mw.ustring.gsub(deathtable["value"], "%S+", "")