Module:testing/el
Documentation for this module may be created at Module:testing/el/τεκμηρίωση
--[=[
[[Module:testing]] - [[Module:testing/param]] -- [[Module:testing/functions]] -- [[Module:testing/data]]
Tests at [[Template:testing]] {{#invoke:testing|main}}
[[wikt:el:Sarri.greek]] 2023.
Also see Templates like Πρότυπο:ΠΘ:....
DONE authors + some works
* Γρυπάρης Gryparis: Σκαραβαίοι και Τερρακότες
* Πετσάλης Petsalis: Μαρία Πάρνη
* Σεφέρης Sef
DONE authors (add works manually)
* Καβάφης Cav Cavafy Kavafis
]=]--
-- this is a param test about quotations
--[=[
INSTRUCTIONS for param page: Call if from the Module by placing EXACTLY where it is needed:
require ('Module:xxx/zzz').zzz (args)
DO NOT change anything else. DO NOT add at top of page a m_zzz = require this and that.
The name of the page 'param' or zzz is also the name of the local function zzz (args), and at the end, return {zzz = zzz}
-- USE: local for the functions of THIS module
]=]--
--------------------------------------------------------------------------
-- COPY HERE parameters or functions needed from the Module
-- ...
--[=[--------------------------< I S _ S E T >------------ -- by [[w:en:User talk:Trappist the monk]]
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
]=]--
--[=[ The is_set() function may be added so that tests like this:
if args['ακε'] ~= '' and args['ακε'] ~= nil then args['ακε'] = args['ακε'] else args['ακε'] = '' end
can be reduced to:
if not is_set (args['ακε']) then args['ακε'] = '' end
]=]--
local function is_set (var)
return not (var == nil or var == '');
end
--------------------------------------------------------------------------
-- function --
--------------------------------------------------------------------------
local function el (args)
--[=[ ----------------------------- see [[Module:testing/guide]] for more
NAMED parameters: iso-author-work-bookd-chapter-line/section - To number them: POSITIONS 1 2 3 4 5 6.
iso is always at position 1. There are 12 patterns. Data must be specified for each pattern, except default.
-- if only 5 params (omit book) then would have 6 patterns.
The patterns are created so that editor will not have to write empty parameters.
(e.g. grc|Αισχ|Πέρσ|||33, author work-line/section only, omitting book and chapter
* 3) noauthor 1 X 2 3 4 5 = iso-work-book-chapter-line/section
3a) and nobook 1 X 2 X 3 4 = iso-work-chapter-line/section
3b) and nochapter 1 X 2 3 X 4 = iso-work-book-line/section
3c) and nobook+nochapter 1 X 2 X X 3 = iso-work-line/section
* 2) onework authors 1 2 X 3 4 5 = iso-author-book-chapter-line/section
2a) and nobook 1 2 X X 3 4 = iso-author-chapter-line/section
2b) and nochapter 1 2 X 3 X 4 = iso-author-book-line/section
2c) and nobook+nochapter 1 2 X X X 3 = iso-author-line/section
* 1) default 1 2 3 4 5 6 = iso-author-work-book-chapter-line/section
1a) and nobook 1 2 3 X 4 5 = iso-author-work-chapter-line/section
1b) and nochapter 1 2 3 4 X 5 = iso-author-work-book-line/section
1c) and nobook+nochapter 1 2 3 X X 4 = iso-author-work-line/section
Otherwise, editor can use named parameters.
--------------------------------------------------------------------------------
* Abbreviations, Latin and Greek as in transligual abbreviations for classics (see out Library).
SOURCES may be
* s = wikisource = el.wikisource for ancient greek & other greek texts / fr.wikisource for French etc.
* bg = books.googe
* pers = perseus.tufts.edu
* scaife.perseus cannot be linked, it has problems with = and quotation marks in the addresses
* lg = greek-language.gr (for ancient greek grc, with translations in Greek)
* x = any other external source. Usually with only one page parameter filled by editor (args['page'])
---------------------------------------------------------
]=]--
-- THIS IS DECLARATION test 3 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- ================== numbering PATTERNS =======================
-- THIS IS IN MAIN PAGE mylang = args['iso'] or args['1'] or '' args['iso'] = args['iso'] or ''
-- For each pattern COPYPASTE the args at EVERY WORK
-- ======================= noauthor
-- 1 X 2 X X 3 = iso-work-line/section
if -- need to name the work
args['2'] == 'nameit' or args['2'] == 'nameit2'
-- or ...
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = '' mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 X 2 3 X 4 = iso-work-book-line/section
elseif args['2'] == 'nameit'
-- or ...
-- pattern == 'threeb' -- this does not work
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 X 2 X 3 4 = iso-work-chapter-line/section
elseif args['2'] == 'nameit'
-- or ...
-- pattern == 'threeb' -- this does not work
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- 1 X 2 3 4 5 = iso-work-book-chapter-line/section
elseif args['2'] == 'nameit'
-- or ...
or pattern == 'three' -- this does not work
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- ======================= onework authors
-- 1 2 X X X 3 = iso-author-line/section
elseif pattern == 'twoc' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = '' mybook = '' mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 2 X 3 X 4 = iso-author-book-line/section
elseif pattern == 'twob' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 X X 3 4 = iso-author-chapter-line/section -- example: Thucydides
elseif pattern == 'twoa' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mybook = ''
mychapter = args['chapter'] or args['3'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 X 3 4 5 = iso-author-book-chapter-line/section
elseif pattern == 'two' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- =======================
-- 1 2 3 X X 4 = iso-author-work-line/section
elseif pattern == "onec"
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = '' mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 3 4 X 5 = iso-author-work-book-line/section
elseif pattern == "oneb"
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['4'] or '' args['book'] = args['book'] or ''
mychapter = ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- 1 2 3 X 4 5 = iso-author-work-chapter-line/section
elseif pattern == "onea"
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- 1 2 3 4 5 6 = iso-author-work-book-chapter-line/section
else
-- this is default, pattenr one
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['4'] or '' args['book'] = args['book'] or ''
mychapter = args['chapter'] or args['5'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['6'] or '' args['line'] = args['line'] or ''
end -- close patterns
---------------------------------------------------------
--------------------------------------------------------------------------
-- Modern Greek el --
--------------------------------------------------------------------------
--========= Γρυπάρης Gryparis
-- editor may place the name of poem with prework .τίτλος= BEFORE the title.
-- Or, as a 'chapter', after the title.
if myauthor == 'Gryp' or myauthor == 'Γρυπ' or myauthor == 'Γρυπάρης' then
lang = 'el' subject = 'ποίηση' time = '<b>19ος</b>/<b>20ός</b> αιώνας ' biblink = '{{bib|el|Gryp}} '
authorname = 'Γιάννης Γρυπάρης' wp_author = '{{w|Ιωάννης Γρυπάρης (λογοτέχνης)|Γιάννης Γρυπάρης}}'
author_time = ', 1870-1942'
if mywork == 'ST' or mywork == 'ΣΤ' or mywork == 'Σκαραβαίοι' or mywork == 'Τερρακότες' or mywork == 'ΣκαρΤερ' then
title = 'ποιητική συλλογή <i>Σκαραβαῖοι καὶ τερρακόττες</i>' -- polytonic
postinfo = 'Εκδ. Ι.Ν. Σιδέρης, έκδοση 2η, [[χ.χ.]]'
.. ' [https://olympias.lib.uoi.gr/jspui/handle/123456789/25023 pdf @olympias Πανεπιστήμιο Ιωαννίνων]'
end -- close works Γρυπάρης
end -- close Γρυπάρης
--========= Καβάφης Kavafis Cavafy
if myauthor == 'Cav' or myauthor == 'Cavafy' or myauthor == 'Kavafis' or myauthor == 'Καβ' or myauthor == 'Καβάφης' then
mylang = 'el' lang = 'el' subject = 'από τον Καβάφη'
biblink = '{{bib|el|Cav}} ' .. '[[Κατηγορία:Λήμματα με παραθέματα ποίησης (νέα ελληνικά)]]'
authorname = 'Κωνσταντίνος Καβάφης' wp_author = '{{w|Κωνσταντίνος Καβάφης}}' a_monotonic='' a_polytonic='Κωνσταντῖνος Καβάφης'
author_time = ', 1863‑1933'
-- works, manually
title = mywork
end -- close Καβάφης
--========= Πετσάλης Petsalis
if myauthor == 'Pets' or myauthor == 'Πετσ' or myauthor == 'Πετσάλης'
then
lang = 'el' subject = '' biblink = '{{bib|el|A}} '
authorname = 'Θανάσης Πετσάλης-Διομήδης' wp_author = '{{w|Θανάσης Πετσάλης - Διομήδης|Θανάσης Πετσάλης-Διομήδης}}'
author_time = ', 1904-1955'
if mywork == 'ΜΠ' or mywork == 'Μαρία Πάρνη' then
title = '<i>Μαρία Πάρνη</i>' work_year = ' (1950)' work_type = ' [μυθιστόρημα]'
subtitle = ', επανέκδοση του: «Ο προορισμός της Μαρίας Πάρνη» στην τριλογία <i>Γερές και αδύναμες γενεές</i> (1933)'
elseif mywork == 'Mavr' or mywork == 'Μαυρ' or mywork == 'Μαυρόλυκοι' then
subject = 'από τους Μαυρόλυκους του Πετσάλη'
title = '<i>Οι Μαυρόλυκοι</i>' work_year = ' (1944)' work_type = ' [μυθιστόρημα]'
end
end -- close Petsalis
--========= Σεφέρης Seferis
if myauthor == 'Sef' or myauthor == 'Seferis' or myauthor == 'Σεφ' or myauthor == 'Σεφέρης' then
mylang = 'el' lang = 'el' subject = 'από τον Σεφέρη'
biblink = '{{bib|el|Sef}} ' .. '[[Κατηγορία:Λήμματα με παραθέματα ποίησης (νέα ελληνικά)]]'
authorname = 'Γιώργος Σεφέρης' wp_author = '{{w|Γιώργος Σεφέρης}}' a_monotonic='' a_polytonic='Γιῶργος Σεφέρης'
author_time = ', Γιώργος Σεφεριάδης 1900‑1971'
if mywork == 'Στροφή' then
title = ' ποιητική συλλογή {{w|Στροφή (ποιητική συλλογή)|<i>Στροφή</i>}}' work_year = ' (1931)' work_type = ' [ποίημα]'
mybook='' mychapter = args['4'] or args['chapter'] or ''
myline = args['5'] or args['line'] or ''
-- https://www.greek-language.gr/digitalResources/literature/tools/concordance/browse.html?cnd_id=1&text_id=3033
-- other works, manually with x=
else
title = mywork
end
end -- close Καβάφης
-- ---------------------------------
end -- close function
return {el = el}