Module:R:grc:Beekes
Module:R:grc:Beekes » « documentation
Εύρεση σελίδων - pagination για το πρότυπο {{R:grc:Beekes}}
(2024.02. dead link)
e.g. https://archive.org/details/etymological-dictionary-of-greek/page/191/mode/1up
-- [[Template:R:grc:Beekes]]
-- dead link e.g. https://archive.org/details/etymological-dictionary-of-greek/page/191/mode/1up
local export = {}
-- ====================== errors
-- Use it with writing: if blahblah then return errorhere('xxxxxx') end
errorhere = function(errstring)
return '<div class="error">' .. errstring .. '</div>[[Κατηγορία:Σελίδες με σφάλματα στο Πρότυπο Beekes]]'
end
function export.main(frame)
-- local args = frame:getParent().args -- for Templates
local args = frame.args -- to invoke
--
local page = args[1] or ''
local result = result or ''
if page == 'contents' then result = 'n4' -- contents
elseif page == 'preface' then result = 'n5' -- Preface (sigla at n7)
elseif page == 'pregrc' then result = 'n10' -- essay on pre-Greek
elseif page == 'abbr' then result = 'n40' -- abbreviations
elseif mw.ustring.find(page, 'n') then result = page -- check [[Ζάκυνθος]]
-- NUMBERS
else
page = tonumber(page) or ''
-- α...ω with erratic numbers
if page == 189 then result = 'n233' --β
elseif page == 253 then result = 'n296' -- γ
elseif page == 365 then result = 'n407' -- ε
elseif page == 495 then result = 'n536' -- all ζ
elseif page == 496 then result = 'n537'
elseif page == 497 then result = 'n538'
elseif page == 498 then result = 'n539'
elseif page == 499 then result = 'n540'
elseif page == 500 then result = 'n541'
elseif page == 501 then result = 'n542'
elseif page == 502 then result = 'n543'
elseif page == 503 then result = 'n544'
elseif page == 504 then result = 'n545'
elseif page == 505 then result = 'n546'
elseif page == 507 then result = 'n547' -- η
elseif page == 611 then result = 'n650' -- κ
-- vol.2 (continued page numbers)
elseif page == 887 then result = 'n925' -- μ
elseif page == 1033 then result = 'n1070' -- ξ
elseif page == 1443 then result = 'n1479' -- τ
elseif page == 1543 then result = 'n1578' -- φ
elseif page == 1605 then result = 'n1639' -- χ
elseif page == 1657 then result = 'n1690' -- ψ
elseif page == 1675 then result = 'n1707' -- all ω
elseif page == 1676 then result = 'n1708'
elseif page == 1677 then result = 'n1709'
elseif page == 1678 then result = 'n1710'
elseif page == 1679 then result = 'n1711'
elseif page == 1680 then result = 'n1712'
elseif page == 1681 then result = 'n1713'
elseif page == 1682 then result = 'n1714'
elseif page == 1683 then result = 'n1715'
elseif page == 1684 then result = 'n1716'
elseif page == 1685 then result = 'n1717'
-- other pages
elseif page == 1687 then result = 'n1718' -- Bibliography
elseif page == 1747 then result = 'n1777' -- Indices
-- blank pages
elseif page == 188 or page == 252 or page == 364
or page == 494 or page == 506 or page == 610 or page == 886
or page == 1032 or page == 1142 or page == 1542 or page == 1604
or page == 1686 -- page before Bibliography
or page == 1746 -- page before Indices
then
result = errorhere('Δεν έχει περιεχόμενο αυτός ο αριθμός σελίδας. - This page number is blank.')
-- end of pages
elseif page >= 1809 then
result = errorhere('Δεν υπάρχει αυτός ο αριθμός σελίδας. - This page number does not exist.')
else
result = tostring(page)
end -- close ifs (numbers)
end -- close ifs (strings)
return result
end -- close function
return export