Module:testing/guide
Documentation for this module may be created at Module:testing/guide/τεκμηρίωση
--[=[
Module:testing - [[Module:testing/param]] -- [[Module:testing/functions]] -- [[Module:testing/data]]
Tests at [[Template:testing]] {{#invoke:testing|main}}
[[wikt:el:Sarri.greek]] 2023.
]=]--
-- this is a page with instructions about the module
-- for named parameters, how do we do different patterns for numbered positions?
--[=[ CONTENTS
* 1. on top of all param pages by language there is explanation table
* 2. GUIDE and PATTERNS for 6 params
* -. ONLY 5 paramters (withdrawn)
default 1 2 3 4 5 must be declared on top of pages
2a declaration test 1
2b declaration test 2
* 3. exceptions: all args must be rewritten as named+numbered at each individual case.
There is no reason to place the exceptions at the declaration. (tio many aliases)
-- THIS IS EXPLANATION added at all pages @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--[=[ ----------------------------- 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
---------------------------------------------------------
]=]--
-- =========================== OBSOLETE for five params
-- THIS IS EXPLANATION added at all pages @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--[=[ ----------------------------- see [[Module:testing/guide]] for more
NAMED parameters: iso-author-work-chapter-line - To number them: POSITIONS 1 2 3 4 5.
iso is always at position 1. There are 6 patterns. Data must be specified for each pattern, except default.
The patterns are created so that editor will not have to write empty parameters.
(e.g. grc|Αισχ|Πέρσ||33, author without chapter-pages)
* 3) noauthor 1 X 2 3 4
3b) and nochapter 1 X 2 X 3
* 2) onework authors 1 2 X 3 4
2b) and nochapter 1 2 X X 3
* 1) default 1 2 3 4 5
1b) and nochapter 1 2 3 X 4
Otherwise, editor can use named parameters.
--------------------------------------------------------------------------------
* Abbreviations, Latin and Greek as in transligual abbreviations for classics (see out Library).
* s is link to el.wikisource for ancient greek texts
* x is link to external source. Usually with only one page parameter filled by editor (args['page'])
---------------------------------------------------------
]=]--
--[=[
-- 2b THIS IS DECLARATION test 2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- ================== 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 e.g. for type 1 2 3 X 4
-- mychapter='' myline = args['4'] or args['line'] or ''
-- ======================= noauthor
-- 1 X 2 X 3
if -- need to name the work
args['2'] == 'Batr' or args['2'] == 'Βατραχομ'
-- or ...
-- pattern == 'threeb' -- this does not work
then
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 X 2 3 4
elseif pattern == 'three' then
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mychapter = args['chapter'] or args['3'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- ======================= onework authors
-- 1 2 X X 4
elseif pattern == 'twob' and onework == '1' then
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 2 X 3 4
elseif pattern == 'two' and onework == '1' then
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
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 3 X 4
elseif pattern == "oneb" then
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 3 4 5
else
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] 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 ''
end -- close patterns
---------------------------------------------------------
]=]--
--[=[
-- 2a THIS IS DECLARATION test 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- ================== numbering PATTERNS =======================
--THIS IS IN MAIN PAGE mylang = args['iso'] or args['1'] or '' args['iso'] = args['iso'] or ''
-- ======================= noauthor
-- 1 X MAKE LIST for noauthor works -- do not use if mywork == 'xxx' -- copypaste exactly the alias abbreviations
-- PLUS write it again at its section
if args['2'] == 'xxx' or args['2'] == 'χχχ'
-- or ...
then
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
-- 1 X 2 X 3 MAKE LIST of noauthor+nochapter
-- PLUS, copypaste, this time all args -- do not use if mywork ==
if args['work'] == 'xxx' or args['work'] == 'χχχ' or args['2'] == 'xxx' or args['2'] == 'χχχχ'
-- or ...
then
mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 X 2 3 4
else
mychapter = args['chapter'] or args['3'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
end -- close nochatper for noauthor
-- ======================= onework authors
-- 1 2
else
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
-- 1 2 X 'onework' authors -- MAKE LIST, copypaste all args
if args['author'] == 'ddd' or args['author'] == 'δδδ' or args['2'] == 'ddd' or args['2'] == 'δδδ'
-- or ...
then
mywork = ''
-- 1 2 X X 3 -- MAKE LIST copypaste onework-authors with no chapters
if myauthor == 'ddd' or myauthor == 'δδδ'
-- or ...
then
mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 2 X 3 4
else
mychapter = args['chapter'] or args['3'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
end
-- =======================
-- 1 2 3
else
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
-- 1 2 3 X 4 MAKE LIST of nochapter works
-- copypaste either specific work or author (if ALL his works have the same pattern)
if mywork == 'zzz' or mywork == 'ζζζ'
or myauthor == 'ddd' or myauthor == 'δδδ' -- all his works are nochapter
then
-- copypaste under the 'if work == ...' this: mychapter='' myline = args['4'] or args['line'] or ''
mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 3 4 5 is DEFAULT
else
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
end
end -- close if work
end -- close no author
---------------------------------------------------------
]=]--
-- MAIN PAGE args PATTERN example default 1 2 3 4 5 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--[=[ MAIN PAGE
-- PARAMETERS args =============== DO NOT MOVE under the if lang, then subpages
mylang = args['iso'] or args['1'] or '' args['iso'] = args['iso'] or ''
-- yes, it also sees args['1']
-- other params for editor, named not numbered
mypage = args['page'] or args['σελ'] or '' args['page'] = args['page'] or ''
-- number of page for external links
-- for grc (Ancient Greek) function translation to Κέντρο Ελληνικής Γλώσσας.
trans_id = args['μτφ'] or args['trans_id'] or '' args['μτφ'] = args['μτφ'] or ''
trans_hi = args['φ'] or args['trans_hi'] or '' args['φ'] = args['φ'] or ''
trans_auth = args['συγγ'] or args['trans_auth'] or '' args['συγγ'] = args['συγγ'] or ''
-- PARAMETERS subpages =============== DO NOT MOVE the param subpages from here
]=]--