Module:Webarchive: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
change plain-> true / check for missing URL protocol as mw.uri.new() requires |
சி wayback -->வந்தவழி இயந்திரம் |
||
வரிசை 198:
return year .. "-" .. zmonth .. "-" .. zday -- 2016-09-01
elseif df == "ymd" then
return year .. " " .. nmonth .. " " ..
else
return nmonth .. " " .. day .. ", " .. year -- September 1, 2016
வரிசை 219:
-- valid URL formats that are not base62
-- http://www.webcitation.org/query?id=1138911916587475
-- http://www.webcitation.org/
-- http://www.webcitation.org/
if dt.split[2] == "query" or dt.split[2] == "cache" or tonumber(dt.split[2]) then
return "query"
end
வரி 250 ⟶ 243:
end
if not fulldate then
return inlineRed("[Date error] (4)", "error")
வரி 259 ⟶ 252:
end
--[[--------------------------<
Given a URI-path to Wayback (eg. /web/20160901010101/http://example.com )
return the formatted date eg. "September 1, 2016" in df format
Handle non-digits in snapshot ID such as "re_" and "-" and "*"
வரி 273 ⟶ 265:
local safe = path
snapdate = string.gsub(safe, "^/w?e?b?/?", "") -- Remove leading "/web/" or "/"
safe = snapdate
local N = mw.text.split(safe, "/")
snapdate = N[1]
if snapdate == "*" then -- eg. /web
return "index"
end
வரி 323 ⟶ 313:
end
வரி 396 ⟶ 333:
ulx.url1.service = "other"
ulx.url1.tail = " at " .. ulx.url1.host
if mw.ustring.find( host, "archive.org", 1, plain ) then
ulx.url1.service = "wayback"
ulx.url1.tail = " at the " .. bracketopen .. "
tracking = "Category:Webarchive template wayback links"
elseif mw.ustring.find( host, "webcitation.org", 1,
ulx.url1.service = "webcite"
ulx.url1.tail = " at " .. bracketopen .. "WebCite" .. bracketclose
tracking = "Category:Webarchive template webcite links"
elseif mw.ustring.find( host, "archive.is", 1,
ulx.url1.service = "archiveis"
ulx.url1.tail = " at " .. bracketopen .. "Archive.is" .. bracketclose
tracking = "Category:Webarchive template archiveis links"
elseif mw.ustring.find( host, "archive.
ulx.url1.service = "archiveis"
ulx.url1.tail = " at " .. bracketopen .. "Archive.is" .. bracketclose
tracking = "Category:Webarchive template archiveis links"
elseif mw.ustring.find( host, "archive
ulx.url1.service = "archiveit"
ulx.url1.tail = " at " .. bracketopen .. "Archive-It" .. bracketclose
elseif mw.ustring.find( host, "
ulx.url1.tail = " at
elseif mw.ustring.find( host, "
ulx.url1.tail = " at the " .. bracketopen .. "Library of Congress" .. bracketclose
elseif mw.ustring.find( host, "webharvest.gov", 1,
ulx.url1.tail = " at the " .. bracketopen .. "National Archives and Records Administration" .. bracketclose
elseif mw.ustring.find( host, "bibalex.org", 1,
ulx.url1.tail = " at " .. "[[Bibliotheca_Alexandrina#Internet_Archive_partnership|Bibliotheca Alexandrina]]"
elseif mw.ustring.find( host, "collectionscanada", 1,
ulx.url1.tail = " at the " .. "Canadian Government Web Archive"
elseif mw.ustring.find( host, "haw.nsk", 1,
ulx.url1.tail = " at the " .. "Croatian Web Archive (HAW)"
elseif mw.ustring.find( host, "
ulx.url1.tail = " at the " .. "Estonian Web Archive"
elseif mw.ustring.find( host, "vefsafn.is", 1,
ulx.url1.tail = " at the " .. "[[National and University Library of Iceland]]"
elseif mw.ustring.find( host, "proni.gov", 1,
ulx.url1.tail = " at the " .. bracketopen .. "Public Record Office of Northern Ireland" .. bracketclose
elseif mw.ustring.find( host, "uni-lj.si", 1,
ulx.url1.tail = " at the " .. "Slovenian Web Archive"
elseif mw.ustring.find( host, "stanford.edu", 1,
ulx.url1.tail = " at the " .. "[[Stanford University Libraries|Stanford Web Archive]]"
elseif mw.ustring.find( host, "nationalarchives.gov.uk", 1,
ulx.url1.tail = " at the " .. bracketopen .. "UK Government Web Archive" .. bracketclose
elseif mw.ustring.find( host, "parliament.uk", 1,
ulx.url1.tail = " at the " .. bracketopen .. "UK Parliament's Web Archive" .. bracketclose
elseif mw.ustring.find( host, "
ulx.url1.tail = " at the " .. bracketopen .. "UK Web Archive" .. bracketclose
elseif mw.ustring.find( host, "nlb.gov.sg", 1, plain ) then
ulx.url1.tail = " at " .. "Web Archive Singapore"
elseif mw.ustring.find( host, "
ulx.url1.tail = " at "
elseif mw.ustring.find( host, "
ulx.url1.tail = " at "
elseif mw.ustring.find( host, "
ulx.url1.tail = " at " .. "Wikiwix"
elseif mw.ustring.find( host, "perma.cc", 1, plain ) then
ulx.url1.tail = " at " .. bracketopen .. "Perma.cc" .. bracketclose
else
tracking = "Category:Webarchive template unknown archives"
வரி 686 ⟶ 590:
return inlineError("url", "Empty.") .. createTracking()
end
if mw.ustring.find( url1, "https://web.http", 1,
track["Category:Webarchive template errors"] = 1
return inlineError("url", "https://web.http") .. createTracking()
end
ulx.url1 = {}
ulx.url1.url = url1
local uri1 = mw.uri.new(ulx.url1.url)
ulx.url1.host = uri1.host
வரி 715 ⟶ 610:
local date = trimArg(args.date) or trimArg(args.date1)
if date == "*" and
date = "index"
elseif date and
local ldf = dateFormat(date)
if ldf then
வரி 734 ⟶ 629:
end
end
elseif not date and ulx.url1.service == "
date = decodeWaybackDate( uri1.path, "iso" )
if not date then
வரி 755 ⟶ 641:
date = inlineRed("[Date error] (1)", "error")
end
elseif not date then
date = inlineRed("[Date missing]", "warning")
| |||