විකිපීඩියා
siwiki
https://si.wikipedia.org/wiki/%E0%B6%B8%E0%B7%94%E0%B6%BD%E0%B7%8A_%E0%B6%B4%E0%B7%92%E0%B6%A7%E0%B7%94%E0%B7%80
MediaWiki 1.47.0-wmf.12
first-letter
මාධ්යය
විශේෂ
සාකච්ඡාව
පරිශීලක
පරිශීලක සාකච්ඡාව
විකිපීඩියා
විකිපීඩියා සාකච්ඡාව
ගොනුව
ගොනුව සාකච්ඡාව
මාධ්යවිකි
මාධ්යවිකි සාකච්ඡාව
සැකිල්ල
සැකිලි සාකච්ඡාව
උදවු
උදවු සාකච්ඡාව
ප්රවර්ගය
ප්රවර්ග සාකච්ඡාව
ද්වාරය
ද්වාරය සාකච්ඡාව
MOS
MOS talk
TimedText
TimedText talk
Module
Module talk
Event
Event talk
සයිප්රසය
0
20471
796329
781223
2026-07-23T16:26:44Z
InternetArchiveBot
63598
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
796329
wikitext
text/x-wiki
{{Infobox country
| coordinates = {{Coord|35|10|N|33|22|E|type:city}}
| languages_type = සුළුතර භාෂා
| languages2_type = [[ස්වභාෂා]]
| conventional_long_name = සයිප්රස් ජනරජය
| native_name = {{unbulleted list|{{native name|el|Κυπριακή Δημοκρατία|italics=off}}|{{native name|tr|Kıbrıs Cumhuriyeti}}}}
| image_flag = Flag of Cyprus.svg
| flag_caption = ජාතික ධජය
| image_coat = Coat of arms of Cyprus (2006).svg
| symbol_type = ජාතික ලාංඡනය
| coa_size = 90
| common_name = සයිප්රසය
| national_motto =
| national_anthem = {{lang|el|Ὕμνος εἰς τὴν Ἐλευθερίαν}}{{efn|ග්රීක ජාතික ගීය 1966 දී [[ඇමති මණ්ඩලයේ]] තීරණයක් මගින් සම්මත කරන ලදී.<ref>{{cite web |title=National Anthem |url=http://www.presidency.gov.cy/presidency/presidency.nsf/prc34_en/prc34_en?OpenDocument |website=presidency.gov.cy |access-date=3 June 2015 |archive-url=https://web.archive.org/web/20110813155316/http://www.presidency.gov.cy/presidency/presidency.nsf/prc34_en/prc34_en?OpenDocument |archive-date=13 August 2011 |url-status=dead}}</ref>}}<br />(සිංහල: "[[නිදහස සඳහා ගීතිකාව]]")<br />{{parabr}}{{center|[[File:Greece national anthem.ogg]]}}
| image_map = File:EU-Cyprus.svg
| map_caption = {{Legend|#336830|සයිප්රසය}}
{{Legend|#49c946|[[උතුරු සයිප්රසය|හිමිකම් කියන නමුත් පාලනය නොකළ භූමිය (උතුරු සයිප්රසය)]]}}{{Legend|#c6debdff|[[යුරෝපීය සංගමය]] (යුරෝපීය සංගමය තුළ සයිප්රසය ද බලන්න)}}
| capital = [[නිකොසියා, සයිප්රසය|නිකොසියා]]
| largest_city = [[ලිමස්සොල්, සයිප්රසය|ලිමස්සොල්]]<ref name="Census2021">{{Cite web |date=2024-08-09 |title=Census of Population and Housing 2021: Final Results - gov.cy |url=https://www.gov.cy/en/economy-and-finance/census-of-population-and-housing-2021-final-results/ |access-date=2024-10-01 |website=www.gov.cy |language=en-US}}</ref>
| official_languages = {{hlist|[[ග්රීක භාෂාව|ග්රීක]]|[[තුර්කි භාෂාව|තුර්කි]]}}
| languages = {{hlist|[[ආර්මේනියානු භාෂාව|ආර්මේනියානු]]|[[සයිප්රස් අරාබි]]}}
| languages2 = {{hlist|[[ග්රීක සයිප්රස්]]|[[තුර්කි සයිප්රස්]]}}
| ethnic_groups = {{unbulleted list|item_style=line-height:initial;
|[[ග්රීක සයිප්රස් වැසියන්]]
|[[තුර්කි සයිප්රස් වැසියන්]]
|[[ආර්මේනියානු සයිප්රස් වැසියන්]]
|[[මැරොනයිට් සයිප්රස් වැසියන්]]
}}
| ethnic_groups_year =
| demonym = සයිප්රියොට්
| religion = {{ublist |item_style=white-space:nowrap;
|72.3% [[ක්රිස්තියානි]]
|25.0% [[ඉස්ලාම්]]
|1.9% අනාගමික
|0.8% වෙනත්<ref>{{cite web |url=http://www.globalreligiousfutures.org/countries/cyprus/religious_demography#/?affiliations_religion_id=0&affiliations_year=2020 |title=Cyprus |work=Global Religious Future |publisher=Pew Research Center |access-date=13 July 2021 |archive-date=17 July 2014 |archive-url=https://web.archive.org/web/20140717053131/http://www.globalreligiousfutures.org/countries/cyprus/religious_demography#/?affiliations_religion_id=0&affiliations_year=2020 |url-status=live }}</ref>}}
| religion_year = 2020; උතුරු සයිප්රසය ඇතුළුව
| government_type = ඒකීය ජනාධිපති ජනරජය
| leader_title1 = ජනාධිපති
| leader_name1 = නිකොස් ක්රිස්ටෝඩවුලයිඩ්ස්
| leader_title2 = උප ජනාධිපති
| leader_name2 = පුරප්පාඩු{{efn|උප ජනාධිපති ධුරය තුර්කි සයිප්රස් වැසියෙකුට වෙන් කර ඇත. කෙසේ වෙතත්, 1974 දී තුර්කි ආක්රමණය සිට එම තනතුර පුරප්පාඩු වී ඇත.<ref name="CIA"/>}}
| leader_title3 = නියෝජිත මන්ත්රී මණ්ඩලයේ සභාපති
| leader_name3 = ඇනිටා ඩෙමෙට්රියෝ
| legislature = නියෝජිත මන්ත්රී මණ්ඩලය
| sovereignty_type = එක්සත් රාජධානිය වෙතින් නිදහස
| established_event1 = ලන්ඩන්-සූරිච් ගිවිසුම්
| established_date1 = 1959 පෙබරවාරි 19
| established_event2 = නිදහස ප්රකාශයට පත් කරන ලද්දේ
| established_date2 = 1960 අගෝස්තු 16
| established_event3 = නිදහස් දිනය
| established_date3 = 1960 ඔක්තෝබර් 1
| area_km2 = 9,251
| area_label = එකතුව{{efn|name=island|Including Northern Cyprus, the [[United Nations Buffer Zone in Cyprus|UN buffer zone]] and [[Akrotiri and Dhekelia]]}}
| area_rank = 162 වෙනි <!-- Area rank should match [[List of countries and dependencies by area]] -->
| area_sq_mi = 3,572 <!--Do not remove per [[WP:MOSNUM]]-->
| percent_water = 0.11<ref name="CIA" />
| population_census = {{IncreaseNeutral}} 923,272{{efn|Government-controlled areas of the Republic of Cyprus}}<ref>{{cite web |title=Census of Population and Housing 2021, Preliminary Results by District, Municipality/Community |url=https://www.cystat.gov.cy/en/PressRelease?id=66208 |publisher=Statistical Service of Cyprus |access-date=4 August 2023 |location=Nicosia |date=4 August 2023 |archive-date=24 May 2022 |archive-url=https://web.archive.org/web/20220524094953/https://www.cystat.gov.cy/en/PressRelease?id=66208 |url-status=live }}</ref>
| population_census_year = 2021
| population_density_km2 = 123.4{{efn|name=island}}<ref>{{cite web |work=United Nations, Department of Economic and Social Affairs, [[United Nations Population Division|Population Division]] |year=2013 |title=World Population Prospects: The 2012 Revision, DB02: Stock Indicators |location=New York |url=http://esa.un.org/unpd/wpp/ASCII-Data/DISK_NAVIGATION_ASCII.htm |access-date=18 June 2015 |archive-url=https://web.archive.org/web/20150507213545/http://esa.un.org/unpd/wpp/ASCII-Data/DISK_NAVIGATION_ASCII.htm |archive-date=7 May 2015 |url-status=dead}}</ref>
| population_density_rank = 82 වෙනි
| population_density_sq_mi = 319.5 <!-- Do not remove per [[WP:MOSNUM]] -->
| GDP_PPP = {{increase}} ඩොලර් බිලියන 61.501<ref name="IMF WEO">{{cite web |title=World Economic Outlook (WEO) database, October 2025 |url=https://data.imf.org/en/Data-Explorer?datasetUrn=IMF.RES:WEO(9.0.0) |publisher=[[International Monetary Fund]] |access-date=16 October 2025 |location=Washington, D.C. |date=14 October 2025}}</ref>
| GDP_PPP_year = 2025
| GDP_PPP_rank = 126 වෙනි
| GDP_PPP_per_capita = {{increase}} ඩොලර් 65,304<ref name="IMF WEO" />
| GDP_PPP_per_capita_rank = 28 වෙනි
| GDP_nominal = {{increase}} ඩොලර් බිලියන 39.943<ref name="IMF WEO" />
| GDP_nominal_year = 2025
| GDP_nominal_rank = 102 වෙනි
| GDP_nominal_per_capita = {{increase}} ඩොලර් 42,413<ref name="IMF WEO" />
| GDP_nominal_per_capita_rank = 28 වෙනි
| Gini = 29.4 <!--number only-->
| Gini_year = 2022
| Gini_change = steady <!--increase/decrease/steady-->
| Gini_ref = <ref>{{cite web |title=Gini coefficient of equivalised disposable income – EU-SILC survey |url=https://ec.europa.eu/eurostat/databrowser/view/tessi190/default/table?lang=en |publisher=[[Eurostat]] |access-date=10 August 2023 |location=Luxembourg |date=28 June 2023 |archive-date=9 October 2020 |archive-url=https://web.archive.org/web/20201009091832/https://ec.europa.eu/eurostat/databrowser/view/tessi190/default/table?lang=en |url-status=live }}</ref>
| Gini_rank =
| HDI = 0.913
| HDI_rank = 32 වෙනි
| HDI_year = 2023<!-- Please use the year to which the data refers, not the publication year. -->
| HDI_change = increase
| HDI_ref = <ref name="UNHDR">{{Cite web |date=6 May 2025 |title=Human Development Report 2025 |url=https://hdr.undp.org/system/files/documents/global-report-document/hdr2025reporten.pdf|url-status=live |archive-url=https://web.archive.org/web/20250506051232/https://hdr.undp.org/system/files/documents/global-report-document/hdr2025reporten.pdf |archive-date=6 May 2025 |access-date=6 May 2025 |publisher=[[United Nations Development Programme]]}}</ref>
| currency = [[යුරෝ]] (€)
| currency_code = EUR
| time_zone = [[Eastern European Time|EET]]
| utc_offset = +02:00
| utc_offset_DST = +03:00
| time_zone_DST = [[Eastern European Summer Time|EEST]]
| drives_on = වම
| calling_code = +357
| cctld = [[.cy]]{{efn|[[.eu]] වසම ද භාවිතා වන අතර, අනෙකුත් [[යුරෝපීය සංගමයේ]] සාමාජික රටවල් සමඟ බෙදා ගනී.}}
| footnotes =
| today =
}}
'''සයිප්රසය''',{{efn|{{langx|el|Κύπρος|translit=Kýpros|engvar=gb}} {{IPA|el|ˈcipros|}}; {{langx|tr|Kıbrıs}} {{IPA|tr|ˈkɯbɾɯs|lang|LL-Q256 (tur)-ToprakM-Kıbrıs.wav}}; English {{IPAc-en|audio=En-us-Cyprus.ogg|ˈ|s|aɪ|p|r|ə|s|}}}} නිල වශයෙන් '''සයිප්රස් ජනරජය''',{{efn|{{Langx|el|Κυπριακή Δημοκρατία |translit=Kypriakí Dimokratía |links=no|engvar=gb}}, {{IPA|el|cipriaˈci ðimokraˈti.a|}}, <small>lit:</small> Cypriot Republic; {{langx|tr|Kıbrıs Cumhuriyeti |links=no}}, {{IPA|tr|ˈkɯbɾɯs ˈdʒumhuɾijeti|}}, <small>lit:</small> Republic of Cyprus}} යනු නැගෙනහිර මධ්යධරණී මුහුදේ පිහිටි දූපත් රටකි, එය බටහිර ආසියාවේ ලෙවන්ට් වෙරළට ඔබ්බෙන් පිහිටා ඇත. සයිප්රසයේ අගනුවර නිකොසියා වන අතර එහි විශාලතම මහ නගර සභාව ලිමසෝල් වේ. දිවයිනේ ඊසානදිග කොටස පාලනය කරනු ලබන්නේ ස්වයං ප්රකාශිත, බොහෝ දුරට හඳුනා නොගත් තුර්කි උතුරු සයිප්රස් ජනරජය විසිනි, එය එක්සත් ජාතීන්ගේ බෆර් කලාපය මගින් සයිප්රස් ජනරජයෙන් වෙන් කර ඇත. සයිප්රස් දූපතේ දකුණේ ඇක්රොටිරි සහ ඩෙකෙලියා යන බ්රිතාන්ය ස්වෛරී හමුදා කඳවුරු ඇත. සිසිලිය සහ සාඩීනියාවෙන් පසු මධ්යධරණී මුහුදේ තුන්වන විශාලතම සහ තුන්වන වැඩිම ජනගහනයක් සහිත දූපත මෙයයි.<ref>{{Cite news|url=https://www.worldatlas.com/articles/biggest-islands-in-the-mediterranean-sea.html|title=Biggest Islands In The Mediterranean Sea By Area|last=Pariona|first=Amber|date=4 August 2017|work=WorldAtlas|access-date=11 May 2018|archive-url=https://web.archive.org/web/20180512043924/https://www.worldatlas.com/articles/biggest-islands-in-the-mediterranean-sea.html|archive-date=12 May 2018|language=en|url-status=live}}</ref><ref>{{Cite news|url=https://www.worldatlas.com/articles/the-most-populated-islands-in-the-mediterranean-sea.html|title=The Most Populated Islands In The Mediterranean Sea|last=Nag|first=Oishimaya Sen|date=15 August 2017|work=WorldAtlas|access-date=11 May 2018|archive-url=https://web.archive.org/web/20180512043814/https://www.worldatlas.com/articles/the-most-populated-islands-in-the-mediterranean-sea.html|archive-date=12 May 2018|language=en|url-status=live}}</ref>
සයිප්රසය ප්රථම වරට වසර 13,000 කට පමණ පෙර දඩයම්කරුවන් විසින් පදිංචි කරන ලද අතර, ගොවි ප්රජාවන් ක්රි.පූ. 8500 වන විට මතු විය. ලෝකඩ යුගයේ අග භාගයේදී පුළුල් මධ්යධරණී ලෝකයට සමීපව සම්බන්ධ වූ නාගරීකරණය වූ සමාජයක් වන ඇලෂියා බිහි විය. ක්රි.පූ. 2 වන සහස්රයේ අවසානයේ මයිසීනියානු ග්රීකයන් විසින් සයිප්රසය ජනාවාස රළ අත්විඳින ලදී. එහි පොහොසත් ස්වභාවික සම්පත් (විශේෂයෙන් තඹ) සහ යුරෝපය, අප්රිකාව සහ ආසියාව යන මංසන්ධිවල උපායමාර්ගික පිහිටීම හේතුවෙන්, දිවයින පසුව ඇසිරියානුවන්, ඊජිප්තුවරුන් සහ පර්සියානුවන් ඇතුළු අධිරාජ්යයන් කිහිපයක් විසින් තරඟ කර අත්පත් කර ගන්නා ලද අතර, එය ක්රි.පූ. 333 දී මහා ඇලෙක්සැන්ඩර් විසින් අල්ලා ගන්නා ලදී. ටොලමික් අධිරාජ්යය, සම්භාව්ය සහ නැගෙනහිර රෝම අධිරාජ්යය, අරාබි කැලිෆේට්වරුන්, ප්රංශ ලුසිග්නන්වරුන් සහ වැනීසියානුවන් විසින් අනුප්රාප්තික පාලනය අනුගමනය කරන ලද්දේ සියවස් තුනකට අධික ඔටෝමාන් ආධිපත්යයක් (1571–1878) විසිනි.<ref name="Lausanne">{{cite web |title=Treaty of Lausanne |url=http://wwi.lib.byu.edu/index.php/Treaty_of_Lausanne |url-status=live |archive-url=https://web.archive.org/web/20130112221242/http://wwi.lib.byu.edu/index.php/Treaty_of_Lausanne |archive-date=12 January 2013 |access-date=7 October 2014}}</ref>{{efn|''[[De jure]]'' until 1914}} සයිප්රස් සම්මුතියට අනුව සයිප්රසය 1878 දී බ්රිතාන්ය පරිපාලනය යටතේ තබා 1914 දී එක්සත් රාජධානිය විසින් විධිමත් ලෙස ඈඳා ගන්නා ලදී.
දිවයිනේ අනාගතය එහි ග්රීක සහ තුර්කි ප්රජාවන් අතර එකඟ නොවීමේ කාරණයක් බවට පත් විය. ග්රීක සයිප්රස් වැසියන් ග්රීසිය සමඟ එනොසිස් හෝ එකමුතුවක් සොයමින් සිටි අතර එය 1950 ගණන්වල ග්රීක ජාතික ප්රතිපත්තියක් බවට පත්විය.<ref>{{cite book |last1=Faustmann |first1=Hubert |url=https://books.google.com/books?id=AzIXtVdDDwgC&pg=PA48 |title=The Government and Politics of Cyprus |last2=Ker-Lindsay |first2=James |publisher=Peter Lang |year=2008 |isbn=978-3-03911-096-4 |page=48 |access-date=23 September 2020 |archive-url=https://web.archive.org/web/20240517121228/https://books.google.com/books?id=AzIXtVdDDwgC&pg=PA48#v=onepage&q&f=false |archive-date=17 May 2024 |url-status=live}}</ref><ref>{{cite book |last1=Mirbagheri |first1=Farid |url=https://books.google.com/books?id=f82Jn_H4VukC&pg=PA25 |title=Historical Dictionary of Cyprus |date=2009 |publisher=Scarecrow Press |isbn=9780810862982 |page=25 |access-date=23 September 2020 |archive-url=https://web.archive.org/web/20240517123640/https://books.google.com/books?id=f82Jn_H4VukC&pg=PA25#v=onepage&q&f=false |archive-date=17 May 2024 |url-status=live}}</ref> තුර්කි සයිප්රස් වැසියන් මුලින් අඛණ්ඩ බ්රිතාන්ය පාලනයක් සඳහා පෙනී සිටි අතර, පසුව දිවයින තුර්කියට ඈඳා ගැනීමට ඉල්ලා සිටි අතර, එමඟින් ඔවුන් තක්සිම් ප්රතිපත්තිය ස්ථාපිත කළහ: සයිප්රසය කොටස් කර දිවයිනේ උතුරේ තුර්කි දේශපාලනය නිර්මාණය කිරීම.<ref>{{cite book |last1=Trimikliniotis |first1=Nicos |url=https://books.google.com/books?id=zS_HAAAAQBAJ&pg=PA104 |title=Beyond a Divided Cyprus: A State and Society in Transformation |date=2012 |publisher=Palgrave Macmillan |isbn=978-1-137-10080-1 |page=104 |access-date=23 September 2020 |archive-url=https://web.archive.org/web/20240517121219/https://books.google.com/books?id=zS_HAAAAQBAJ&pg=PA104#v=onepage&q&f=false |archive-date=17 May 2024 |url-status=live}}</ref> 1950 ගණන්වල ජාතිකවාදී ප්රචණ්ඩත්වයෙන් පසුව, සයිප්රසයට 1960 දී නිදහස ලබා දෙන ලදී.<ref name="independence">[http://www.parliament.cy/parliamenteng/index.htm Cyprus date of independence] {{webarchive|url=https://web.archive.org/web/20060613002758/http://www.parliament.cy/parliamenteng/index.htm|date=13 June 2006}} (click on Historical review)</ref> 1963-64 අර්බුදය ප්රජාවන් දෙක අතර තවදුරටත් අන්තර් වාර්ගික ප්රචණ්ඩත්වය ගෙන ආ අතර, තුර්කි සයිප්රස් වැසියන් 25,000 කට වැඩි පිරිසක් වාසස්ථානවලට අවතැන් කරන ලදී,<ref name="Hoffmeister 2006">{{cite book |author=Hoffmeister, Frank |url=https://books.google.com/books?id=LZXbg3ZwvGoC |title=Legal aspects of the Cyprus problem: Annan Plan and EU accession |publisher=EMartinus Nijhoff Publishers |year=2006 |isbn=978-90-04-15223-6 |access-date=23 September 2020 |archive-url=https://web.archive.org/web/20240517123627/https://books.google.com/books?id=LZXbg3ZwvGoC |archive-date=17 May 2024 |url-status=live}}</ref>{{rp|56–59}}<ref name="Intercommunal Violence">{{cite web |date=21 December 1963 |title=U.S. Library of Congress – Country Studies – Cyprus – Intercommunal Violence |url=http://countrystudies.us/cyprus/13.htm |url-status=live |archive-url=https://web.archive.org/web/20110623135118/http://countrystudies.us/cyprus/13.htm |archive-date=23 June 2011 |access-date=25 October 2009 |publisher=Countrystudies.us}}</ref> සහ තුර්කි සයිප්රස් දේශපාලන නියෝජනය අවසන් කළේය. 1974 ජූලි 15 වන දින, ග්රීක සයිප්රස් ජාතිකවාදීන්<ref>{{cite book |last=Mallinson |first=William |url=https://books.google.com/books?id=HEjkuhF2GsMC&pg=PA81 |title=Cyprus: A Modern History |publisher=I. B. Tauris |year=2005 |isbn=978-1-85043-580-8 |page=81 |access-date=23 September 2020 |archive-url=https://web.archive.org/web/20240517121124/https://books.google.com/books?id=HEjkuhF2GsMC&pg=PA81 |archive-date=17 May 2024 |url-status=live}}</ref><ref>{{cite news|url=http://news.bbc.co.uk/1/hi/world/europe/2297653.stm|title=website|date=4 October 2002|work=BBC News|access-date=25 October 2009|archive-url=https://web.archive.org/web/20040726144124/http://news.bbc.co.uk/1/hi/world/europe/2297653.stm|archive-date=26 July 2004|url-status=live}}</ref> සහ ග්රීක හමුදා ජුන්ටාවේ කොටස් විසින් කුමන්ත්රණයක් දියත් කරන ලදී.<ref name="hoff">{{cite book |author=Hoffmeister, Frank |url=https://books.google.com/books?id=LZXbg3ZwvGoC |title=Legal aspects of the Cyprus problem: Annan Plan and EU accession |publisher=EMartinus Nijhoff Publishers |year=2006 |isbn=978-90-04-15223-6 |pages=34–5}}</ref> මෙම ක්රියාව ජූලි 20 වන දින තුර්කි සයිප්රසය ආක්රමණය කිරීමට හේතු වූ අතර,<ref>{{cite book |author=Eyal Benvenisti |url=https://books.google.com/books?id=JKgeX_sdQG0C&pg=PA191 |title=The International Law of Occupation |date=23 February 2012 |publisher=Oxford University Press |isbn=978-0-19-958889-3 |page=191 |access-date=20 June 2015 |archive-url=https://web.archive.org/web/20150910212611/https://books.google.com/books?id=JKgeX_sdQG0C&pg=PA191 |archive-date=10 September 2015 |url-status=live}}</ref> එය වර්තමාන උතුරු සයිප්රසයේ භූමිය අල්ලා ගත් අතර ග්රීක සයිප්රස් වැසියන් 150,000 කට අධික සංඛ්යාවක්<ref>Barbara Rose Johnston, Susan Slyomovics. ''Waging War, Making Peace: Reparations and Human Rights'' (2009), American Anthropological Association Reparations Task Force, [https://books.google.com/books?id=jOU9_BQU9SYC&pg=PA211 p. 211] {{Webarchive|url=https://web.archive.org/web/20160412133508/https://books.google.com/books?id=jOU9_BQU9SYC&pg=PA211|date=12 April 2016}}</ref><ref>Morelli, Vincent. ''Cyprus: Reunification Proving Elusive'' (2011), DIANE Publishing, [https://books.google.com/books?id=dyWwReoc81oC&pg=PA10 p. 10] {{Webarchive|url=https://web.archive.org/web/20160413033218/https://books.google.com/books?id=dyWwReoc81oC&pg=PA10&|date=13 April 2016}}</ref> සහ තුර්කි සයිප්රස් වැසියන් 50,000 කට අධික සංඛ්යාවක් අවතැන් කළේය.<ref>Borowiec, Andrew. ''Cyprus: A Troubled Island'' (2000), Greenwood Publishing Group, [https://books.google.com/books?id=hzEDg6-d80MC&pg=PA125 p. 125] {{Webarchive|url=https://web.archive.org/web/20160412142842/https://books.google.com/books?id=hzEDg6-d80MC&pg=PA125|date=12 April 2016}}</ref> 1983 දී ඒකපාර්ශ්වික ප්රකාශයක් මගින් උතුරේ වෙනම තුර්කි සයිප්රස් රාජ්යයක් ස්ථාපිත කරන ලද අතර එය ජාත්යන්තර ප්රජාව විසින් පුළුල් ලෙස හෙළා දකින ලද අතර එය තවමත් තුර්කිය විසින් පමණක් පිළිගනු ලැබේ. මෙම සිදුවීම් සහ එහි ප්රතිඵලයක් ලෙස ඇති වූ දේශපාලන තත්වය අඛණ්ඩ ආරවුලකට යටත් වේ.
සයිප්රසය යනු දියුණු ඉහළ ආදායම් ලබන ආර්ථිකයක් සහ ඉතා ඉහළ මානව සංවර්ධනයක් සහිත සංවර්ධිත නියෝජිත ප්රජාතන්ත්රවාදයකි.<ref>{{cite book |author1=Lesley Pender |url=https://books.google.com/books?id=R9r90RAJM5cC&pg=PA273 |title=The Management of Tourism |author2=Richard Sharpley |publisher=SAGE |year=2005 |isbn=978-0-7619-4022-7 |page=273 |access-date=20 June 2015 |archive-url=https://web.archive.org/web/20150910231130/https://books.google.com/books?id=R9r90RAJM5cC&pg=PA273 |archive-date=10 September 2015 |url-status=live}}</ref><ref>{{cite book |author=Richard Sharpley |url=https://books.google.com/books?id=id8Me6CogPYC&pg=PT296 |title=Tourism Development and the Environment: Beyond Sustainability? |date=16 May 2012 |publisher=Routledge |isbn=978-1-136-57330-9 |page=296 |access-date=20 June 2015 |archive-url=https://web.archive.org/web/20150918182700/https://books.google.com/books?id=id8Me6CogPYC&pg=PT296 |archive-date=18 September 2015 |url-status=live}}</ref><ref>{{cite book |author1=Sharpley, Richard |url=https://books.google.com/books?id=Wvo1sIjZH3UC&pg=PA334 |title=Tourism and Development: Concepts and Issues |author2=Telfer, David John |publisher=Channel View Publications |year=2002 |isbn=978-1-873150-34-4 |page=334 |access-date=22 July 2015 |archive-url=https://web.archive.org/web/20150918222742/https://books.google.com/books?id=Wvo1sIjZH3UC&pg=PA334 |archive-date=18 September 2015 |url-status=live}}</ref> දිවයිනේ දැඩි මධ්යධරණී දේශගුණය සහ ග්රීක සහ තුර්කි අංග දෙකම ඇතුළත් පොහොසත් සංස්කෘතික උරුමය,<ref>{{Cite web |date=2025-10-21 |title=Cyprus {{!}} History, Flag, Map, & Facts {{!}} Britannica |url=https://www.britannica.com/place/Cyprus |access-date=2025-10-22 |website=www.britannica.com |language=en}}</ref> එය ප්රධාන සංචාරක ගමනාන්තයක් බවට පත් කරයි.<ref>{{Cite web |date=2025-06-03 |title=Cyprus {{!}} History, Flag, Map, & Facts {{!}} Britannica |url=https://www.britannica.com/place/Cyprus |access-date=2025-06-06 |website=www.britannica.com |language=en}}</ref> සයිප්රසය 2004 දී යුරෝපීය සංගමයට සම්බන්ධ වන තෙක් පොදුරාජ්ය මණ්ඩලීය ජාතීන්ගේ සාමාජිකයෙකු වන අතර නොබැඳි ජාතීන්ගේ ව්යාපාරයේ ආරම්භක සාමාජිකයෙකි;<ref>{{cite web |date=21 September 2001 |title=The Non-Aligned Movement: Background Information |url=http://www.nam.gov.za/background/background.htm#4 |url-status=dead |archive-url=https://web.archive.org/web/20160209210107/http://www.nam.gov.za/background/background.htm#4 |archive-date=9 February 2016 |access-date=19 January 2010 |publisher=[[Non-Aligned Movement]]}}</ref> එය 2008 දී යුරෝ කලාපයට සම්බන්ධ විය.<ref>{{cite web |title=Human Development Index (HDI)–2011 Rankings |url=https://web.stanford.edu/class/e297c/war_peace/confrontation/hcypruseu.html |url-status=dead |archive-url=https://web.archive.org/web/20150403004203/http://web.stanford.edu/class/e297c/war_peace/confrontation/hcypruseu.html |archive-date=3 April 2015 |access-date=17 November 2019 |publisher=[[Stanford University]]}}</ref> සයිප්රසය දිගු කලක් නේටෝ සංවිධානය සමඟ හොඳ සබඳතා පවත්වා ගෙන යන අතර 2024 දී නිල වශයෙන් එක්වීමේ අභිප්රාය නිවේදනය කළේය.<ref>{{cite web |date=7 December 2024 |title=Cyprus Wants U.S. Help to Join NATO, But Turkey Stands in the Way |url=https://www.thenationalherald.com/cyprus-wants-u-s-help-to-join-nato-but-turkey-stands-in-the-way/ |access-date=13 December 2024 |website=[[The National Herald]]}}</ref>
== නිරුක්තිය ==
{{Excerpt|සයිප්රසයේ නිරුක්තිය||inline=yes}}
== ඉතිහාසය ==
{{Excerpt|සයිප්රසයේ ඉතිහාසය||inline=yes}}
=== ප්රාග් ඓතිහාසික සහ පුරාණ යුගය ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|ප්රාග් ඓතිහාසික සහ පුරාණ යුගය|inline=yes}}
=== මධ්යතන යුගය ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|මධ්යතන යුගය|inline=yes}}
=== ඔටෝමන් සයිප්රසය ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|ඔටෝමන් සයිප්රසය|inline=yes}}
=== බ්රිතාන්ය සයිප්රසය ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|බ්රිතාන්ය සයිප්රසය|inline=yes}}
=== නිදහස සහ අන්තර්-වාර්ගික ප්රචණ්ඩත්වය ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|නිදහස සහ අන්තර්-වාර්ගික ප්රචණ්ඩත්වය|inline=yes}}
=== 1974 කුමන්ත්රණය, ආක්රමණය සහ බෙදීම ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|1974 කුමන්ත්රණය, ආක්රමණය සහ බෙදීම|inline=yes}}
=== පශ්චාත්-බෙදීම ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|පශ්චාත්-බෙදීම|inline=yes}}
=== 21 වන සියවස ===
{{Excerpt|සයිප්රසයේ ඉතිහාසය|21 වන සියවස|inline=yes}}
== භූගෝලය ==
{{Excerpt|සයිප්රසයේ භූගෝලය||inline=yes}}
=== දේශගුණය ===
{{Excerpt|සයිප්රසයේ භූගෝලය|දේශගුණය|inline=yes}}
=== ජල සැපයුම ===
{{Excerpt|සයිප්රසයේ භූගෝලය|ජල සැපයුම|inline=yes}}
=== වෘක්ෂලතා සහ සත්ත්ව විශේෂ ===
{{Excerpt|සයිප්රසයේ භූගෝලය|වෘක්ෂලතා සහ සත්ත්ව විශේෂ|inline=yes}}
== රජය සහ දේශපාලනය ==
{{Excerpt|සයිප්රසයේ රජය සහ දේශපාලනය||inline=yes}}
=== පරිපාලන අංශ ===
{{Excerpt|සයිප්රසයේ රජය සහ දේශපාලනය|පරිපාලන අංශ|inline=yes}}
=== එක්සත් බිම් සහ වාසස්ථාන ===
{{Excerpt|සයිප්රසයේ රජය සහ දේශපාලනය|එක්සත් බිම් සහ වාසස්ථාන|inline=yes}}
=== විදේශ සබඳතා ===
{{Excerpt|සයිප්රසයේ රජය සහ දේශපාලනය|විදේශ සබඳතා|inline=yes}}
=== හමුදාව ===
{{Excerpt|සයිප්රසයේ රජය සහ දේශපාලනය|හමුදාව|inline=yes}}
=== නීතිය, යුක්තිය සහ මානව හිමිකම් ===
{{Excerpt|සයිප්රසයේ රජය සහ දේශපාලනය|නීතිය, යුක්තිය සහ මානව හිමිකම්|inline=yes}}
== ආර්ථිකය ==
{{Excerpt|සයිප්රසයේ ආර්ථිකය||inline=yes}}
=== යටිතල ව්යුහය ===
{{Excerpt|සයිප්රසයේ ආර්ථිකය|යටිතල ව්යුහය|inline=yes}}
== ජන විකාශනය ==
{{Excerpt|සයිප්රසයේ ජන විකාශනය||inline=yes}}
=== ආගම ===
{{Excerpt|සයිප්රසයේ ජන විකාශනය|ආගම|inline=yes}}
=== භාෂා ===
{{Excerpt|සයිප්රසයේ ජන විකාශනය|භාෂා|inline=yes}}
=== අධ්යාපනය ===
{{Excerpt|සයිප්රසයේ ජන විකාශනය|අධ්යාපනය|inline=yes}}
== සංස්කෘතිය ==
{{Excerpt|සයිප්රසයේ සංස්කෘතිය||inline=yes}}
=== කලාව ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|කලාව|inline=yes}}
=== සංගීතය ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|සංගීතය|inline=yes}}
=== සාහිත්යය ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|සාහිත්යය|inline=yes}}
=== ජන මාධ්ය ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|ජන මාධ්ය|inline=yes}}
=== සිනමාව ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|සිනමාව|inline=yes}}
=== ආහාර පිසීම ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|ආහාර පිසීම|inline=yes}}
=== ක්රීඩා ===
{{Excerpt|සයිප්රසයේ සංස්කෘතිය|ක්රීඩා|inline=yes}}
==ආශ්රිත==
*[[Ancient regions of Anatolia]]
*[[Index of Cyprus-related articles]]
*[[Outline of Cyprus]]
==සටහන්==
{{notelist|2}}
==මූලාශ්ර==
{{reflist|30em|refs=
<ref name="CIA2019">{{Cite CIA World Factbook|country=Cyprus|access-date=22 November 2019}}</ref>
}}
==භාහිර සබැඳි==
{{Sister project links|Cyprus|voy=Cyprus}}
* [https://www.cia.gov/the-world-factbook/countries/cyprus/ Cyprus] {{Webarchive|url=https://web.archive.org/web/20210109202203/https://www.cia.gov/the-world-factbook/countries/cyprus/ |date=2021-01-09 }}. ''[[The World Factbook]]''. [[Central Intelligence Agency]].
* [http://news.bbc.co.uk/2/hi/europe/1021835.stm Timeline of Cyprus by BBC]
* [https://web.archive.org/web/20080727022814/http://ucblibraries.colorado.edu/govpubs/for/cyprus.htm Cyprus] from ''UCB Libraries GovPubs''
* [https://2009-2017.state.gov/p/eur/ci/cy/ Cyprus] information from the [[United States Department of State]] includes Background Notes, Country Study and major reports
* {{curlie|Regional/Middle_East/Cyprus}}
* [https://www.bbc.co.uk/news/world-europe-17217956 Cyprus profile] from the [[BBC News]]
* [http://www.unficyp.org/ The UN in Cyprus] {{Webarchive|url=https://web.archive.org/web/20080723154155/http://www.unficyp.org/ |date=2008-07-23 }}
* [http://triarte.brynmawr.edu/PRT212?sid=336967&x=32613387&x=32613388 Cypriot Pottery, Bryn Mawr College Art and Artifact Collections]
* [http://libmma.contentdm.oclc.org/cdm/ref/collection/p15324coll10/id/162840 ''The Cesnola collection of Cypriot art : stone sculpture''], a fully digitised text from The Metropolitan Museum of Art libraries
* [http://cypernochkreta.dinstudio.se The Mosaics of Khirbat al-Mafjar]
'''Government'''
* [http://www.cyprustrade.co.uk/ Cyprus High Commission Trade Centre – London] {{Webarchive|url=https://web.archive.org/web/20220625180826/http://www.cyprustrade.co.uk/ |date=2022-06-25 }}
* [http://www.cyprus.gov.cy/portal/portal.nsf/citizen_en?OpenForm&access=0&SectionId=citizen&CategoryId=none&SelectionId=home&print=0&lang=en Republic of Cyprus – English Language] {{Webarchive|url=https://web.archive.org/web/20220702085503/http://www.cyprus.gov.cy/portal/portal.nsf/citizen_en?OpenForm&access=0&SectionId=citizen&CategoryId=none&SelectionId=home&print=0&lang=en |date=2022-07-02 }}
* [https://web.archive.org/web/20061003102510/http://www.kypros.org/Constitution/English/index.htm Constitution of the Republic of Cyprus]
* [http://www.moi.gov.cy/moi/pio/pio.nsf/index_en/index_en?opendocument# Press and Information Office – Ministry of Interior] {{Webarchive |url=https://web.archive.org/web/20190714044056/http://www.moi.gov.cy/moi/pio/pio.nsf/index_en/index_en?opendocument |date=14 July 2019 }}
* [http://www.hri.org/docs/annan/ Annan Plan] {{Webarchive|url=https://web.archive.org/web/20220423224443/http://www.hri.org/docs/annan/ |date=2022-04-23 }}
'''Tourism'''
* [http://www.visitcyprus.com/ Read about Cyprus on visitcyprus.com] {{Webarchive|url=https://web.archive.org/web/20100628111323/http://www.visitcyprus.com/ |date=2010-06-28 }} – the official travel portal for Cyprus
* [http://www.cyprus.com/ Cyprus informational portal and open platform for contribution of Cyprus-related content] – www.Cyprus.com
* {{osmrelation-inline|307787}}
'''Official publications'''
* [https://publications.parliament.uk/pa/cm200405/cmselect/cmfaff/113/11302.htm The British government's Foreign Affairs Committee report on Cyprus].
* [http://www.moi.gov.cy/moi/pio/pio.nsf/All/BD477C55623013C5C2256D740027CF98?OpenDocument Legal Issues arising from certain population transfers and displacements on the territory of the Republic of Cyprus in the period since 20 July 1974] {{Webarchive |url=https://web.archive.org/web/20080928053046/http://www.moi.gov.cy/moi/pio/pio.nsf/All/BD477C55623013C5C2256D740027CF98?OpenDocument |date=28 September 2008 }}
* [http://www.hri.org/news/cyprus/cna/2004/04-04-08.cna.html#01 Address to Cypriots by President Papadopoulos (FULL TEXT)] {{Webarchive|url=https://web.archive.org/web/20080821165847/http://www.hri.org/news/cyprus/cna/2004/04-04-08.cna.html#01 |date=2008-08-21 }}
* [http://www.cyprus.gov.cy/portal/portal.nsf/citizen_en?OpenForm&access=0&SectionId=citizen&CategoryId=none&SelectionId=home&print=0&lang=en Official Cyprus Government Web Site] {{Webarchive|url=https://web.archive.org/web/20220702085503/http://www.cyprus.gov.cy/portal/portal.nsf/citizen_en?OpenForm&access=0&SectionId=citizen&CategoryId=none&SelectionId=home&print=0&lang=en |date=2022-07-02 }}
* [https://web.archive.org/web/20041217052134/http://www.greekembassy.org/Embassy/content/en/Article.aspx?office=1&folder=44&article=86 Embassy of Greece, USA – Cyprus: Geographical and Historical Background]
{{යුරෝපයේ ස්වෛරී රාජ්යයන් සහ පරායත්ත භූමි ප්රදේශ ලැයිස්තුව}}{{Cyprus topics}}
{{Navboxes
|title = සයිප්රසය ආශ්රිත ලිපි
|list =
{{Member states of the European Union}}
{{The Commonwealth}}
{{Countries of Asia}}
{{Countries and territories of the Mediterranean Sea}}
{{Middle East}}
{{Sovereign states of Europe}}
}}
{{Portal bar|Cyprus|යුරෝපය|European Union|දූපත්}}
{{Authority control}}
{{coord|35|N|33|E|type:country_region:CY_scale:2500000_source:GNS |display=title}}
[[ප්රවර්ගය:සයිප්රසය]]
[[Category:Republics in the Commonwealth of Nations]]
[[ප්රවර්ගය:නැගෙනහිර මධ්යධරණි]]
[[Category:International islands]]
[[ප්රවර්ගය:දූපත් රටවල්]]
[[Category:Islands of Asia]]
[[Category:Islands of Europe]]
[[Category:Mediterranean islands]]
[[ප්රවර්ගය:පොදු රාජ්ය මණ්ඩලයේ සාමාජික රාජ්යයෝ]]
[[ප්රවර්ගය:යුරෝපා සංගමයේ සාමාජික රාජ්යයෝ]]
[[Category:Member states of the Union for the Mediterranean]]
[[ප්රවර්ගය:එක්සත් ජාතීන්ගේ සාමාජික රාජ්ය]]
[[ප්රවර්ගය:මැද පෙරදිග රටවල්]]
[[ප්රවර්ගය:මෑත පෙරදිග රටවල්]]
[[Category:Southeastern European countries]]
[[Category:Southern European countries]]
[[ප්රවර්ගය:බටහිර ආසියානු රටවල්]]
[[Category:States and territories established in 1960]]
[[ප්රවර්ගය:ආසියාව තුළ රටවල්]]
[[ප්රවර්ගය:යුරෝපය තුළ රටවල්]]
[[ප්රවර්ගය:ග්රීක භාෂාව, නිල භාෂාවක් ලෙස භාවිතා වන රටවල් සහ භූමි ප්රදේශ]]
[[Category:Turkish-speaking countries and territories]]
t5l0zgkmyts8d3uocp9mhj4j7zwnzk6
සිලිකන්
0
24367
796334
593785
2026-07-23T17:19:46Z
InternetArchiveBot
63598
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
796334
wikitext
text/x-wiki
{{Infobox silicon}}
'''සිලිකන්''' යනු පරමාණුක ක්රමාංකය 14 වූ මූලද්රව්යයයි. එහි රසායනික සංකේතය Si ය. සිලිකන් ඒක පරමාණුක ඝණයකි. ආවර්තිතා වගුවේ IV (4) කාණ්ඩයේ සිටී. සිලිකන් හි ඉලෙට්රොනික වින්යාසය 2,8,4 වේ. ආවර්තය 3 වන අතර කාන්ඩය IV වේ. සාදන ප්රධාන අයනය - හෝ + 4 වේ. ප්රධාන සංයුජතාව 4 වේ.
==ඉතිහාසය==
සිලිකන් ඩයොක්සයිඩ් හෙවත් සිලිකාවලට (SiO<sub>2</sub>) ආම්ලික ලක්ෂන ඇති බව 1660 ටැකනියස්(Tachenius) විසින් පෙන්වා දෙන ලදි. සිලිකා යනු එතෙක් සොයා නොගනු ලැබු මූලද්රවයක ඔක්සයිඩය යැයි ලැවොසියර් සිතිය. සිලිකන් ෆ්ලුවෝරයිඩ් SiF<sub>4</sub> නම් වායුමය සංයෝගය තුල පොටැසියම් රත් කිරිමේන් 1809-11 පමන ගේ ලුසැක් සහ තේනාඩ් විසින් දළ සිලිකන් පිළියෙල කළහ. සිලිකන් අලෝහයක් භව ඩේවි හෙළි කලේය. සිලිකන් සහ කාබන් අතර ඇති කිට්ටු සමානත්වයද ඔහු පෙන්වාදුනි.
==පිහිටිම==
මුක්ත මූලද්රවය වශයෙන් සිලිකන් ස්වභාවයෙන් නොපිහිටයි. එහෙත් වැලි , ගිනිගල්,මැටි ආදි සිලිකා සංයෝගත් සිලිකාත් කොතරම් බහුලද යත් පෘථියේ කබොලේ බරෙන් හතරෙන් 1 පමණ සිලිකන් වලින් සමන්විත වෙයි.
==පිලියෙල කිරිම==
සිලිකන් ටෙට්රප්ලුවොරයිඩ් තුල සෝඩියම් හෝ පොටැසියම් ලෝහය රත් කිරිමෙන් අස්ඵටික සිලිකන් සදාගත් හැක.
:{{chem|Si|F|4}} + 4 K{{sub|(s)}} → Si{{sub|(s)}} + 4 KF{{sub|(g)}}
==ගුණ==
අස්ඵටික සිලිකන් වූකලි, වාතයේ හෝ ඔක්සිජන් තුල හෝ ප්රබල ලෙස රත් කල විට සිලිකා ලබදෙමින් දැවෙන දුඹුරු පැහැති කුඩකි. ස්වේත තප්ත අවස්ථාවේදි හුමාලය වියෝජන කරයි.
උණු දාහක සාන්ද්ර ක්ෂාර ද්රාවන තුල සිලිකන් පහසුවේන් ද්රාවණය වී සිලිකේට සාදයි.අස්ඵටික රූපි සිලිකන් වල ලෝහමය පෙනුමක් ඇත. එහෙත් එය ඉතා දුර්වල විද්යුත් සන්නායකයකි.
අම්ල වලට ඔරොත්තු දෙන වානේ සෑදිමට සිලිකන් යොදාගනු ලැබේ.
==සිලිකන් සංයෝග==
===සිලිකන් ඩයොක්සයිඩ් (සිලිකා) (SiO{{sub|(2)}})===
සිලිකා අස්ඵටික අකාරයෙන්, ගිනිගල් ,උපල(Opal) සහ කියල්ගුවර් (kieselguhr) වහයෙන්ද , තිරුවාණ,ට්රිඩිමයිට් (tridymite), සහ ක්රිස්ටොබලයිට් (cristobalite) යන ස්ඵටික රූපි අකාරයෙන්ද ස්වභාවිකව හට ගනි. සංශුද්ධ පාරදුශ්ය අවර්ණ තිරුවාන ආකර ස්ඵටික ලෙස හැඳින්වේ. තරමක් සියුම්ව වෙන්ව ඇති විට වැලි යැයි හැඳින්වේ. මැංගනීස් හෝ යකඩ හෝ අංශු මාත්ර වලින් වර්ණවත් වූ විට ට් අමතේස නම් වේ.
==මූලාශ්ර==
{{reflist}}
== External links ==
{{Commons|Silicon}}
{{Wiktionary|silicon}}
* [http://mineral.galleries.com/minerals/elements/silicon/silicon.htm Mineral.Galleries.com – Silicon] {{Webarchive|url=https://web.archive.org/web/20081016062601/http://mineral.galleries.com/minerals/elements/silicon/silicon.htm |date=2008-10-16 }}
* [http://www.webelements.com/webelements/elements/text/Si/key.html WebElements.com – Silicon] {{Webarchive|url=https://web.archive.org/web/20001215080400/http://www.webelements.com/webelements/elements/text/Si/key.html |date=2000-12-15 }}
{{Compact periodic table}}
{{Silicon compounds}}
[[ප්රවර්ගය:Silicon| ]]
[[ප්රවර්ගය:Dietary minerals]]
[[ප්රවර්ගය:Metalloids]]
[[ප්රවර්ගය:Semiconductor materials]]
[[ප්රවර්ගය:Pyrotechnic fuels]]
[[ප්රවර්ගය:Biology and pharmacology of chemical elements]]
[[ප්රවර්ගය:Reducing agents]]
[[ප්රවර්ගය:රසායන විද්යාව]]
[[ප්රවර්ගය:විද්යාව]]
[[Category:මූලද්රව්යය]]
mpmpkr2z4i5k5cj4bpam0edr6hxq876
වර්ගීකරණය
0
25700
796327
707194
2026-07-23T14:05:58Z
InternetArchiveBot
63598
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
796327
wikitext
text/x-wiki
[[ගොනුව:Phylogenetics.svg|thumb|400px|වංශ ප්රවේණික සහ රූපාණු බන්ධුතා සංකල්පයන් සංසන්දනයක්]]
ජීව විද්යාත්මක '''වර්ගීකරණය''' යනු පෘථිවි ග්රහයා මත, අතීතයේ පැවැති හා වර්තමානයේ පවතින, [[ජීවය|ජීවයේ]] විවිධාංගීකරණය පිළිබඳ හා ජීවය පැවැති මුළු කාල වකවානුව මුළුල්ලේ ජීවින් අතර පැවැති සබැඳියාවන් පිළිබඳ හැදෑරීමයි.
මෙම සම්බන්ධතාවයන් පරිණාමය හා සම්බන්ධ කෙරෙනු ලැබේ. වංශ ප්රවේණියන් යොදා පරිණාමයේ ගති ලක්ෂණයන් හඳුනා ගන්නේය. තවද වර්ගීකරණයන් පරිණාමයේ අතීතය තහවුරු කර ගැනීමට යොදා ගන්නේය.
අතීතයේ පැවති වර්ගීකරණ ක්රම සියල්ලන්ම වාගේ කෘතීම වර්ගීකරණ ක්රම වූ අතර ඒවා බොහොමයක් මිනිසාගේ භාවිතය මත පදනම් විය.ජීවින් විද්යාත්මක වර්ගීකරණයක් කළ ප්රථම තැනැත්තා ඇරිස්ටෝටල් වේ. ඔහු ජීවින් ශාක හා සතුන් ලෙස ප්රධාන කාණ්ඩ 2 කට බෙදන ලදී.
== අමතර අවධානයට ==
* [[Cladistics]] – a [[methodology]] in systematics
* [[Evolutionary systematics]] – a school of systematics
* [[Global biodiversity]]
* [[Phenetics]] – a methodology in systematics that does not infer phylogeny
* [[Phylogeny]] – the historical relationships between lineages of organism
* [[16S ribosomal RNA]] – an intensively studied nucleic acid that has been useful in phylogenetics
* [[Phylogenetic comparative methods]] – use of evolutionary trees in other studies, such as [[biodiversity]], comparative biology. adaptation, or evolutionary mechanisms
== මූලාශ්ර ==
{{Reflist}}
== භාහිර සබැඳි ==
{{Commons category}}
* [http://www.sasb.org.au Society of Australian Systematic Biologists] {{Webarchive|url=https://web.archive.org/web/20240918063217/https://sasb.org.au/ |date=2024-09-18 }}
* [http://www.systbio.org/ Society of Systematic Biologists]
* [http://www.cladistics.org/ The Willi Hennig Society]
{{Evolution}}
{{Branches of biology}}
{{Biology nav}}
{{Authority control}}
[[Category:Evolutionary biology]]
[[Category:Biological classification]]
[[Category:ජීව විද්යාව]]
81kki9u1j0jwksc2g3hmr31mwr73b35
ලෝක ඒඩ්ස් දිනය
0
26182
796326
770471
2026-07-23T13:52:44Z
InternetArchiveBot
63598
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
796326
wikitext
text/x-wiki
{{තොරතුරුකොටුව නිවාඩුදිනය
|holiday_name = ලෝක ඒඩ්ස් දිනය
|type = ජාත්යන්තර
|longtype =
|image = Red Ribbon.svg
|image_size = 150px
|caption = HIV-ආසාදිත ජනයා හා [[ඒඩ්ස්]] වැලැඳී ජීවත් වන අයවලුන් වෙත සහයෝගිතාවය පළකිරීමේ ගෝලීය සංකේතය වන [[රතු පීත්තපටිය]].
|official_name =
|nickname =
|frequency = වාර්ෂික
|observedby = සියළු [[එක්සත් ජාතීන්ගේ සියලු සාමාජීක රාජ්යයන්|එජා සාමාජීක රාජ්යයන්]]
|date = 1 දෙසැම්බර්
|celebrations =
|relatedto =
}}
සැම වසරකම දෙසැම්බර් 1 වනදා සැමරෙන '''ලෝක ඒඩ්ස් දිනය''' දිනය, [[එච්.අයි.වී]] ආසාදනය පැතිරීම නිසා ඇතිවන [[ඒඩ්ස්]] [[ඒඩ්ස් වසංගතය|වසංගතය]] පිළිබඳ දැනුවත්කිරීම නැංවීමට කැපකර ඇත. රාජ්ය හා සොඛ්ය නිලධාරින් විසින් බොහෝවිට ඒඩ්ස් ආශ්රිත මාතෘකා හා බැඳුනු කථා හෝ සමුළු හී සහභාගී වෙමින් මෙම දිනය සමරති. 1995 පටන්, [[එක්සත් ජනපදයේ ජනාධිපතිවරයා]] විසින් ලෝක ඒඩ්ස් දිනයේදී නිල [[ ජනාධිපති ප්රකාශ මගින් එක්සත් ජනපදය තුල සිදුවන සැමරීම් ලැයිස්තුව|ප්රකාශයක්]] සිදු කෙරේ. අනෙකුත් ජාතීන්ගේ රජයයන් මෙය අනුගමනය කරමින් මේ හා සමාන ප්රකාශ නිකුත් කළහ.
1981 සහ 2007 අතරතුර මිලියන 25 කට අධික ජනකායක් ඒඩ්ස් රෝගයට ගොදුරු වී මිය ගොස් ඇති අතර,<ref>[http://www.unaids.org/en/KnowledgeCentre/HIVData/GlobalReport/2008/2008_Global_report.asp ජොයින්ට් යුනයිටඩ් නේෂන්ස් ප්රෝගම් ඔන් එච්.අයි.වී/ඒඩ්ස් (UNAIDS), ''රිපෝට් ඔන් ද ග්ලෝබල් එච්.අයි.වී/ඒඩ්ස් එපිඩමික් 2008,'' (ජිනීවා, ස්විට්ස්ර්ලන්තය: UNAIDS, ජූලි 2008; ඉංග්රීසි මුල්), පි. 15.]</ref> 2007 වන විට ලොවපුරා ඇස්තමේන්තුගත මිලියන 33.2 ජනයා එච්.අයි.වී වැළැඳී ජිවත්වෙමින්,<ref>[http://www.unaids.org/en/KnowledgeCentre/HIVData/GlobalReport/2008/2008_Global_report.asp ජොයින්ට් යුනයිටඩ් නේෂන්ස් ප්රෝගම් ඔන් එච්.අයි.වී/ඒඩ්ස් (UNAIDS), ''රිපෝට් ඔන් ද ග්ලෝබල් එච්.අයි.වී/ඒඩ්ස් එපිඩමික් 2008,'' (ජිනීවා, ස්විට්ස්ර්ලන්තය: UNAIDS, ජූලි 2008; ඉංග්රීසි මුල්), පි. 32.]</ref> එය ලේඛනගත ඉතිහාසයේ මහත් ව්යසනකාරී වසංගත අතුරින් එකක් බවට පත් කර ඇත. ප්රතිරෙට්රොවයිරස ප්රතිකාර සහ උවටැන් ලබා දීම සඳහා ලොව බොහෝ ප්රදේශයන්හී මෑතදී වැඩිදියුණු කල හැකියාවන් අභිමුඛයේ වුව, ඒඩ්ස් වසංගතය 2007 වසර තුලදී ඇස්තමේන්තුගත මිලියන 2 ක ගොදුරක් ගිල ගෙන ඇති අතර,<ref>[http://www.unaids.org/en/KnowledgeCentre/HIVData/GlobalReport/2008/2008_Global_report.asp ජොයින්ට් යුනයිටඩ් නේෂන්ස් ප්රෝගම් ඔන් එච්.අයි.වී/ඒඩ්ස් (UNAIDS), ''රිපෝට් ඔන් ද ග්ලෝබල් එච්.අයි.වී/ඒඩ්ස් එපිඩමික් 2008,'' (ජිනීවා, ස්විට්ස්ර්ලන්තය: UNAIDS, ජූලි 2008; ඉංග්රීසි මුල්), පි. 30.]</ref> එයින් 270,000 පමණ කුඩා දරුවන් වෙති. <ref name="UNAIDS">[http://www.unaids.org/en/KnowledgeCentre/HIVData/GlobalReport/2008/2008_Global_report.asp ජොයින්ට් යුනයිටඩ් නේෂන්ස් ප්රෝගම් ඔන් එච්.අයි.වී/ඒඩ්ස් (UNAIDS), ''රිපෝට් ඔන් ද ග්ලෝබල් එච්.අයි.වී/ඒඩ්ස් එපිඩමික් 2008,'' (ජිනීවා, ස්විට්ස්ර්ලන්තය: UNAIDS, ජූලි 2008; ඉංග්රීසි මුල්), පි. 37.]</ref>
==ඉතිහාසය==
[[ගොනුව:AidsRusStamp1993.jpg|thumb|left|208px|රුසියානු මුද්දරය, 1993]]
ලෝක ඒඩ්ස් දිනයක් පිළිබඳ අදහස 1987 අගෝස්තු මාසයේදී ස්විට්සර්ලන්තයේ ජිනීවා නුවර [[ලෝක සෞඛ්ය සංවිධානය|ලෝක සෞඛ්ය සංවිධානයේ]] ඒඩ්ස් පිළිබඳ ගෝලීය වැඩසටහනෙහි මහජන තොරතුරු නිලධාරින් දෙදෙනෙකු වූ ජේම්ස් ඩබ්. බන් හා තෝමස් නෙට්ටර් වෙත පහළ විය. <ref> රෝග පාලනය හා නිවාරණය සඳහාවූ එ.ජ. කේන්ද්ර, ජාත්යන්තර පුවත්, "වර්ල්ඩ් ඒඩ්ස් ඩේ කෝ-ෆවුන්ඩර් ලුක්ස් බෑක් 20 ඉයර්ස් ලේටර්", සීඩීසී එච්අයිවී/හෙපටයිටිස්/එස්ටීඩී/ටීබී ප්රිවෙන්ෂන් නිවුස් අප්ඩේට්, දෙසැම්බර් 12, 2007</ref> <ref> "ඒඩ්ස් ඩේ කෝ-ෆවුන්ඩර් ලුක්ස් බෑක් ආෆ්ටර් 20 ඉයර්ස්" රෝස් හොබාන් විසින්, වොයිස් ඔෆ් ඇමරිකා, 06 දෙසැම්බර් , 2007 </ref> බන් සහ නෙට්ටර් විසින් මෙම ඔවුන්ගේ අදහස, ඒඩ්ස් පිළිබඳ ගෝලීය වැඩසටහනෙහි (දැන් [[UNAIDS]] ලෙසද හැඳින්වෙන) අධ්යක්ෂක ආචාර්යය ජොනතන් මාන් වෙත ඉදිරිපත් කළහ. මෙම සංකල්පය ආචාර්යය මාන් ගේ සිත් ගත් අතර, එය ඔහු විසින් අනුමත කරනු ලදුව, ලෝක ඒඩ්ස් දිනය පළමුවෙන් සමරන දිනය 1988 දෙසැම්බර් 1 වන දිනය විය යුතුය යන නිර්දේශයටද එකඟ විය.
සැන් ෆ්රැන්සිස්කෝහී කේපිඅයික්ස්-ටීවී හී වාර්තාකාර රාජකාරියෙන් ප්රවාස නිවාඩු පිට සිටි ගුවන්විදුලි මාධ්යවේදියෙකු වූ බන් විසින් දෙසැම්බර් 1 දිනය නිර්දේශ කළේ බටහිර ප්රවෘත්ති මාධ්යයන් විසින් උපරිම ආවරණයක් ලබාදෙනු ඇතැයි උපකල්පනය කළ නිසාය. 1988 වසර එ.ජ. හී මැතිවරණ වසරක් වූ බැවින් බන් විසින් යෝජනා කරන ලද්දේ මාධ්යයන් ඔවුන්ගේ පශ්චාත්-මැතිවරණ ආවරණයෙන් පසුව වෙහෙසට පත්ව සිටි අවධියක ආවරණය සඳහා නැවුම් ප්රවෘත්තියක් පිළිබඳ මහත් සේ ලොල්වනු ඇති බවකි. බන් හා නෙට්ටර් නිශ්චය කළේ දෙසැම්බර් 1 වන දිනය මැතිවරණයෙන් පසුව සැලකිය යුතු කාලයක් පසුව හා නත්තල් නිවාඩුවට සැලකිය යුතු කාලයක් ඉදිරියෙන් පැමිණෙන දිනයක් බැවින් ප්රවෘත්ති ප්රචාරණ දින දසුනෙහි එතරම් කාර්යබහුල නොවන කාල සීමාවක් බැවින් ලෝක ඒඩ්ස් දිනය සඳහා සුදුසුතම දින වකවානුව බවයි. [[ගොනුව:Condom on Obelisk, Buenos Aires.jpg|thumb|208px|බුවනෝස් අයර්ස් හි ඔබලිස්ක් හි කොන්ඩම්]]1986 ජූනි 18 වන දිනදී කේපීඅයිඑක්ස් හී “ඒඩ්ස් ලයිෆ්ලයින්" (බන් විසින් සහ කේපීඅයිඑක්ස් හී විශේෂ ව්යාපෘති නිෂ්පාදක නැන්සි සැස්ලෝ විසින් දියත් කරනු ලැබූ ප්රජා අධ්යාපන ව්යාපෘතියකි) සඳහා ජනාධිපති රොනල්ඩ් රීගන් විසින් පිරිනැමුණු පෞද්ගලික අංශ ආරම්භණ වෙනුවෙන් වූ ජනාධිපතිමය උද්ධාරයකින් පිදුම් ලැබිණි. "එඩ්ස් ලයිෆ්ලයින්" හී ඔහුගේ භූමිකාව නිසාවෙන්, එ. ජ. රජය වෙනුවෙන් ආචාර්යය මාන් විසින් බොන් ගෙන් ඉල්ලා සිටිනු ලැබුවේ, දෙවසරක ප්රවාස නිවාඩු ගෙන, රෝග පාලන කේන්ද්රයන්හී වසංගත අධ්යයනඥයෙකු වූ ආචාර්යය මාන් හා එක්ව, එක්සත් ජාතීන්ගේ ලෝක සෞඛ්ය සංවිධානය සඳහා, ඒඩ්ස් පිළිබඳ ගෝලීය වැඩසටහන ඇරඹීමට උපකාර සපයන ලෙසයි. බන් මහතා විසින් මෙම ආරාධනය පිළිගනු ලදුව ඒඩ්ස් පිළිබඳ ගෝලීය වැඩසටහන සඳහා පළමුවන මහජන තොරතුරු නිලධාරි ලෙසින් නම් කරනු ලැබීය. මහජන සෞඛ්යය ඉතිහාසයෙහි රෝග සම්ප්රජානනය හා නිවාරණය පිළිබඳ ප්රත්යුත්ක්රම අතුරින් වැඩිම කාලයක් පැවැති ලෝක ඒඩ්ස් දින සැමරුමෙහි ප්රාරම්භක සැමරුම බන් හා නේට්ටර් යන්නන්ගේ මනසේ පිළිසිඳ ඔවුන් විසින් එය සැලසුම් කොට එය ක්රියාක්මක කෙරිණි.
[[එච්.අයි.වී/ඒඩ්ස් පිළිබඳ එක්සත් ජාතීන්ගේ ඒකාබද්ධ වැඩසටහන]] (UNAIDS) 1996දී ක්රියාත්මක වූ අතර ලෝක ඒඩ්ස් දිනය සැලසුම් කිරීම හා ප්රවර්ධනය කිරීම සම්බන්ධ කටයුතු එය විසින් පවරා ගන්නා ලදි.<ref name="Speicher">{{Citation |title=ස්පෙයිචර්, සාරා. "වර්ල්ඩ් ඒඩ්ස් ඩේ මාර්ක්ස් 20ත් ඇනිවර්සරි ඔෆ් සොලිඩෑරිටි." ''මෙඩිකල් නිවුස් ටුඩේ.'' නොවැම්බර්19, 2008. |url=http://www.medicalnewstoday.com/articles/130044.php |access-date=2012-01-14 |archive-date=2011-02-22 |archive-url=https://web.archive.org/web/20110222005944/http://www.medicalnewstoday.com/articles/130044.php }}</ref> එක් දිනක් තුල අවධානය යොමු කරනවා වෙනුවට, UNAIDS විසින් 1997දී ලෝක ඒඩ්ස් ව්යාපාරයක් ක්රියාත්මක කළ අතර එය විසින් වසර පුරා පැවැති සන්නිවේදනය, නිවාරණය හා අධ්යාපනය ගැන අවධානය ඇති කෙරුණි.<ref name="Speicher" /><ref name="Soest">[http://www.unaids.org/en/KnowledgeCentre/Resources/FeatureStories/archive/2006/20061020_Interview_Marcel_van_Soest.asp වොන් සොඑස්ට්, මාර්සල්. "එකවුන්ටිබිලිටි: මේන් මෙසේජ් ඔන් වර්ල්ඩ් ඒඩ්ස් ඩේ." එච්.අයි.වී/ඒඩ්ස් පිළිබඳ එක්සත් ජාතීන්ගේ ඒකාබද්ධ වැඩසටහන. ඔක් 20, 2006.]</ref>
පළමු වසර දෙක තුලදී, ලෝක ඒඩ්ස් දිනයේ තේමාව විසින් අවධානය යොමු කළේ කුඩා දරුවන් හා යෞවනයන් පිළිබඳවය. සියළු වයස් වල පසුවන්නන් එච්.අයි.වී ආසාදිතව ඒඩ්ස් රෝගයෙන් පෙලෙන බව යන කරුණ නොසැලකූ මෙම තේමාවන් එකල දැඩි ලෙසින් විවේචනයට පාත්ර විය.<ref name="Speicher" /> කෙසේවෙතත් මෙම තේමාවන් විසින් එච්.අයි.වී/ඒඩ්ස් වසංගතය කෙරෙහි අවධානය යොමු කරවනු ලැබූ අතර, රෝගය පිළිබඳව පැවැති අපකීර්තිමත් මතිමතාන්තර අඩු කිරීමට උපකාරි වෙමින්, මෙම ගැටළුව පවුල් රෝගයක් ලෙසින් පිළිගැනුමේ අවශ්යතාවය හුවාදැක්වීමට උපකාරි විය.<ref name="Speicher" />
2004 දී, ලෝක ඒඩ්ස් ව්යාපාරය ස්වායත්ත සංවිධානයක් බවට පත් විය.<ref name="Speicher" /><ref name="Soest" /><ref>''ඉයර්බුක් ඔෆ් දි යුනයිටඩ් නේෂන්ස් 2005.'' 59 වෙළුම
ජිනීවා, ස්විට්සර්ලන්තය: එක්සත් ජාතීන්ගේ ප්රකාශන, 2007. ISBN 9211009677</ref>
සැම වසරකදීම, [[දෙවන ජුවාම් පාවුළු පාප් වහන්සේ|දෙවන ජුවාම් පාවුළු]] සහ [[දහසයවන බෙනඩික්ට් පාප් වහන්සේ| දහසයවන බෙනඩික්ට්]] යන පාප් වහන්සේලා විසින් ලෝක ඒඩ්ස් දිනයේදී රෝගීන් හා වෛද්යවරුන් සඳහා සුපැතුම් පණිවුඩයක් නිකුත් කර තිබේ.<ref>[http://www.vatican.va/holy_father/john_paul_ii/letters/1988/documents/hf_jp-ii_let_19881128_aids_it.html ෆර්ස්ට් වර්ල්ඩ් ඒඩ්ස් ඩේ ඉන් 1988]</ref><ref>{{Citation |title=මෙසේජ් ෆො ද වර්ල්ඩ් ඒඩ්ස් ඩේ |url=http://www.healthpastoral.org/text.php?cid=267&sec=4&docid=21&lang=en |access-date=2012-01-15 |archive-date=2016-03-04 |archive-url=https://web.archive.org/web/20160304103134/http://www.healthpastoral.org/text.php?cid=267&sec=4&docid=21&lang=en }}</ref><ref>{{Citation |title=පෝප්: "අයි ෆීල් නියර් ටු පීප්ල් විත් ඒඩ්ස් ඇන්ඩ් දෙයා ෆැමිලීස්" |url=http://www.asianews.it/index.php?l=en&art=4758 |access-date=2012-01-15 |archive-date=2017-12-01 |archive-url=https://web.archive.org/web/20171201232802/http://www.asianews.it/index.php?l=en&art=4758 }}</ref><ref>[http://docs.google.com/viewer?a=v&q=cache:65e95Hr5YywJ:data.unaids.org/pub/PressStatement/2006/World%2520AIDS%2520Day%2520-%2520CI%2520Statement%25202006%2520-%2520Eng.pdf+aids+day+pope+2006&hl=en&gl=ca&sig=AHIEtbT8DSFpREHZcQo4yw6rDo64M8Xw8w මෙසේජ් ඔෆ් කැරිටාස් ඉන්ටර්නැෂනලිස් ඔන් ඔකේෂන් ඔෆ් වර්ල්ඩ් ඒඩ්ස් ඩේ 2006]</ref><ref>{{Citation |title=පෝප් ස්කර්ට්ස් කොන්ඩම්ස් ඉෂූ ඉන් වර්ල්ඩ් ඒඩ්ස් ඩේ ස්ටේට්මන්ට් |url=http://blogs.reuters.com/faithworld/2007/11/30/pope-skirts-condoms-issue-in-world-aids-day-statement/ |access-date=2012-01-15 |archive-date=2010-04-24 |archive-url=https://web.archive.org/web/20100424042944/http://blogs.reuters.com/faithworld/2007/11/30/pope-skirts-condoms-issue-in-world-aids-day-statement/ }}</ref><ref>{{Citation |title=මෙසේජ් ෆ්රොම් ද පෝප් ඔන් වර්ල්ඩ් ඒඩ්ස් ඩේ |url=http://www.worldaidscampaign.org/en/Constituencies/Faith/Annoucements/Message-from-the-Pope-on-World-AIDS-Day |access-date=2012-01-15 |archive-date=2020-03-13 |archive-url=https://web.archive.org/web/20200313135654/https://www.worldaidscampaign.org/ }}</ref>
==තේමා==
එක් එක් ලෝක ඒඩ්ස් දින වැඩසටහනක්ම විශේෂිත තේමාවක් අරමුණු කර ගෙන සිදුකෙරෙන අතර, [[UNAIDS]], [[WHO]] සහ එච්අයිවී/ඒඩ්ස් වැලැක්වීම සහ ප්රතිකාර කිරීමට සම්බන්ධ ආමූලිකයන්, ජාතික සහ ජාත්යන්තර කාර්යාංශයන් විශාල සංඛ්යාවක සමූපදේශනය ඔස්සේ එය තෝරා ගැනෙයි. 2008 වන විට, එක් එක් වසරක ලෝක ඒඩ්ස් දිනයේ තේමාව තොරාගනු ලැබුවේ ලෝක ඒඩ්ස් ව්යාපාරයේ ගෝලීය සුසැරවීම් කමිටුව (WAC) විසිනි.<ref name="Speicher" />
2005 වසරෙහි සිට 2010 වසර දක්වා එක් එක් ලෝක ඒඩ්ස් දිනය සඳහා තේමාව වූයේ, "ඒඩ්ස් වලක්වන්න. පොරොන්දුව ඉටු කරන්න" යන්න වන අතර, එය සැලසුම් කර තුබූයේ, එච්අයිවී/ඒඩ්ස් වැලැක්වීම, ප්රතිකාරය, සුරැකුම සහ සහයෝගය සඳහා විශ්ව ප්රවේශය, 2010 වසර වන විට ලඟාකරගැනුමට ඔවුන් එකඟවූ කැපවීම ඉටු කිරීමට දේශපාලන නායකයන් උනන්දු කිරීමටය.<ref name="Speicher" />
2012 වසර වන විට, ලෝක ඒඩ්ස් දිනය සඳහා බහු-වසර තේමාව වූයේ "ශූන්යය කරා එළඹීම: නව එච්අයිවී ආසාදන ශුන්යය කරන්න. ඒච්ස්-සබැඳි රෝගිතාවන් නිසා මරණ ශුන්යය කරන්න. වෙනස්කම් කිරීම ශුන්යය කරන්න" යන්නයි.<ref>ලෝක සෞඛ්ය සංවිධානය, [http://www.who.int/mediacentre/news/notes/2012/aids_20121129/en/ World Aids Day 2012: ක්ලෝසිං ඉන් ඔන් ග්ලෝබල් එච්අයිවී ටාගට්ස්.] සම්ප්රවේශය 8 අප්රේල් 2014.</ref>
මෙම තේමාවන් එක් දිනයකට පමණක් සීමා නොවන අතර, [[ජී8 සමුළුව]] වැනි අනෙකුත් ප්රධාන ගෝලීය ඉසව් මෙන්ම, එක්සත් රාජධානියේ [[ශිෂ්යයෝ ඒඩ්ස් සඳහා තිත තබති ව්යාපාරය]] වැනි දේශීය ව්යාපාරයන්හීද සන්දර්භය තුල, වසර පුරා, එච්අයිවී/ඒඩ්ස් පිළිබඳ දැනුවත් කිරීම ඉස්මතු කිරීමට ජාත්යන්තර ප්රයත්නය තුල භාවිතා වෙයි.
===ලෝක ඒඩ්ස් දිනය තේමා, 1988–වර්තමානය<ref name="mndoh">[http://www.health.state.mn.us/divs/idepc/diseases/hiv/worldaidsday/index.html ලෝක ඒඩ්ස් දිනය] {{Webarchive|url=https://web.archive.org/web/20161201154038/http://www.health.state.mn.us/divs/idepc/diseases/hiv/worldaidsday/index.html |date=2016-12-01 }}, මිනසෝටා සෞඛ්ය දෙපාර්තමේන්තුව, 2008</ref>===
[[ගොනුව:WHredribbonNorthPortico.jpg|right|thumb|200px|2007 නොවැම්බර් 30 වන දින ලෝක ඒඩ්ස් දිනය වෙනුවෙන් [[ධවල මන්දිරය|ධවල මන්දිරයේ]] උතුරු පෝටිකෝවේ කුළුණු අතර විශාල රතු පීත්ත පටියක් එල්ලා තිබේ.]]
[[ගොනුව:Condom on Obelisk, Buenos Aires.jpg|right|thumb|200px|2005 ලෝක ඒඩ්ස් දිනය වෙනුවෙන් දැනුවත් කිරීමේ ව්යාපාරයක කොටසක් ලෙස ආර්ජන්ටිනාවේ බුවනෝස් අයර්ස් හි ඔබලිස්ක් හි මීටර් 67 ක් දිග "[[කොන්ඩම්]]" එකක්.]]
{| class="wikitable"
|-
| style="text-align:center;"| 1988
| style="width:428px;"| සන්නිවේදනය
|-
| style="text-align:center;"| 1989
| style="width:428px;"| තාරුණ්යය
|-
| style="text-align:center;"| 1990
| style="width:428px;"| කාන්තාවන් සහ ඒඩ්ස්
|-
| style="text-align:center;"| 1991
| style="width:428px;"| අභියෝගයට හවුලේ මුහුණදීම
|-
| style="text-align:center;"| 1992
| style="width:428px;"| ප්රජා කැපවීම
|-
| style="text-align:center;"| 1993
| style="width:428px;"| ක්රියාත්මක වන්න
|-
| style="text-align:center;"| 1994
| style="width:428px;"| ඒඩ්ස් සහ පවුල
|-
| style="text-align:center;"| 1995
| style="width:428px;"| හවුල් අයිතිවාසිකම්, හවුල් වගකීම්
|-
| style="text-align:center;"| 1996
| style="width:428px;"| එක ලෝකයක්. එක බලාපොරොත්තුවක්.
|-
| style="text-align:center;"| 1997
| style="width:428px;"| ඒඩ්ස් සහිත ලෝකයක ලමුන් ජීවත්වීම
|-
| style="text-align:center;"| 1998
| style="width:428px;"| වෙනසක් බලාත්මක කරන්න: තරුණ ජනයා සමග ලෝක ඒඩ්ස් ව්යාපාරය
|-
| style="text-align:center;"| 1999
| style="width:428px;"| සවන් දෙන්න, උගෙන ගන්න, ජීවත් වන්න: ලමුන් සහ තරුණ ජනයා සමග ලෝක ඒඩ්ස් ව්යාපාරය
|-
| style="text-align:center;"| 2000
| style="width:428px;"| ඒඩ්ස්: පුරුෂයන් වෙනසත් සිදු කරති
|-
| style="text-align:center;"| 2001
| style="width:428px;"| මම සැලකිලිමත් වෙමි. ඔබත් එසේ කරනවාද?
|-
| style="text-align:center;"| 2002
| style="width:428px;"| අපකීර්තිය සහ වෙනස්කම් කිරීම
|-
| style="text-align:center;"| 2003
| style="width:428px;"| අපකීර්තිය සහ වෙනස්කම් කිරීම
|-
| style="text-align:center;"| 2004
| style="width:428px;"| කාන්තාවන්, ගැහැණු ලමයි, එච්අයිවී සහ ඒඩ්ස්
|-
| style="text-align:center;"| 2005
| style="width:428px;"| ඒඩ්ස් වලක්වන්න. පොරොන්දුව ඉටු කරන්න
|-
| style="text-align:center;"| 2006
| style="width:428px;"| ඒඩ්ස් වලක්වන්න. පොරොන්දුව ඉටු කරන්න – වගකීම
|-
| style="text-align:center;"| 2007
| style="width:428px;"| ඒඩ්ස් වලක්වන්න. පොරොන්දුව ඉටු කරන්න – නායකත්වය
|-
| style="text-align:center;"| 2008
| style="width:428px;"| ඒඩ්ස් වලක්වන්න. පොරොන්දුව ඉටු කරන්න – නායකත්වය දෙන්න – බලය පවරන්න – ඉටු කරන්න<ref>{{උපන්යාස වෙබ්|url=http://www.unaids.org/en/KnowledgeCentre/Resources/FeatureStories/archive/2008/WAD_2008_Statements.asp |title=Dr. Peter Piot, "2008 World AIDS Day statements," Joint United Nations Programme on HIV/AIDS (UNAIDS), 30 නොවැම්බර් 2008 |publisher=UNAIDS |date=2008-11-30 |accessdate=2013-12-05}}</ref>
|-
| style="text-align:center;"| 2009
| style="width:428px;"| විශ්ව පිවිසුම සහ මිනිස් අයිතිවාසිකම්<ref name="avert">[http://www.avert.org/world-aids-day.htm ලෝක ඒඩ්ස් දිනය] {{Webarchive|url=https://web.archive.org/web/20151016210347/http://www.avert.org/world-aids-day.htm |date=2015-10-16 }} avert.org</ref>
|-
| style="text-align:center;"| 2010
| style="width:428px;"| විශ්ව පිවිසුම සහ මිනිස් අයිතිවාසිකම්<ref name="avert"/>
|-
| style="text-align:center;"| 2011
| style="width:428px;"| ශූන්යය කරා එළඹීම<ref>[http://www.worldaidscampaign.org/world-aids-day/world-aids-day-2011/ ලෝක ඒඩ්ස් දිනය 2011] {{Webarchive|url=https://web.archive.org/web/20150701093011/http://www.worldaidscampaign.org/world-aids-day/world-aids-day-2011/ |date=2015-07-01 }} [[ලෝක ඒඩ්ස් ව්යාපාරය]]</ref>
|-
| style="text-align:center;"| 2012
| style="width:428px;"| ශූන්යය කරා එළඹීම<ref name="mndoh"/>
|-
| style="text-align:center;"| 2013
| style="width:428px;"| ශූන්යය කරා එළඹීම<ref name="mndoh"/>
|-
| style="text-align:center;"| 2014
| style="width:428px;"| ශූන්යය කරා එළඹීම<ref name="mndoh"/>
|-
| style="text-align:center;"| 2015
| style="width:428px;"| ශූන්යය කරා එළඹීම<ref name="mndoh"/>
|}
== මූලාශ්ර ==
{{ආශ්රලැයිස්තුව}}
== බාහිර සබැඳි ==
* [http://www.rediff.com/getahead/slide-show/slide-show-1-health-world-aids-day-10-tips-for-using-a-condom/20111201.htm වර්ල්ඩ් ඒඩ්ස් ඩේ: 10 ටිප්ස් ෆො යූසින් අ කොන්ඩෝම්]
e20t9six25e40lhl1yrz0rw0mh4r6w2
ශ්රී ලංකා අමරපුර මහා නිකාය
0
34297
796333
794495
2026-07-23T16:56:26Z
KSLwiki24
70498
/* ශ්රී ලංකා අමරපුර මහා සංඝ සභාවේ පරිපාලනමය ව්යුහය */
796333
wikitext
text/x-wiki
{{Pp-vandalism|small=yes}}{{Pp-move-vandalism}}
{{තොරතුරුකොටුව සංවිධානය
| name = මහා විහාර වංශික<br> ශ්රී ලංකා අමරපුර මහා සංඝ සභාව
| native_name = අමරපුර මහා නිකාය
| native_name_lang= th
| image = File:logo of Amrapura Nikaya.jpg
| image_size = 250px
| caption = අමරපුර මහා සංඝ සභාවේ නිල ලාංඡනය
| abbreviation = අමරපුර
| formation = 1802
| founder = වැලිතර ඤාණවිමලතිස්ස මහානායක හිමි
| type = බෞද්ධ භික්ෂු නිකාය
| status = ථේරවාද බෞද්ධ භික්ෂු නිකාය
| purpose = කුලභේදය නොසලකා පාරිශුද්ධ උපසම්පදාව ලබා දීම සහ පිරිසිදු ථේරවාද ධර්ම ප්රචාරය
| headquarters = ●කොළඹ අමරපුර මහා සංඝ සභා කාර්යාලය - සමස්ත අමරපුර සංඝ සභාව සඳහා <br>● වැලිතර අඹගහපිටිය ශ්රී අම්බරුක්ඛාරාම මූල මහා විහාරය - අමරපුර මූල මහා නිකාය<br>● දොඩන්දූව ශෛලබිම්බාරාම මූල මහා විහාරය - අමරපුර ශ්රී කළ්යාණිවංශ පාර්ශ්වය
| location = ශ්රී ලංකාව
| region_served =
| membership =
| language = සිංහල,පාලි,ඉංග්රීසි,සංස්කෘත
| leader_title = උත්තරීතර මහානායක පදවිය
| leader_name = [[කරගොඩ උයන්ගොඩ මෛත්රීමූර්තී හිමි|කරගොඩ උයන්ගොඩ මෛත්රීමූර්තී උත්තරීතර මහානායක හිමි]]<br>(2024 සිට)
| parent_organization =
| website =
| remarks =
}}
'''ශ්රී ලංකා අමරපුර මහා නිකාය''' නැතහොත් '''ශ්රී ලංකා අමරපුර මහා සංඝ සභාව''' යනු වර්ෂ 1802 දී ආරම්භ කරන ලද ශ්රී ලාංකීය පැවිදි නිකායකි. එය එවකට බුරුමයේ කොන්බෝං රාජවංශයේ අගනුවර වූ අමරපුර නගරය මුල්කොට නම් කර ඇත. අමරපුර නිකායේ හිමිවරු ථෙරවාදී බෞද්ධයෝය. 2019 අගෝස්තු 16 වන දින අමරපුර සහ රාමඤ්ඤ නිකායන් ශ්රී ලංකාවේ විශාලතම බෞද්ධ නිකාය බවට පත් කරමින්, අමරපුර - රාමඤ්ඤ නිකාය ලෙස ඒකාබද්ධ කරන ලදී.<ref name=unity>[http://www.themorning.lk/amarapura-and-ramanna-denominations-unified/ Amarapura and Ramanna denominations unified], the Morning Lanka, accessed 2019.08.17</ref>
==අතීතය==
18 වන සියවසේ මැද භාගය වන විට ලක්දිව උපසම්පදාව නැති වී ගොස් තිබුණි. ශ්රී ලංකාවේ බුදු සසුන තෙවරක්ම පිරිහුණු අතර එය නැවත ඇති කිරීමට ගත් උත්සාහය ව්යර්ථ විය. එමනිසා කීර්ති ශ්රී රාජසිංහ රාජ්ය සමයේ (1747 - 1782) වැලිවිට සරණංකර මාහිමිපානන්ගේ ආරාධනාවෙන් උපාලි නම් තෙරණුවන් වහන්සේ නමක් 1753දී මහනුවරට වැඩම කර උපසම්පදාව නැවත පිහිට වු අතර, එය සියම් නිකාය නම්වේ. එයට හේතුව උපසම්පදාව රැගෙන ආවේ සියම් දේශයෙන් වීමයි.<ref>{{Cite web |url=http://www.divaina.com/2010/01/20/feature02.html |title=ගණින්නාන්සේලා කියවිය යුතු සංඝරජ වැලවිට සරණංකර චරිතය |access-date=2010-01-20 |archive-url=https://web.archive.org/web/20170120202643/http://www.divaina.com/2010/01/20/feature02.html |archive-date=2017-01-20 |url-status=dead }}</ref>
[[Image:Most Venerable Walitota Sri Gnanawimalatisssa Maha Thera (1766-1833).jpg|thumb|right|238px|ශ්රීමත් පරම පූජ්යතර මහා ධම්ම රාජාධි රාජගුරු ගණාචරිය ශ්රී විභූෂණ වැලිතර (අඹගහපිටිය) ශ්රී ඤාණවිමලතිස්සාභිධාන මහා නාහිමිපාණන් වහන්සේ (ශ්රී ලංකා අමරපුර නිකායේ නිර්මාතෘ)]]
බුදු දහම නැවත ස්ථාපිත කර දශකයක් පමණ ගතවීමෙන් පසු 1764 දී එම නිකායට අයත් භික්ෂුන්වහන්සේලා කණ්ඩායමක් එක්ව එම නිකායේ උපසම්පදාව ලැබීමට ගොවිගම කුලයට අයත් විය යුතු බවට නීතියක් පැනවීය. මෙම සමයේදී බුදුරජාණන් වහන්සේ විනය නොසලකා හැර තිබුණු අතර, සමහර භික්ෂුන් වහන්සේලා වතුපිටි අයත් කරගෙන අඹුදරුවන් සමඟ පුද්ගලික නිවාස වල ජීවත් වුහ. ඔවුන් තන්නාසි නමින් හැඳින්වේ. මෙම සමයේදී ශ්රී ලංකාවේ වෙරළ බඩ ප්රදේශය ලන්දේසී ආක්රමණ වලට ලක්වෙමින් පැවතුණි.
සියම් නිකායේ මෙම ගොවිගම කුල භේදයට විරෝධය පල කෙරමින් වෙනත් කුල වලට අයත් භික්ෂුන් වහන්සේලා රජුගේ අනුග්රහය නොලබමින් උපසම්පදා උත්සව 2 ක් 1772 දී තොටගමුව විහාරයේදී ද, 1796 දී තංගල්ලේදී ද පැවැත්විය. නමුත් සියම් නිකාය මෙය විනය නීති කැඩීමක් බව පවසා ඒවාට අනුමැතිය ලබා නොදුන්හ.
===ආරම්භය===
ගොවිගම කුලවාදයත්, ක්රි .ව. 1762 ශ්රී වික්රම රාජසිංහයන් විසින් පැනවූ කතිකාවතත් කරණකොටගෙන වෙරළබඩ පළාත් වල විසු භික්ෂුන් වහන්සේලාට උපසම්පදා භාවය ලබාගත නොහැකි විය. මෙම තත්ත්වය වෙනස් කිරීමට සිතූ 1779 දී අඹගහපිටියේ ඤාණවිමලතිස්ස නම් භික්ෂුන් වහන්සේ නමක් තවත් සාමණේර හිමිවරුන් කණ්ඩායමක් සමඟ පහතරට ධනවත් දානපතියෙකුගේ අනුග්රහය සහිතව උපසම්පදාව ලබා ගැනීම සඳහා බුරුමය වෙත පිටත්වුහ. 1800 දී බුරුමයේ සංඝරාජ මාහිමියන් අතින් ඔවුන් උපසම්පදාව ලැබීය.
මෙම කණ්ඩායම 1802 දී ශ්රී ලංකාවට පැමිණියහ. එහිදී ඔවුන් සමඟ පැමිණි ජ්යෙෂ්ඨ මියන්මාර් භික්ෂුන් අතින් බලපිටිය මාදු ගඟේ තනවන ලද විශේෂ සීමා මාලකයක වෙසක් පුන් පොහොය දිනයේදී උපසම්පදා උළෙලක් පැවැත්විණි. ඒ සමගින්මෙ පරම පූජ්යතර මහා ධම්ම රාජාධි රාජගුරු ගණාචරිය ශ්රී විභූෂණ අඹගහපිටියේ ශ්රී ඤාණවිමලතිස්සාභිධාන මහා නාහිමිපාණන් වහන්සේගේ ආදිකර්තෘත්වයෙන් වැලිතර අඹගහපිටියේ ශ්රී අම්බරුක්ඛාරාම මූල මහා විහාරය කේන්ද්ර කරගනිමින් අමරපුර සමාගම නම් වූ නවනිකායක් ඇරඹි අතර ආරම්භයේ දීම පහතරටට පමණක් සීමා නොවී උඩරට ඇතුළු සමස්ත සිරිලක සිසාරා පූජ්යතර බෝගහපිටියේ ශ්රී ධම්මජ්ජෝති මහනාහිමි, පූජ්යතර කපුගම ශ්රී ධම්මක්ඛන්ධ මහනාහිමි, පූජ්යතර කතළුවේ ශ්රී ගුණරතන තිස්ස මහනාහිමි, පූජ්යතර අත්තුඩාවේ ශ්රී ධම්මරක්ඛිත මහනාහිමි යන මහා ස්වාමීන්ද්රයන් වහන්සේලාගේ උත්සාහයේ ප්රතිඵල වශයෙන් මහා නිකායක් වශයෙන් ව්යාප්ත කෙරිණ.
===නිල පිලිගැනීම===
සලාගම, කරාව හා දුරාව කුල වලට අයත් භික්ෂුන්වහන්සේලාද බුරුමය වෙත ගොස් උපසම්පදාව ලබාගත් අතර, 1810 දී බ්රිතාන්ය ආණ්ඩුව අමරපුර නිකායේ උපසම්පදාව පිළිගන්නා බවට නිවේදනයක් නිකුත් කළේය. නමුත් සියම් නිකාය විසින් බුදුදහමට පටහැනිව සිදුකල මෙම ක්රියාව හේතුවෙන් කුල වශයෙන් බෙදීමට ලක්විය.
==වැදගත්කම==
අමරපුර නිකායේ ආරම්භය ශ්රී ලාංකික බුදුදහමේ හා සමාජයේ වැදගත් සන්ධිස්ථානයක් සනිටුහන් කරයි. පළමුවරට රාජ්ය අනුග්රහය රහිතව බුදුදහම වෙනුවෙන් කැපවුනු ගිහි දානපතියන් මුල් වීමෙන් නව නිකායන් බිහිවිය. එම හේතුවෙන් වෙනත් නිකායන් මෙන් නොව අමරපුර නිකාය රාජ්ය බලය හා රජතුමාගෙන් නිදහස් විය. ඒ වෙනුවට මධ්යම පාන්තික දායකයන් සමඟ වඩාත් සමීපව කටයුතු කලහ. මේ හේතුවෙන් 18 හා 19 වන සියවස් වල මධ්යම පංතියේ බලය වැඩි විය. එසේම කුලවාදයට එරෙහි භික්ෂු පරපුරක් මෙතුළින් බිහිවූ අතර මෑත භාගයේදී අමරපුර මහා සංඝ සභාව රාමඤ්ඤ මහා නිකාය හා එක්ව එක් සාමග්රී ධර්ම සංඝ සභාවක් ලෙස ස්ථාපිත විය. එය ශාසන ඉතිහාසයේ වැදගත් සිදුවීමක් ලෙස සැලකිය හැකිය.
==ශ්රී ලංකා අමරපුර මහා සංඝ සභාව==
{{main|උත්තරීතර මහානායක හිමි}}
අතීතයේ අනු නිකායන් 21 කට බෙදුණු අමප්රපුර නිකාය 1960 දශකයේ අගභාගයේදී අතිපූජ්ය බලංගොඩ ආනන්ද මෛත්රේය මහනාහිමියන් සහ අතිපූජ්ය මඩිහේ පඤ්ඤාසීහ මහනාහිමියන්ගේ මූලිකත්වයෙන් ඒකරාශී විය. ‘ශ්රී ලංකා අමරපුර මහාසංඝ සභාව’ පිහිටුවා 1969 ජුලි 13 වැනි දින මහරගම සිරි වජිරඤාණ ධර්මායතනයේ පිහිටි උපෝසථාඝාරයේ දී සියලු අමරපුර නිකායට පොදු උසස් පැවිදි කිරීමේ උත්සවයක් පවත්වන ලදී. එම අවස්ථාවට ආණ්ඩුකාර ජනරාල් විලියම් ගොපල්ලව මහතා අනුග්රහය දක්වන ලදී. ලංකාව. ශ්රී ලංකා අමරපුර මහා සංඝ සභාව සඳහා උත්තරීතර මහානායක පදවියක් මෙම මුලපිරීමත් සමඟ නිර්මාණය වූ අතර එම ගෞරවනීය පදවිය දැරූ ප්රථම භික්ෂුව ලෙස අග්ගමහාපණ්ඩිත අතිපූජ්ය මඩිහේ පඤ්ඤාසීහ මහනාහිමියන් පත් කරන ලදී.[3] උත්තරීතර මහානායක පදවියට අමතරව අමරපුර නිකායේ සභාපති තනතුරක් ද නිර්මාණය කර අමරපුර මහාසංඝ සභාවේ ප්රථම සභාපතිවරයා ලෙස අග්ගමහාපණ්ඩිත, අභිධජ මහාරට්ඨගුරු අතිපූජ්ය බලංගොඩ ආනන්ද මෛත්රේය මහනාහිමියන් (1896 - 1998) පත් කරන ලදී.[4] 2019 අගෝස්තු 16 දින, අමරපුර සහ රාමඤ්ඤ නිකාය, ශ්රී ලංකාවේ විශාලතම බෞද්ධ සහෝදරත්වය බවට පත් කරමින්, අමරපුර-රාමඤ්ඤ සාමග්රී මහා සංඝ සභාව ලෙස ඒකාබද්ධ කරන ලදී.[1]
මෙතෙක් ශ්රී ලංකා අමරපුර මහා නිකායේ උත්තරීතර මහානායක හිමිපාණන් වහන්සේලා මෙසේය.
{| class="wikitable"
!
!නම
!සිට
!දක්වා
|-
|1
| [[මඩිහේ පඤ්ඤාසීහ හිමි|අතිපූජ්ය මඩිහේ පඤ්ඤාසීහ මහනාහිමි]]
|1969 ජූලි 13
|2003 සැප්තැම්බර් 9
|-
|2
|[[දවුල්දෙන ඤාණිස්සර හිමි|අතිපූජ්ය දවුල්දෙන ඤාණිස්සර මහනාහිමි]]
| සැප්තැම්බර් 2003
|3 අප්රේල් 2017
|-
|3
|[[කොටුගොඩ ධම්මාවාස හිමි|අතිපූජ්ය කොටුගොඩ ධම්මාවාස මහනාහිමි]]
|3 අගෝස්තු 2017
|22 මාර්තු 2021
|-
|4
|[[දොඩම්පහල චන්ද්රසිරි හිමි|අතිපූජ්ය දොඩම්පහල චන්ද්රසිරි මහනාහිමි]]
|20 ජූලි 2021
|16 මැයි 2023
|-
|5
|[[කරගොඩ උයන්ගොඩ මෛත්රීමූර්ති හිමි|අතිපූජ්ය කරගොඩ උයන්ගොඩ මෛත්රීමූර්ති මහනාහිමි]]
|26 නොවැම්බර් 2024
|වර්තමානය
|}
==ශ්රී ලංකා අමරපුර මහා සංඝ සභාවේ පරිපාලනමය ව්යුහය==
<div class="toccolours" style="max-width:650px; margin:1em auto; padding:1.5em; border:1px solid #ff9933; background-color:#fffaf5; font-family:sans-serif;">
<div style="text-align:center; font-weight:bold; font-size:115%; background-color:#ff9933; color:black; padding:10px; border-radius:4px; margin-bottom:15px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
ශ්රී ලංකා අමරපුර මහා නිකායේ පරිපාලන ගැලීම් සටහන
</div>
<div style="text-align:center; margin-bottom:10px;">
<div style="display:inline-block; background:#ffebd6; padding:8px 15px; border:2px solid #ff9933; border-radius:4px; font-weight:bold;">උත්තරීතර මහානායක ධුරය</div>
<div style="font-size:18px; color:#ff9933; margin:5px 0;">⬇️</div>
<div style="display:inline-block; background:#fff0db; padding:8px 15px; border:1px solid #ff9933; border-radius:4px; font-weight:bold;">සමස්ත අමරපුර මහා සංඝ සභාවේ සභාපති ඇතුළු නිලධාරී මණ්ඩලය</div>
<div style="font-size:18px; color:#ff9933; margin:5px 0;">⬇️</div>
<div style="font-size:11px; color:#666; font-style:italic; margin-bottom:15px;">
(පහත දැක්වෙන සියලුම පාර්ශවයන් සමාන්තර මට්ටමකින් නියෝජනය වේ)</div>
</div>
* '''අමරපුර ශ්රී කළ්යාණිවංශ පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
:::''' ↳ {{smaller|{{smaller|තපෝවන සම්ප්රදාය}}}}'''
:::''' ↳ {{smaller|{{smaller|[[මහමෙව්නාව භාවනා අසපු සංචිතය|මහමෙව්නාව සංඝ සභාව (අසපු සංචිතය)]]}}}}'''
* '''අමරපුර අඹගහපිටිය පාර්ශවය<br>(අමරපුර මූල මහා නිකාය)'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර මූලවංශික පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
:::''' ↳ {{smaller|{{smaller|අමරපුර ශ්රී සද්ධර්මෝදය සංඝ සභාව<br>(සිරිසුගත සාසනෝදය සංඝ සභාව)}}}}'''
* '''අමරපුර සිරි සද්ධම්මවංශ පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර චූලගන්ධි පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර සම්බුද්ධ සාසනෝදය සංඝ සභාව'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''උඩරට අමරපුර පාර්ශවය
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''උඩරට අමරපුර සාමග්රී සංඝ සභාව'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර ශ්රී ධර්මරක්ෂිතවංශ පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර සද්ධම්මයුක්තික පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර සද්ධම්මයුක්තික මාතර පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
:::''' ↳ {{smaller|{{smaller|අරිසිමලේ වන සෙනසුන් සංචිතය}}}}'''
* '''අමරපුර ශ්රී ධර්මාරාම සද්ධම්මයුක්තික පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර අරියවංශ සද්ධම්මයුක්තික පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර භ්රම්මවංශාභිධජ සද්ධම්මයුක්තික පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර මහා නිකායේ වජිරවංශ පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර සිරිසුමන (දඩලු) පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර එක්නැලිගොඩ විහාර පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර ඉද්දමල්ගොඩ විහාර පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''ඌව අමරපුර පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර ඌව උඩුකිඳ පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර රාස්සගල පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''අමරපුර ස්වේජින් පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
* '''සබරගමු අමරපුර පාර්ශවය'''
: ↳ මහානායක ධුරය
:: ↳ අනුනායක ධුරයන් සහිත කාරක සංඝ සභාව
</div>
==අමරපුර සංඝ සභාවේ පාර්ශවයක ධුරයන් බෙදීයාමේ සංවිධාන ව්යුහය==
<div class="toccolours" style="max-width:750px; margin:1em auto; padding:1.5em; border:1px solid #ff9933; background-color:#fffaf5; font-family:sans-serif;">
<div style="text-align:center; font-weight:bold; font-size:115%; background-color:#ff9933; color:black; padding:10px; border-radius:4px; margin-bottom:20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
අමරපුර සංඝ සභාවේ නිකාය පාර්ශවයක ධුරයන් බෙදීයාමේ සංවිධාන ව්යුහය
</div>
<div style="text-align:center; margin-bottom:15px;">
<div style="font-weight:bold; background:#ffe0b3; padding:6px 15px; border:1px solid #ff9933; display:inline-block; border-radius:4px;">අමරපුර නිකායික පාර්ශවය</div>
<div style="font-size:16px; color:#ff9933; margin:3px 0;">⬇️</div>
<div style="font-weight:bold;">මහානායක හිමි</div>
<div style="font-size:16px; color:#ff9933; margin:3px 0;">⬇️</div>
<div style="font-weight:bold;">අනුනායක හිමිවරුන්</div>
<div style="font-size:16px; color:#ff9933; margin:3px 0;">⬇️</div>
<div style="font-weight:bold;">ත්රිංශත්වර්ගික විධායක සංඝ සභාව</div>
<div style="font-size:16px; color:#ff9933; margin:3px 0;">⬇️</div>
<div style="font-weight:bold; background:#fff; padding:5px 10px; border:1px solid #ff9933; display:inline-block; border-radius:4px;">විධායක කාරක සංඝ සභාව</div>
</div>
<hr style="border:0; border-top:1px dashed #ff9933; margin:15px 0;">
{| width="100%" cellspacing="10" cellpadding="0" style="background:transparent;"
|- valign="top"
| width="33%" style="background:#ffffff; border:1px solid #cca473; border-radius:6px; padding:10px; box-shadow: 1px 1px 3px rgba(0,0,0,0.05);" |
<center>'''ලේඛකාධිකාරී ධුරය'''</center>
<hr style="border:0; border-top:1px solid #cca473; margin:5px 0;">
* <small>මහා ලේඛකාධිකාරී හිමි</small>
:: ↳ <small>උප ලේඛකාධිකාරී හිමි</small>
| width="33%" style="background:#ffffff; border:1px solid #cca473; border-radius:6px; padding:10px; box-shadow: 1px 1px 3px rgba(0,0,0,0.05);" |
<center>'''ප්රධාන සංඝනායක'''</center>
<hr style="border:0; border-top:1px solid #cca473; margin:5px 0;">
* <small>පළාත් ප්රධාන සංඝනායක හිමිවරුන්</small>
:: ↳ <small>උප ප්රධාන සංඝනායක හිමිවරුන්</small>
* <small>දිස්ත්රික්/පත්තු ප්රධාන සංඝනායක හිමිවරුන්</small>
:: ↳ <small>උප ප්රධාන සංඝනායක හිමිවරුන්</small>
| width="33%" style="background:#ffffff; border:1px solid #cca473; border-radius:6px; padding:10px; box-shadow: 1px 1px 3px rgba(0,0,0,0.05);" |
<center>'''අධිකරණ සංඝනායක'''</center>
<hr style="border:0; border-top:1px solid #cca473; margin:5px 0;">
* <small>ප්රධාන අධිකරණ සංඝනායක හිමි</small>
:: ↳ <small>පළාත් අධිකරණ සංඝනායක හිමිවරුන්</small>
::: ↳ <small>දිස්ත්රික්/පත්තු අධිකරණ සංඝනායක හිමිවරුන්</small>
:::: ↳ <small>දිස්ත්රික්/පත්තු උප අධිකරණ සංඝනායක හිමිවරුන්</small>
|}
</div>
==ශ්රී ලංකා අමරපුර මහ නිකායේ පාර්ශවයන්හි මහානායක හිමිවරු==
{{main|උත්තරීතර මහානායක හිමි}}
"උත්තරීතර මහානායක ධුරය" අමරපුර මහා සංඝ සභාව සතු විශේෂ ධුරයකි.
{| class="wikitable sortable"width="100%" style="background:#ffffff;"
|-
!align="left" style="background:#ffdead;" | පාර්ශවය
!align="left" style="background:#ffdead;" | මහානායක හිමි
!align="left" style="background:#ffdead;" | අනුනායක හිමි
|-
|සියලු පාර්ශව නියෝජනය කරනු ලබන උත්තරීතර මහානායක ධුරය
|කරගොඩ උයන්ගොඩ මෛත්රීමූර්ති මහානායක හිමි
|නොපවතී.
|-
|අමරපුර මහ නිකායේ රාස්සගල පාර්ශ්වය
|මහෝපාධ්යාය අතිපූජ්ය කරගොඩ උයන්ගොඩ මෛත්රී මූර්ති මහානායක ස්වාමීන් වහන්සේ - සමස්ථ අමරපුර මහා සංඝ සභාවේ උත්තරීතර මහානායක හිමි
ශ්රී ධර්මානන්ද විද්යායතන පිරිවෙන,බළංගොඩ
|මහෝපාධ්යාය පූජ්ය පල්ලේවෙල විසුද්ධාජීව අනුනායක ස්වාමීන් වහන්සේ
ශ්රී සුධර්ශනාරාමය,බෙලිහුල්ඔය
|-
|අමරපුර ශ්රී කළ්යාණිවංශ පාර්ශ්වය
|ශ්රී සරණපාලවංශාලංකාර ආචාර්ය අතිපූජ්ය දෙවිනුවර සිරිසුනන්ද මහානායක ස්වාමීන් වහන්සේ
පරම විචිත්රාරාම රාජමහා විහාරය,දෙවිනුවර
|1.පූජ්ය කොටපොල අමරකිත්ති අනුනායක ස්වාමීන් වහන්සේ
ශාන්ති පදනම සහ සේරුවිල බෞද්ධ මධ්යස්ථානය,බෞද්ධාලෝක මාවත,කොළඹ
2.අතිපූජ්ය තපෝවනයේ නිවාත අනුනායක ස්වාමීන් වහන්සේ
අභයභූමි තපෝවනය,කෑගල්ල
3.පූජ්ය තපෝවනයේ මිතභානි අනුනායක ස්වාමීන් වහන්සේ
ගෝතම තපෝවනය,කලපළුවාව,රාජගිරිය
|-
|අමරපුර මූලවංශික පාර්ශ්වය
|අතිපූජ්ය අහුංගල්ලේ විමලධම්මතිස්ස මහානායක හිමි
අම්බරුක්කාරාම මූල මහා විහාරය,බලපිටිය
|1.පූජ්ය යෝගියානේ සෝභිතතිස්ස අනුනායක ස්වාමීන් වහන්සේ
ජයසින්දරාරමය,යෝගියා
2.පූජ්ය කළුවාමෝදර සීලරතනතිස්ස අනුනායක හිමි
කේෂ්ථාසන්න මහා විහාරය,අලුත්ගම
|-
|අමරපුර සිරි සද්ධම්මවංශ පාර්ශවය
|අතිපූජ්ය අහුංගල්ලේ සිරි සීලවිසුද්ධි මහානායක හිමි
රංගිරි උල්පත් රජමහා විහාරය, ත්රිකුණාමලය
|පූජ්ය කොස්ගොඩ සුභූති අනුනායක හිමි
සංඝරාජ විහාරය, අම්බලන්ගොඩ
|-
|උඩරට අමරපුර පාර්ශ්වය
|මහෝපාධ්යාය පූජ්ය නිකපොත චන්දජෝති (වැඩබලන මහානායක) ස්වාමින්වහන්සේ
ඥාණානන්ද බෞද්ධ මධ්යස්ථානය, මාදිවෙල,
|නොපවතී.
|-
|අමරපුර පාර්ශ්වය
|මහෝපාධ්යාය අතිපූජ්ය කහපොළ සුගතරතන මහානායක ස්වාමීන් වහන්සේ
රන්කොත් විහාරය,පානදුර
|නොපවතී.
|-
|ශ්රි ලංකා අමරපුර මහා නිකායේ අඹගහපිටිය පාර්ශ්වය
|අතිපූජ්ය මාදම්පාගම අස්සජි තිස්ස මහානායක ස්වාමින්වහන්සේ
ශ්රී ඉසිපතනාරාමය,වින්සන්ට් පෙරේරා මාවත, කොළඹ 14
|පූජ්ය රන්දොඹේ සුමනාලෝකතිස්ස අනුනායක ස්වාමින් වහන්සේ
එනසරුක්ඛාරාමය,නවුත්තුඩුව
|-
|අමරපුර ශ්රී ධම්මරක්ෂිත නිකාය
|අතිපූජ්ය ත්රිකුණාමලයේ ආනන්ද මහානායක ස්වාමීන් වහන්සේ
සිරි වජිරාරාමය,කොළඹ 05
|පූජ්ය වටගෙදර විමලබුද්ධි අනුනායක ස්වාමින් වහන්සේ
සිරි පඤ්ඤාතිලකාරාමය,මහරගම
|-
|අමරපුර සද්ධම්මයුක්තික මාතර පාර්ශ්වය
|පූජ්ය අම්බලන්ගොඩ සුධම්ම මහානායක ස්වාමින් වහන්සේ
ශ්රී විජයාරාමය,අම්බලන්ගොඩ
|නොපවතී.
|-
|අමරපුර අරියවංශ සද්ධම්ම යුක්තික පාර්ශ්වය
|අතිපූජ්ය එගොඩමුල්ලේ අමරමෝලි තිස්ස මහානායක ස්වාමීන් වහන්සේ
විද්යාසාගර පිරිවෙන, රිදීගම
|1.පූජ්ය වල්පොල විමලඥාන අනුනායක ස්වාමින්වහන්සේ
ශ්රී ගංගාරාම මහ විහාරය,පෑලියගොඩ
2.පූජ්ය නවගමුවේ රේවත නායක ස්වාමින්වහන්සේ
ශ්රී පුෂ්පාරාමය,පැපිලියවෙල
3.පූජ්ය ඉහළමුල්ලේ සුගුණවංශ අනුනායක ස්වාමින්වහන්සේ
ශ්රී බෝධිරාජාරාම මූලමහා විහාරය,අංකුඹුර
|-
|අමරපුර මහා නිකායේ වජිරවංශ පාර්ශ්වය
|පූජ්ය පල්ලෙකන්දේ රතනසාර මහානායක ස්වාමීන් වහන්සේ
ශ්රී සාරිපුත්තාරාමය,නාරාහේන්පිට, කොළඹ 08
|-
|අමරපුර සිරිසුමන (දඩලු) පාර්ශ්වය
|අතිපූජ්ය කොළොන්නාවේ සිරි සුමංගල මහානායක ස්වාමීන් වහනසේ
ශ්රී දෙව්රම් මහා විහාරය,පන්නිපිටිය
|1.පූජ්ය කථලුවේ රතනසීහ අනුනායක ස්වාමින්වහන්සේ
ශ්රී සම්බුද්ධජයන්ති විහාරය,මොරටුව
2.පූජ්ය පල්ලේපොල දේවානන්ද අනුනායක ස්වාමින්වහන්සේ
ශ්රී ජයන්ති මහා විහාරය,ගලලියද්ද,මාබෝවල
|-
|අමරපුර චූලගන්ඨි පාර්ශ්වය
|අතිපූජ්ය ගන්තුනේ අස්සජි මහානායක ස්වාමින් වහන්සේ
උල්ගල පුරාණ විහාරය,ගන්තුන
|1.අතිපූජ්ය කරව්වේ විජයතිස්ස අනුනායක ස්වාමීන් වහන්සේ
නන්දන විහාරය,පිටිගල
2.පූජ්ය වැලිතර අමරනන්ද අනූනායක ස්වාමින් වහන්සේ
පුලිිනතරාමය,අහුංගල්ල
3.අතිපූජ්ය රදාවඩුන්නේ අස්සජි අනුනායක ස්වාමින් වහන්සේ
පාරමී ධර්මාශ්රමය,රදාවඩුන්න
|-
|ශ්රී ලංකා අමරපුර මහා නිකායේ එක්නැලිගොඩ විහාර පාර්ශ්වය
|අතිපුජ්ය කදන්ගොඩ සද්ධානන්ද (වැඩබලන මහානායක) ස්වාමීන් වහන්සේ
ශ්රී ශෛාරාම මහා විහාරය,බලංගොඩ
|පූජ්ය පලීගල නාරද අනුනායක ස්වාමින් වහන්සේ
ශ්රී පූෂ්පාරාම අසූමහා ශ්රවක මහා විහාරය,ඇහැලියගොඩ.
|-
|අමරපුර මහා නිකාය ඉද්දමල්ගොඩ විහාර පාර්ශ්වය
|පූජ්ය කදන්ගොඩ සමිත මහානායක ස්වාමින් වහන්සේ
ශ්රී විජයින්දාරාමය,කහවත්ත
|1.පූජ්ය කරවිට සුජාත අනුනායක ස්වාමීන් වහන්සේ
සිරිනිවාසාරාම මූලමහා විහාරය,උඩකරවිට
2.පූජ්ය පැල්මඩුල්ලේ රතනසිරි අනුනායක ස්වාමින් වහන්සේ
සුදර්මෝදය පිරිවෙන,පැල්මඩුල්ල
|}
== අයත් පාර්ශව ==
අමරපුර - රාමඤ්ඤ නිකායට ඒකරාශී වීමට පෙර, අමරපුර නිකාය අනුශාසනා 21 කට නොඅඩු ලෙස බෙදා ඇත.<ref name="subordrs">{{Cite web |url=http://www.metta.lk/temples/sangha/index.html |title=Maha Sangha of Sri Lanka |website=metta.lk/ |access-date=2010-02-22 |archive-url=https://web.archive.org/web/20100306174930/http://www.metta.lk/temples/sangha/index.html |archive-date=2010-03-06 |url-status=dead }}</ref> මෙම උප නියමයන් කුල භේද සහ ප්රාදේශීය වෙනස්කම් ඔස්සේ ගොඩනැගුණු බව විශ්වාස කෙරේ.
#අමරපුර මූලවංශික පාර්ශවය
#උඩරට අමරපුර සාමග්රි සංඝ සභාව
#අමරපුර ඌව උඩුකිඳ පාර්ශවය
#ඌව අමරපුර පාර්ශවය
#අමරපුර සිරි සද්ධම්මවංශ පාර්ශවය
#අමරපුර එක්නැළිගොඩ පාර්ශවය
#අමරපුර ඉද්දමල්ගොඩ පාර්ශවය
#අමරපුර රාස්සගල පාර්ශවය
#අමරපුර මූලවංශික පාර්ශවය
#අමරපුර නිකායේ අමරපුර පාර්ශවය
#අමරපුර අඹගහපිටිය පාර්ශවය
#අමරපුර ශ්රී ධර්මරක්ෂිත පාර්ශවය
#අමරපුර සද්ධම්මයුත්තික පාර්ශවය
#අමරපුර වජිරවංශ පාර්ශවය
#අමරපුර සිරි සුමන පාර්ශවය
#අමරපුර ස්වේජින් පාර්ශවය
#අමරපුර භ්රම්මවංශාභිධජ පාර්ශවය
#අමරපුර චූලගණ්ඨි පාර්ශවය
#උඩරට අමරපුර නිකාය(උඩරට අමරපුර පාර්ශවය)
#අමරපුර සම්බුද්ධ සාසනෝදය සංඝ සභාව
#[[අමරපුර ශ්රී කළ්යාණිවංශ පාර්ශවය]]
මීට අමතරව අමරපුර ශ්රී කළ්යාණිවංශ නිකායට අයත් මහමෙව්නාව භාවනා අසපු සංචිතයේ "මහමෙව්නාව මහා සංඝ සභාව" නමින් භික්ෂූන් වහන්සේ 1000කට ආසන්න සංඝ සභාවක් ද පවතී.
== මූලාශ්ර ==
{{reflist}}
== අමතර කියවීමට ==
* Gombrich, Richard. ''Theravada Buddhism: A Social History from Ancient Benares to Modern Colombo''. Oxon, England: Routledge and Kegan Paul, Ltd., 2004.
* [https://web.archive.org/web/20090201174605/http://dailynews.lk/2003/09/17/fea09.html Rohan L. Jayetilleke, 'The bi-centennial of the Amarapura Maha Nikaya of Sri Lanka', ''Daily News'', 17 September 2003] accessed 16 December 2005.
* [https://web.archive.org/web/20100306174930/http://www.metta.lk/temples/sangha/index.html Main Orders of the Sangha] (metta.lk)
[[ප්රවර්ගය:ශ්රී ලංකාවේ බෞද්ධ නිකායන් සහ පාර්ශව]]
m2due6n3icdy9fv4bqpbtflgwinusvm
සසම්භාවී ප්රවේශ මතකය
0
42235
796330
785730
2026-07-23T16:33:00Z
InternetArchiveBot
63598
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
796330
wikitext
text/x-wiki
[[Image:Elixir M2U51264DS8HC3G-5T 20060320.jpg|right|thumb|සසම්භාවී ප්රවේශ මතක-රැම්]]
'''සසම්භාවී-ප්රවේශ මතකය''' ('''random-access memory - RAM /ræm/රැම්''') යනු ධාවනය වෙමින් පවතින වැඩසටහන් (ක්රමලේඛ) හා සිදුකරමින් සිටින ක්රියාවලීන්ට අවශ්ය දත්ත තාවකාලිකව රඳවා තබා ගැනීමට භාවිතා කරන [[පරිගණක දත්ත ගබඩාව| පරිගණක දත්ත ගබඩා]] ආකාරයකි. පරිගණකය ක්රියාත්මක වන අවස්ථාවේ දත්ත හා උපදෙස් තාවකාලීකව ත්නපත් කර ගනු ලබන්නේ රැම් එක මගිනි
සසම්භාවී-ප්රවේශ උපාංගයක් විසින් ඕනෑම ගබඩා පරිස්ථානයක ගබඩා කර ඇති [[දත්ත]] ප්රවේශනය කිරීමේදී බොහෝ ලෙසින් එක සමාන කාල සීමාවක් ගත කරන බැවින්, දත්ත ප්රවේශනය කිරීම විගසින් හා ඕනෑම සසම්භාවී ආකාරයකට සිදු කල හැකි වෙයි.සසම්භාවී මතක උපාංග වල දත්ත වල භෞතික පිහිටීම (මතකය තුළ දත්ත පිහිටන ස්ථානය) නොසලකන බැවින් විවිධ ස්ථාන වල පිහිටියද දත්ත වෙත ප්රවේශ වීමට ගත වනුයේ එකම කාලයකි. රැම් එක තුළ ඇති [[දත්ත]] හා [[තොරතුරු]] වලට ඉතා ඉක්මනින් හා ඕනෑම අයුරකින්,එනම් නිශ්චිත අනුපිළිවෙලකින් තොරව පිවිසිය හැක. ([[දත්ත]]/[[තොරතුරු]] වෙත පිවිසීම යනුවෙන් අදහස් වනුයේ ඒවා කියවීම හා ලිවීමයි.)
මීට ප්රතිවිරුද්ධ ලක්ෂණ දරන [[අනුක්රමික ප්රවේශ මතකය]] දෘඩ තැටි, සංගත තැටි, සංඛ්යංක බහුවිධ තැටි වැනි ආචයන මාධ්ය වල දැකිය හැක.සාමාන්යයෙන් රැම් ආකාරයේ මතකයක් පරිගණක චිප (Computer chips) තුළ පවතී.රැම් එකෙහි අන්තර්ගතයන් (ගබඩා වී ඇති [[දත්ත]]/[[තොරතුරු]]/උපදෙස්) වෙත වෙනත් ආකාරයේ තොරතුරු ගබඩා වලට වඩා වේගයෙන් ප්රවේශ විය හැකි නමුත් මෙහි ඇති වාෂ්පශීලී ගතිගුණය (Volatile) නිසා [[පරිගණකය]] ක්රියාවිරහිත වූ විට ගබඩා වී තිබූ අන්තර්ගතයන් මැකී යයි.මහත් පරිශ්රමයන් දරා වාෂ්පශීලී නොවන සසම්භාවී-ප්රවේශ මතකයන් ('''Non-volatile random-access memories (NVRAMs)''') ද නිපදවා දියුණු කර ඇති අතර<ref>{{cite web|last=Gallagher|first=Sean|title=Memory that never forgets: non-volatile DIMMs hit the market|url=http://arstechnica.com/information-technology/2013/04/memory-that-never-forgets-non-volatile-dimms-hit-the-market/|publisher=Ars Technica}}</ref> මිල අධික හා සාපේක්ෂව අවම වේගයකින් ක්රියා කරන බැවින් ඒවා භාවිතය අවමය. අනුකලිත පරිපථ රැම් චිප 1970 දශකයේ මුල භාගයේදී වෙළඳපළට පැමිණියේ 1970 ඔක්තෝම්බර් මස හඳුන්වා දුන් වාණිජමය වටිනාකමකින් යුත් පළමු ඩී-රැම් චිපය වන Intel 1103 සමගය. <ref>{{cite web|first=Mary|last=Bellis|url=http://inventors.about.com/library/weekly/aa100898.htm|title=The Invention of the Intel 1103}}</ref>
සාමාන්යයෙන් “රැම්“ යන්න ඝන අවස්ථා (solid-state) මතක උපාංග (ඩීරැම් හෝ එස්රැම්) හැඳින්වීමටද, බොහෝවිට පරිගණකයක ප්රධාන මතකය හැඳින් වීමටද යොදාගනී.
ප්රකාශ ආචයන(optical storage)යේදී සංඛ්යාංක බහුවිධ තැටි (ඩීවීඩී) හැඳින්වීමට “ඩීවීඩී-රැම්“ යන්න භාවිත වුවද එය නොගැළපෙන අවභාවිතයකි. මන්දයත් මකා ලිවියහැකි සීඩී හෝ ඩීවීඩී(CD-RW or DVD-RW) වල මෙන් නැවත භාවිතයට පෙර මකාදැමීම රැම් භාවිතයේදී අනවශ්ය නිසාය.
==පරිගණක මතක වර්ග==
මතක වර්ග දෙකකි.
1. ප්රාථමික මතක(primary memories).
i. සසම්භාවී ප්රවේශ මතකය (RAM-Random Access Memory
ii. පඨන මාත්ර මතකය (ROM-Read Only Memory)
iii. වාරක මතකය (Cache Memory)
iv. රෙජිස්තර මතකය (Registers)
2. ද්වීතීයික මතක (secondary memories).
මින් සසම්භාවී ප්රවේශ මතකය අයත් වන්නෙ ප්රාථමික මතක යටතටයි.ප්රාථමික මතකවල විශේෂත්වය වන්නෙ ඒවා ඍජුවම මධ්ය සැකසුම් ඒකකය(CPU-Central Processing Unit) සමග සම්බන්ධ වීමයි.මෙම ප්රාථමික මතක අතරින් පඨන මාත්ර මතකය (ROM-Read Only Memory) හැර අනෙක් සියල්ලේම කාර්යය සැකසුම් ඒකකය(CPU-Central Processing Unit)ට සැකසීමක් කිරීමට අවශ්ය දත්ත තාවකාලිකව ගබඩා කර තබා ගැනීමයි. ROM හි කාර්යය පරිගණකයක් පණගන්වා මෙහෙයුම් පද්ධතියට ප්රවේශ වීමට පෙර සිදුකරන කාර්යයන් සදහා අවශ්ය ස්ථීරාංග(Firmware) ගබඩා කොට තබා ගැනීමයි.
==ඉතිහාසය==
[[File:Early SSA accounting operations.jpg|thumb|මෙම IBM පරිගණක 1930 සිට තොරතුරු ගබඩා කිරීමට mechanical counter භාවිත විය.]]
[[File:8 bytes vs. 8Gbytes.jpg|thumb|Core memory කොටසක් මත තැබූ නවීන සැනෙලි පතක් (flash SD card)]]
[[File:Bundesarchiv Bild 183-1989-0406-022, VEB Carl Zeiss Jena, 1-Megabit-Chip.jpg|thumb|මෙගා බිටු 1ක චිපයක් ]]
පැරණි පරිගණක වල ප්රධාන මතකයේ කාර්යය ඉටු කරන ලද්දේ පිළියවන (relay), යාන්ත්රික කවුළු (mechanical counters)<ref>{{cite web|url=http://www-03.ibm.com/ibm/history/reference/faq_0000000011.html|title=IBM Archives -- FAQ's for Products and Services|work=ibm.com}}</ref> හා ඩිලේ ලයින් (delay line) මගිනි.
අතිධ්වනික ඩිලේ ලයින්(Ultrasonic delay lines) මගින් කළ හැකි වූයේ දත්ත ලියවුණු අනුපිළිවෙලින් පිටපත් කිරීම(reproduce) පමණි.
ඩ්රම් මතකය (Drum memory) සාපේක්ෂ අඩු පිරිවැයකින් පුළුල් කළ හැකි වුවද, වේගය ඵලදායී ලෙස වැඩි කිරීම සඳහා “මතක අයිතම වල කාර්යශූර සමුද්ධරණය“ට (Efficient retrieval of memory items) ඩ්රම් එකෙහි භෞතික සැලැස්ම පිළිබඳ දැනුම අවශ්ය විය.
රික්තක නළ ට්රයෝඩ(vacuum tube triodes) සහ පසුකාලීනව වියුක්ත ට්රාන්සිස්ටර(discrete transistors) මගින් නිපදවූ අගුළු (Latches) රෙජිස්තර වැනි කුඩා සහ වේගවත් මතක සඳහා භාවිත විය. එවැනි රෙජිස්තර ප්රමාණයෙන් විශාල දත්ත සඳහා භාවිත කිරීමේදී සාපේක්ෂව විශාල හා මිල අධික වූ අතර, සාමාන්යයෙන් ඉන් සපයාගත හැකි වූයේ බිටු සිය ගණනක කුඩා මතකයකි.<!--generally only a few dozen or few hundred bits of such memory could be provided.මෙය ඉහත වැකියේ “,“ ලකුණෙන් පසු කොටසේ නිවැරදි ඉංග්රීසි අදහසයි.මා විසින් කළ පරිවර්තනය වැරදීමට බොහෝදුරට ඉඩ ඇත,එය නිවැරදි කරන්න. ස්තුතියි, රන්දේව්-->
පළමු ප්රායෝගික ආකෘතියේ සසම්භාවී ප්රවේශ මතකය වූයේ 1947 නිපදවූ විලියම් කපාටය (Williams tube)යි.කැතෝඩ කිරණ නළ මුහුණතක විද්යුත් ආරෝපිත ලක්ෂ්යයන් මත දත්ත ගබඩා කිරීම එහිදී සිදු විය.කැතෝඩ කිරණ නළයේ ඉලෙක්ට්රෝන කදම්භයට අනුපිළිවෙලකින් තොරව නළයේ ඕනෑම ලක්ෂ්යයක් කියවීමට හා ලිවීමට හැකි වීමෙන් මතකය “සසම්භාවී ප්රවේශ“ තත්වයට පත්විණි.විලියම් නලයේ ධාරිතාව බිටු 1000කට ආසන්න වූ අතර ඒවා තනි රික්තක නළ තරංක (latches) වලට සාපේක්ෂව කුඩා, වේගවත් හා වඩා ප්රබල කාර්යක්ෂමතාවකින් යුතු විය.ලොව පළමුවරට ඉලෙක්ට්රොනිකව ක්රමලේඛයක් ගබඩා කරන ලද්දේද එංගලන්තයේ මැංචෙස්ටර්හි වික්ටෝරියා විශ්ව විද්යාලයේදී දියුණු කෙරුණු මෙම විලියම් නළයකය.එම ක්රමලේඛය භාවිත වූ පරිගණකය නම්, 1948 ජූනි 21 වන දින පළමුවරට ක්රමලේඛයක් සාර්ථකව ධාවනය කළ එස්එස්ඊඑම් (SSEM -Manchester Small-Scale Experimental Machine) පරිගණකයයි.<ref>{{Citation | last = Napper | first = Brian | title = Computer 50: The University of Manchester Celebrates the Birth of the Modern Computer | url = http://www.computer50.org/ | accessdate = 26 May 2012 | access-date = 30 March 2016 | archive-date = 4 May 2012 | archive-url = https://web.archive.org/web/20120504133240/http://www.computer50.org/ }}</ref>
ඇත්ත වශයෙන්ම, SSEM සඳහා නිර්මාණය කරන ලද විලියම් කපාට මතකයට වඩා මතකයේ විශ්වසනීයත්වය ආදර්ශනය සඳහා ආදර්ශයක් (testbed) වූයේ SSEMය.<ref>{{Citation|last1=Williams|first1=F.C.|last2=Kilburn|first2=T.|title=Electronic Digital Computers|journal=Nature|volume=162|pages=487|date=Sep 1948|doi=10.1038/162487a0|issue=4117|postscript=.}} Reprinted in ''The Origins of Digital Computers''</ref><ref>{{Citation|last1=Williams|first1=F.C.|last2=Kilburn|first2=T.|last3=Tootill|first3=G.C.|title=Universal High-Speed Digital Computers: A Small-Scale Experimental Machine|url=http://www.computer50.org/kgill/mark1/ssem.html|journal=Proc. IEE|date=Feb 1951|volume=98|issue=61|pages=13–28|postscript=.|doi=10.1049/pi-2.1951.0004|access-date=2016-03-30|archive-date=2013-11-17|archive-url=https://web.archive.org/web/20131117101730/http://www.computer50.org/kgill/mark1/ssem.html}}</ref>
චුම්බක මාධ්ය මතකය (Magnetic-core memory) 1947 නිපදවා 1970 දශකයේ මැද භාගය තෙක් දියුණු කෙරිණ. චුම්බකිත මුදු අරාවක් (පෙළක්) මගින් ගොඩනැගුණු මෙය සුපතල සසම්භාවී ප්රවේශ මතකයක් විය. එක් එක් මුදුව චුම්බකනය වූ ප්රමාණය වෙනස් කිරීම මගින් මුදුවක් පාසා ගබඩා කර ඇති බිටුවක් සමග දත්ත තැන්පත් කළ හැකි විය.
මුදුව තුළ ඇති මතක කොටස් තෝරාගැනීම හා කියවීම/ලිවීම සඳහා සෑම මුදුවක්ම ලිපින තන්තු වලට සම්බන්ධ වූ බැවින් මතකය තුළ ඕනෑම ස්ථානයකට ඕනෑම අනුපිළිවෙලකින් ප්රවේශ වීමේ හැකියාවක් ලැබිණ.
1970 දශකයේ මුල භාගයේ නිපදවුණු අනුකලිත පරිපථවල ඝන අවස්ථා මතකය (solid-state memory) භාවිතයට පැමිණෙන තුරු මතක පද්ධතියේ සම්මත ස්වභාවය වූයේ චුම්බක මාධ්ය මතක ආකාරයයි. 1968 වසරේ රොබට් එච්.ඩෙනාර්ඩ් (Robert H. Dennard) විසින් ඩී-රැම් එක (ගතික සසම්භාවී ප්රවේශ මතකය) නිපදවන ලදි. මෙම ඩී-රැම් එක තුළ එක් එක් මතක බිටුව සඳහා ට්රාන්සිස්ටර 4-6 ක අගුළු පරිපථයක් වෙනුවට තනි ට්රාන්සිස්ටරය බැගින් ප්රතිස්ථාපනය වූ බැවින් වාශ්පශීලීතාවයේ අගය (cost of volatility) මත මතක ඝනත්වය වැඩිවිය.එක් එක් ට්රාන්සිස්ටරය තුළ කුඩා ධාරිතාවන් තුළ දත්ත ගබඩා කෙරුනු අතර සෑම මිලිතත්පර කිහිපයකටම වරක් ආරෝපණ කාන්දුවී යාමට පෙර පුබුදු (refresh) කළ යුතු විය.
සංයුක්ත රොම් පරිපථ වලට පෙර පඨන මාත්ර (එනම් කියවීමට පමණක් හැකි) සසම්භාවී ප්රවේශ මතකයන් දියෝඩ අනුකෘති (Diode matrix) භාවිතයෙන් ගොඩනගන ලදි. මෙම දියෝඩ අනුකෘති ලිපින විකේතක (address decoder) මගින් ධාවනය විය <!--diode matrices driven by [[address decoder]]s, or specially wound core rope memory planes.-->
==විවිධ සසම්භාවී ප්රවේශ මතක වර්ග==
ගතික හා ස්ථිතික වශයෙන් සසම්භාවී ප්රවේශ මතක ප්රධාන වශයෙන් වර්ග 2කි. මෙම දෙවර්ගයම වාෂ්පශීලී ගුණය සහිතය. සාමාන්යයෙන් විවිධ වර්ගවල රැම් එකම [[පරිගණකය]]ක ක්රියාත්මක නොවේ. බොහෝ පරිගණක තුළ ඇත්තේ එක් වර්ගයකට අයත් රැම් පමණි. ඇතැම් ඒවායේ රැම් වර්ග ඉතා සීමිත ප්රමාණයක් භාවිත කළ හැක. බොහෝ විට විවිධ වර්ගයේ රැම් වල සම්බන්ධකද හැඩයෙන් එකිනෙකට වෙනස් වන බැවින් එක් [[පරිගණකය]]කට සම්බන්ධ කළ හැකි රැම් චිප ගණන සීමිත වේ.
===ගතික සසම්භාවී ප්රවේශ මතකය (ඩී-රැම්/Dynamic random access memory–DRAM)===
එස්-රැම් වලට සාපේක්ෂව මිල අඩුය. බහුලව පරිගණක තුළ භාවිත වේ. වත්මන් පරිගණක වල විවිධ වර්ගවල ඩී රැම් භාවිත වේ. 2002 වසරට පෙර බොහෝ පරිගණක වල භාවිත වූයේ එස්ඩීආර්-රැම් (single data rate (SDR) RAM)ය. පසුකාලීනව නිපදවුණු බොහෝ පරිගණක තුළ ඩීඩීආර් (double data rate (DDR)), ඩීඩීආර්2 හෝ ඩීඩීආර්3 රැම් භාවිත විය.
ඩීඩීආර්2 මගින් ඩීඩීආර් රැම් එකට වඩා ඉක්මනින් ගබඩාකර ඇති දත්ත වෙත පිවිසිය හැක. එවිට සකසනයට වඩාත් කාර්යක්ෂම ලෙස දත්ත සැකසීම සිදු කිරීමේ හැකියාවක් ලැබේ. සාපේක්ෂව ඩීඩීආර්3 වඩාත් වේගවත් ය.
===ස්ථිතික සසම්භාවී ප්රවේශ මතකය (එස්-රැම්/Static random access memory-SRAM)===
දත්ත රඳවා තබා ගැනීමට බල ශක්තිය අවශ්ය නමුත් පරිගණකය ක්රියාත්මක තත්වයේ පැවතීම අවශ්ය නොවේ. ඇතැම් එස්-රැම් චිප වල විදුලි කෝෂ බලය උපයෝගී වේ(battery-backed). [[පරිගණකය]] ක්රියා විරහිත කළ විට දත්ත නොමැකීම සහතික කරගැනීමට මෙම වර්ගය තුළ චිපය හා එක්කොට සකසන ලද බැටරියක් අන්තර්ගත වේ.
ඩී-රැම් වලට සාපේක්ෂව මිල අධික,වේගවත් හා අවම බලශක්තියක් පරිභෝජනය කරන එස්-රැම් මතකයන් වත්මන් පරිගණකවල සකසනයේ වාරක මතකය ලෙස භාවිත වේ.
==රැම්හි වෙනත් භාවිත==
මෙහෙයුම් පද්ධතියේද, යෙදුම් (applications) වලදීද කාරක අවකාශය(working space) ලෙස හා තාවකාලික ගබාඩාවක් ලෙස ක්රියා කිරීම හැරුණ විට රැම්හි වෙනත් භාවිත බොහෝමයකි.
===අතථ්ය මතකයක් ලෙස===
බොහෝ නූතන මෙහෙයුම් පද්ධති වල "අතථ්ය මතකය" ලෙස හඳුන්වන රැම් ධාරිතාව වැඩිකර භාවිතයට ගැනීමේ ක්රමයක් ක්රියාත්මක වේ.
පරිගණකයේ දෘඪ තැටියෙන් කොටසක් පිටු ගොනුව (paging file) හෝ (scratch partition)' ලෙස සකසන අතර එම paging file හා සාමාන්ය රැම් චිපය එකතු වී පද්ධතියේ සම්පූර්ණ මතකය නිර්මාණය කරයි.(උදාහරණ ලෙස 2 GB රැම් එකක් හා 1 GB පිටු ගොනුවක් සම්බන්ධ මෙහෙයුම් පද්ධතියක සම්පූර්ණ මතකය 3 GB වේ.)පද්ධතියේ භෞතික මතකය අඩු වන විට, එයට රැම්හි කොටස් පිටු ගොනුවට හුවමාරු කරගනිමින් නව දත්ත සඳහා කුටියක්/අවකාශයක් තැනීම හා පෙර රැම් එකට හුවමාරු කළ තොරතුරු කියවීම කළ හැක.
නමුත් දෘඪ තැටි රැම් වලට වඩා වේගයෙන් අඩුවීම වැනි කරුණු හේතුවෙන් මෙම යාන්ත්රණය පමණ ඉක්මවා භාවිතයට ගැනීම නිසා සමස්ත පද්ධතියේ ක්රියාකාරීත්වයට සිදුවන්නේ අහිතකර බල පෑමකි.
===රැම් තැටි/ රැම් ධාවක===
රැම් තැටියක් යනු ඉතා වේගවත් දෘඪ තැටියක් සේ ක්රියාකළ හැකිවන පරිදි මෘදුකාංග මගින් බෙදා වෙන් කරන ලද පරිගණක රැම් ඛණ්ඩයකි (Portion).
රැම් තැටියක් සතුව උපස්ථ විදුලිකෝෂ මූලාශ්රයක් හා සම්බන්ධයක් නොමැති විට, එහි ගබඩා කර ඇති දත්ත පරිගණකය ක්රියා විරහිත කිරීමත් සමග නැතිවී යයි.
==මතක පවුර==
මතක පවුර යනු සකසනය හා ඊට පිටින් ඇති මතකයන් අතර ඇති වැඩිවන ශීඝ්රතා වෙනසයි.චිපයේ මායිම් වටා ඇති සීමිත සන්නිවේදන කලාපපළල මෙම වෙනස සඳහා ප්රධාන හේතුවක් වේ.
1986 සිට 2000 දක්වා සකසනයේ වේගය වාර්ෂිකව 55% ක අනුපාතයකින් දියුණු වී ඇති අතර, සාපේක්ෂව මතකයේ වේගය දියුණු වී ඇත්තේ 10% කිනි.මෙවන් තත්වයක් මත මතකයේ ස්වභාවය පරිගණකයේ ඵලදායීතාව කෙරෙහි විශාල ගැටළුවක් ඇති කරනු ඇතැයි අපේක්ෂිත විය.<ref>The term was coined in http://www.eecs.ucf.edu/~lboloni/Teaching/EEL5708_2006/slides/wulf94.pdf {{Webarchive|url=https://web.archive.org/web/20120406111104/http://www.eecs.ucf.edu/~lboloni/Teaching/EEL5708_2006/slides/wulf94.pdf |date=2012-04-06 }}].</ref>ප්රධාන භෞතික බාධක හා එවක නිර්මිතව පැවති සකසන යම්තාක් දුරට මතක පවුර හා ගැටුණු බැවින් සකසනයේ වේගය වැඩිදියුණු කිරීම සැලකිවයුතු අන්දමින් අඩු විය.ඉන්ටෙල් ආයතනය (Intel Corporation) විසින් මෙම තත්වය 2005 වසරේ ලේඛනයක් මගින් සාරාංශගත කෙරිණ.<ref>{{Cite web |title= Platform 2015: Intel® Processor and Platform Evolution for the Next Decade |date= March 2, 2005 |url= http://epic.hpi.uni-potsdam.de/pub/Home/TrendsAndConceptsII2010/HW_Trends_borkar_2015.pdf }}</ref>
2000 සහ 2014 අතර වාර්ෂිකව 12.5% ක් වූ සකසනයේ ඵලදායිතාව වැඩිදියුණු කිරීම පිළිබඳ ව්යාපෘතියකදී සංඥා සම්ප්රේෂණයේ ප්රමාදයක්ද වාර්තා විය. [http://www.cs.utexas.edu/users/cart/trips/publications/isca00.pdf Clock Rate versus IPC: The End of the Road for Conventional Microarchitectures] සකසන-මතක ඵලදායිතා අතර වෙනස සම්බන්ධ වෙනස් ආකාරයක සංකල්පයක් වන ත්රිමාන පරිගණක චිප මගින් ද්විමාන චිප වලට වඩා තාර්කික හා මතක අංශ අතර පරතරය අඩු කෙරිණ.<ref>{{cite book |page=790 |url=http://books.google.ca/books?id=1PgYS7zDCM8C&pg=PA790&dq=processor-memory+performance+gap&hl=en&sa=X&ei=jeM5U93YAqTr2QWc74A4&ved=0CDYQ6AEwAg#v=onepage&q=processor-memory%20performance%20gap&f=false |accessdate=March 31, 2014 |title=Nanoelectronics and Information Technology |author=[[Rainer Waser]] |publisher=John Wiley & Sons |year=2012}}</ref> කාලයත් සමග වැඩිවන මෙම මතක පවුර කෙරෙහි නාභිගත වීමක් (යොමු වීමක්) මතක උපපද්ධති සැලැස්මට අවශ්ය විය.<ref>{{cite book |url=http://books.google.ca/books?id=0IY7LW5J4JgC&pg=PA109&dq=processor-memory+performance+gap&hl=en&sa=X&ei=jeM5U93YAqTr2QWc74A4&ved=0CEkQ6AEwBg#v=onepage&q=processor-memory%20performance%20gap&f=false |page=109 |accessdate=March 31, 2014 |title=Advances in Computer Systems Architecture: 11th Asia-Pacific Conference, ACSAC 2006, Shanghai, China, September 6-8, 2006, Proceedings |author=Chris Jesshope and Colin Egan |publisher=Springer |date=2006}}</ref>
මෙම අන්තරය යා කරන ප්රධාන උපක්රමය ලෙස වර්තමානයේ භාවිතයට ගැනෙන්නේ වාරක/සංචිත(කෑෂ්-Cache) මතකයයි. සංචිත මතක යනු සකසනය අසල සිටිමින් එසැණ ක්රියාවලි හා උපදෙස් ගබඩා කරගනිමින් ඒවායේ වේගය වැඩි කරවන අධිවේගී මතක කොටස්ය. මතක පවුරේ පළල්වීම අඩු කිරීමට සංචිත මතකයන් මට්ටම් කීපයක් භාවිතවේ. මෙම සංචිත මතකයන්හි පරිණාමය මත නූතන අධිවේගී පරිගණක වල කාර්ය සාධනය රඳා පවතී.<ref>{{cite book |url=http://books.google.ca/books?id=7i9Z69lrYBoC&pg=PA90&dq=processor-memory+performance+gap&hl=en&sa=X&ei=jeM5U93YAqTr2QWc74A4&ved=0CFMQ6AEwCA#v=onepage&q=processor-memory%20performance%20gap&f=false |pages=90–91 |accessdate=March 31, 2014 |title=Multiprocessor Systems-on-chips |author=Ahmed Amine Jerraya and Wayne Wolf |publisher=Morgan Kaufmann |year=2005}}</ref> සංචිත මතක මගින් සකසනයේ ඵලදායිතාව අඩුවීම වැළකෙන අතර එමගින් අඩු කාලයකින් සකසනයෙන් සිදුකරගත හැකි කාර්යයන් ගණන වැඩිවේ.<ref>{{cite book |url=http://books.google.ca/books?id=vw4zrPuyKu0C&pg=PA110&dq=processor-memory+performance+gap&hl=en&sa=X&ei=r-M5U86-NaeC2QXiroHgCA&ved=0CEEQ6AEwBDgK#v=onepage&q=processor-memory%20performance%20gap&f=false |page=110 |accessdate=March 31, 2014 |title=Impact of Advances in Computing and Communications Technologies on Chemical Science and Technology |year=1999 |publisher=National Academy Press}}</ref> 53%කට ආසන්න වෙනසක් සකසනයේ වේගය හා ප්රධාන මතකයේ ප්රවේශ ප්රමාදය අතර තිබිය හැක.(එනම් කෑෂ් මෙමරි භාවිත කරන විට එපමණ වේග වෙනසක් මගින් පරිගණකයේ ඵලදායීභාවයට හානි නොවන බවයි?)<ref>{{cite book |url=http://books.google.ca/books?id=f0pJYJQMlmoC&pg=PA529&dq=processor-memory+performance+gap&hl=en&sa=X&ei=1eM5U7veEaTx2QXM2oDYCw&ved=0CCwQ6AEwADgU#v=onepage&q=processor-memory%20performance%20gap&f=false |page=529 |accessdate=March 31, 2014 |title=Experimental and Efficient Algorithms: Third International Workshop, WEA 2004, Angra Dos Reis, Brazil, May 25-28, 2004, Proceedings, Volume 3 |author=Celso C. Ribeiro and Simone L. Martins |publisher=Springer |year=2004}}</ref>
{{පරිගණ-ආචයනය-කොට}}
[[ප්රවර්ගය:පරිගණක මතකය]]
hnnjn55dmiovjr43q40j378la3tqbw0
ශ්රී ලංකීය ඕස්ට්රේලියානුවන්
0
102691
796328
766732
2026-07-23T16:00:39Z
InternetArchiveBot
63598
Rescuing 2 sources and tagging 0 as dead.) #IABot (v2.0.9.5
796328
wikitext
text/x-wiki
[[Category:Articles using infobox ethnic group with image parameters|ΒSri Lankan Australians]]
'''ශ්රී ලංකීය ඕස්ට්රේලියානුවන්''' ({{බස-en|Sri Lankan Australians}}, {{බස-ta|இலங்கை ஆஸ்திரேலியர்கள்}}) [[ඕස්ට්රේලියාව|ඔස්ට්රේලියාවේ]] වෙසෙන [[ශ්රී ලංකාව|ශ්රී ලාංකීය]] උරුමයන් සහිත පුද්ගලයන් වේ. මෙයට උපතින් සහ පරම්පරාවෙන් ශ්රී ලාංකිකයන් ඇතුළත් වේ. ශ්රී ලාංකික ඕස්ට්රේලියානුවන් [[ශ්රී ලංකාව සබැඳි ඩයස්පෝරා|විදේශගත ශ්රී ලාංකික]] ප්රජාවන්ගේ විශාලතම කණ්ඩායම් වලින් එකක් වන අතර ඕෂනියාවේ විශාලතම ඩයස්පෝරික ශ්රී ලාංකික ප්රජාව වේ. ශ්රී ලාංකික ඕස්ට්රේලියානුවන් [[සිංහල ජනයා|සිංහල]], [[ශ්රී ලංකා සම්භවයක් සහිත දෙමළ ජනයා|දෙමළ]], [[ශ්රී ලාංකික මරක්කල|මුවර්]], බර්ගර්, [[ලංකා මැලේ ප්රජාව|මැලේ]] සහ චීන සම්භවයක් ඇති අයගෙන් සමන්විත වේ.<ref>{{උපන්යාස වෙබ් |date=March 2017 |title=People of Sri Lanka |url=http://mncdol.gov.lk/web/images/downloads/publications/people_of_sri_lanka_book.pdf |access-date=1 January 2018 |publisher=The Ministry of National Coexistence, Dialogue and Official Languages}}</ref>
== ඉතිහාසය ==
{{Historical populations|1816|2|1876|~500|1901|609|1911|611|1921|637|1933|638|1947|*|1954|1961|1961|3433|1966|5562|1971|9091|1976|14866|1981|16966|1986|22513|1991|37283|1996|64068|2001|53461|2006|62256|2011|86412|2016|109853|type=|footnote=දත්ත පදනම් වී ඇත්තේ [[ඕස්ට්රේලියානු රජය]]හි සංගණනය මතය.<ref name="2011 Census">{{cite web|title=People in Australia who were born in Sri Lanka|url=http://www.censusdata.abs.gov.au/census_services/getproduct/census/2011/quickstat/7107_0|publisher=Australian Bureau of Statistics|access-date=10 January 2014}}</ref><br />*[[ඉන්දියානු ජනගහනය]] ඇතුළත්}}{{Historical populations|3|4}}
=== කලින් පැමිණීම ===
ඕස්ට්රේලියාවට වාර්තාගත ශ්රී ලාංකික සංක්රමණය ආරම්භ වූයේ 1816 දී, ඩ්රම් මේජර් විලියම් ඕ'ඩීන් ([[ශ්රී ලංකික මැලේ භාෂාව|ශ්රී ලාංකික මැලේ ජාතික]]) සහ ඔහුගේ බිරිඳ ඊවා ([[සිංහල ජනයා|සිංහල ජාතික]]) පැමිණීමෙනි. ශ්රී ලංකාවෙන් පැමිණි මුල් සංක්රමණිකයන් (එවකට සිලෝන් ලෙස හැඳින්වූ) සාමාන්යයෙන් (ඕ'ඩීන්වරුන් මෙන් නොව) ආදිවාසී ජනගහනයට අවශෝෂණය විය. ශ්රී ලාංකික සංක්රමණය පිළිබඳ අනෙකුත් මුල් යොමු කිරීම් 1870 ගණන්වල සිට [[දකුණු ඕස්ට්රේලියාව|දකුණු ඕස්ට්රේලියාවේ]] බලධාරීන් ලංකාවෙන් ශ්රම ආනයනය කිරීමේ හැකියාව සොයා ගිය කාලය දක්වා දිව යයි.<ref name="radio.sbs.com.au">{{උපන්යාස වෙබ් |title=SBS Radio - Sinhalese |url=http://radio.sbs.com.au/language.php?page=info&language=Sinhalese |archive-url=https://web.archive.org/web/20091003100419/http://radio.sbs.com.au/language.php?page=info&language=Sinhalese |archive-date=3 October 2009 |website=radio.sbs.com.au}}</ref> ශ්රී ලංකාවෙන් පළමු සිංහලයා 1870 දී [[ක්වීන්ස්ලන්තය|ක්වීන්ස්ලන්තයේ]] උක් වතුවල වැඩ කිරීමට පැමිණියේය. 1876 තර්ස්ඩේ දිවයිනේ ප්රජාවක් පවතින බව විශ්වාස කෙරිණි. 1882 දී, 500 දෙනෙකුගෙන් යුත් කණ්ඩායමක් [[කොළඹ|කොළඹින්]] පිටත්ව ක්වීන්ස්ලන්තය බලා පිටත්ව ගියෝය.<ref name="radio.sbs.com.au" />
=== 20 වැනි සියවස ===
[[ගොනුව:ABS-3401.0-OverseasArrivalsDeparturesAustralia-PermanentMovementSettlers_CountryBirthMajorGroupsSelectedSourceCountries-Original-NumberMovements-SriLanka-A83808763R.svg|වම|thumb| 1991 සිට ශ්රී ලංකාවෙන් ඕස්ට්රේලියාවට පැමිණෙන ස්ථිර පදිංචිකරුවන්ගේ සංඛ්යාව (මාසිකව)]]
සුදු ඕස්ට්රේලියානු ප්රතිපත්තිය යටතේ සංක්රමණ නොසැලකිය යුතු විය. [[දෙවන ලෝක යුද්ධය|දෙවන ලෝක සංග්රාමයෙන්]] පසුව එය නැවත ආරම්භ වූයේ මූලික වශයෙන් බර්ගර්වරුන්ගේ සංක්රමණය සම්බන්ධ වන අතර, ඔවුන් ප්රධාන වශයෙන් යුරෝපීය සම්භවයක් තිබිය යුතු අතර ඔවුන්ගේ පෙනුම යුරෝපීය විය යුතුය යන එවකට නිර්ණායක සපුරාලන ලදී. 1954 වන විට ශ්රී ලාංකිකයන් 2000ක් පමණ පිළිගෙන තිබුණි. 1960 ගණන්වල සිංහල සංක්රමණය ආරම්භ වූ නමුත් 1970 දශකයේ මැද භාගයෙන් පසුව ක්රිස්තියානුවන් සහ බෞද්ධයන් ද ඇතුළත් විශාල කණ්ඩායම් පැමිණියේය. 1970 ගණන් වලදී බඳවා ගැනීමේ සීමාවන් ලිහිල් වූ අතර සුදු ඕස්ට්රේලියානු ප්රතිපත්තිය විධිමත් ලෙස විසුරුවා හැරීමට පෙර [[කොළඹ ක්රමය|කොළඹ සැලැස්මේ]] කොටසක් ලෙස ශ්රී ලාංකික සිසුන් ඕස්ට්රේලියාවේ පාඨමාලා හැදෑරූ අතර 1973 න් පසු සහ 1980 දශකයේ මුල් භාගයේ සිට සිංහල, දෙමළ සහ මුස්ලිම් සංක්රමණය නැවත ආරම්භ වී වැඩි විය.<ref name="radio.sbs.com.au">{{උපන්යාස වෙබ් |title=SBS Radio - Sinhalese |url=http://radio.sbs.com.au/language.php?page=info&language=Sinhalese |archive-url=https://web.archive.org/web/20091003100419/http://radio.sbs.com.au/language.php?page=info&language=Sinhalese |archive-date=3 October 2009 |website=radio.sbs.com.au}}</ref><ref name="Sri Lankans">{{උපන්යාස වෙබ් |title=Sri Lankans |url=http://www.emelbourne.net.au/biogs/EM01419b.htm |access-date=20 August 2011 |publisher=eMelbourne}}</ref>
=== ඉදිරිපත් කරන්න ===
''The Australian People'', S. Pinnawala ලියා ඇත්තේ "විවිධ ශ්රී ලාංකික සංක්රමණික කණ්ඩායම් අතර සමාජ අන්තර්ක්රියා බොහෝ විට ඔවුන්ගේ මව් රටෙහි ඇති වූ සාධක මගින් බලපා ඇති" බවයි.
1980 ගණන්වලදී, ශ්රී ලංකාවේ [[ශ්රී ලංකානු සිවිල් යුද්ධය|ජනවාර්ගික නොසන්සුන්තාවයේ]] පිළිබිඹුවක් මත, සිංහල සහ දෙමළ ප්රජාවන් අතර ආතතීන් වර්ධනය විය. කෙසේ වෙතත් පින්නවලගේ මතය අනුව මෑතක සිට විවිධ ආගමික සහ වාර්ගික සංක්රමණිකයන් අතර ශ්රී ලාංකික අනන්යතාවයක් ගොඩනැගී ඇත.
මෙය [[ශ්රී ලාංකීය සංස්කෘතිය|ශ්රී ලාංකේය සංස්කෘතිය]] සහ සම්ප්රදායන් ප්රවර්ධනය කිරීම සඳහා නව ප්රජා සංවිධාන රාශියක් ස්ථාපිත කිරීමට හේතු වී තිබේ. දැන් ඕස්ට්රේලියාවේ වෙසෙන සිංහල බෞද්ධයන් සහ [[මියන්මාරය|බුරුමය]], [[තායිලන්තය]] සහ [[කාම්බෝජය|කාම්බෝජයේ]] ඔවුන්ගේ සම-ආගමිකයන් අතර ද ශක්තිමත් සබඳතා ගොඩනඟා ඇත. දැන් ඕස්ට්රේලියාවේ වෙසෙන ශ්රී ලංකාවෙන් පැමිණෙන ක්රිස්තියානි සංක්රමණිකයන් අතරද සමාන ප්රවණතා සොයාගත හැකිය. <ref name="radio.sbs.com.au">{{උපන්යාස වෙබ් |title=SBS Radio - Sinhalese |url=http://radio.sbs.com.au/language.php?page=info&language=Sinhalese |archive-url=https://web.archive.org/web/20091003100419/http://radio.sbs.com.au/language.php?page=info&language=Sinhalese |archive-date=3 October 2009 |website=radio.sbs.com.au}}</ref>
== ජනවිකාස ==
[[ගොනුව:Australian_Census_2011_demographic_map_-_Inner_Sydney_by_POA_-_BCP_field_1824_Sri_Lanka_Total.svg|දකුණ|thumb|250x250පික්| 2011 සංගණනයට අනුව [[සිඩ්නි]] හි ජනගහණයෙන් ප්රතිශතයක් ලෙස ශ්රී ලංකාවේ උපන් ජනතාව භූගෝලීය වශයෙන් තැපැල් ප්රදේශය අනුව බෙදී ඇත.]]
[[ගොනුව:Australian_Census_2011_demographic_map_-_Inner_Sydney_by_POA_-_BCP_field_1192_Sinhalese_Total_Responses.svg|දකුණ|thumb|250x250පික්| 2011 සංගණනයට අනුව සිඩ්නි හි ජනගහණයෙන් ප්රතිශතයක් ලෙස සිංහල සම්භවයක් ඇති පුද්ගලයින් භූගෝලීය වශයෙන් තැපැල් ප්රදේශය අනුව බෙදී ඇත.]]
ශ්රී ලාංකික ඕස්ට්රේලියානුවන් ඔස්ට්රේලියාවේ 10 වැනි විශාලතම ජනවාර්ගික කණ්ඩායම වන අතර ඔවුන් සංඛ්යාව 86,412 කි. [[මෙල්බන්|මෙල්බර්න්]] නගරයේ ශ්රී ලාංකික ඕස්ට්රේලියානුවන්ගෙන් අඩකටත් වඩා අඩු ප්රමාණයක් ඇත. [[නිව් සවුත් වේල්ස්]] සහ [[වික්ටෝරියා (ඕස්ට්රේලියාව)|වික්ටෝරියා]] වලින් පිටත ජීවත් වන්නේ 20% කට වඩා අඩු ප්රමාණයක්.
දෙවන පරම්පරාව ඇතුළුව 1996 දී ගණන් කරන ලද ශ්රී ලාංකික ඕස්ට්රේලියානුවන් සංඛ්යාව 64,068 කි. 2011 සංගණනයට අනුව ඕස්ට්රේලියාවේ උපන් ශ්රී ලාංකිකයන් 86,412 ක් වාර්තා වී ඇත.
ශ්රී ලාංකික ඕස්ට්රේලියානුවන් අතර උකහා ගැනීමේ අනුපාතය තරමක් ඉහළ ය: දෙවන පරම්පරාවේ සංක්රමණිකයන් අතර, 'විවාහය තුළ' අනුපාතය අතිශයින් අඩු විය - මනාලියන් සඳහා 5.6% සහ මනාලයන් සඳහා 3.0%.
සිංහල ඕස්ට්රේලියානුවන් ශ්රී ලංකාවට ආපසු සංක්රමණය වීමේ ඉතා අඩු අනුපාතයක් ඇත. 2001 දෙසැම්බරයේදී විදේශ කටයුතු දෙපාර්තමේන්තුව ඇස්තමේන්තු කළේ ශ්රී ලංකාවේ ඕස්ට්රේලියානු පුරවැසියන් 800ක් පදිංචිව සිටින බවයි. මොවුන් ඕස්ට්රේලියානු පුරවැසිභාවය ඇති ශ්රී ලාංකික සංක්රමණිකයන්, ඔවුන්ගේ ශ්රී ලාංකික ඕස්ට්රේලියානු දරුවන් හෝ වෙනත් ඕස්ට්රේලියානුවන් ව්යාපාර සඳහා පැමිණ සිටියේද නැතහොත් වෙනත් හේතුවක් නිසාද යන්න පැහැදිලි නැත.
2011 සංගණනයේදී ඔස්ට්රේලියාවේ දෙමළ ජනයා 19,426ක් විය. ශ්රී ලංකාවේ උපත ලද දෙමළ ජනතාවගෙන් බහුතරයක් ඕස්ට්රේලියාවට පැමිණියේ 1983 න් පසු ශ්රී ලංකාව වාර්ගික කැලඹීමට සහ නොසන්සුන්තාවයට ([[කළු ජූලිය|කළු ජූලියට]]) මුහුණ දුන් අවස්ථාවේදීය. සිඩ්නි හි බටහිර තදාසන්න ප්රදේශ සහ මෙල්බර්න් හි අග්නිදිග තදාසන්න ප්රදේශවල දෙමළ කතා කරන ජනතාව සාපේක්ෂව ඉහළ සංඛ්යාවක් සිටිති. 2016 සංගණනයට අනුව දෙමළ කතා කරන 73161 ක් සිටි.<ref>{{උපන්යාස වෙබ් |title=ஆஸ்திரேலியாவின் எந்த suburb-இல் தமிழர்கள் அதிகமாக வாழ்கின்றனர்? {{!}} SBS Your Language |url=http://www.sbs.com.au/yourlanguage/tamil/ta/article/2017/07/15/aastireeliyaavinnn-ent-suburb-il-tmilllrkll-atikmaak-vaalllkinnnrrnnnr?language=ta |url-status=dead |archive-url=https://web.archive.org/web/20170809033308/http://www.sbs.com.au/yourlanguage/tamil/ta/article/2017/07/15/aastireeliyaavinnn-ent-suburb-il-tmilllrkll-atikmaak-vaalllkinnnrrnnnr?language=ta |archive-date=2017-08-09 |website=www.sbs.com.au}}</ref> වැඩිවන ශ්රී ලාංකීය දෙමළ ජනගහනයට සරිලන පරිදි සියලුම ප්රධාන නගරවල දෙමළ පාසල් සහ හින්දු කෝවිල් රාශියක් පිහිටුවා ඇත.
{| class="wikitable" border="1" style="text-align:right;"
|+'''භාෂාව සහ සම්භවය අනුව 2011 සංගණනය විශ්ලේෂණය'''<ref name="census2011">{{උපන්යාස වෙබ් |title=2011 Census of Population and Housing |url=https://www.censusdata.abs.gov.au/webapi/jsf/login.xhtml |website=Table Builder |publisher=[[Australian Bureau of Statistics]]}}</ref>
! rowspan="2" style="vertical-align:bottom;" |පරම්පරාව
! colspan="6" |භාෂාව (පළමු පරම්පරාව)
! colspan="6" |භාෂාව (දෙවන පරම්පරාව)
|- style="vertical-align:bottom;"
! style="width:50px;" |දෙමළ
! style="width:50px;" |ඉංග්රීසි
! style="width:50px;" |සිංහල
! style="width:50px;" |සඳහන් කර නැත
! style="width:50px;" |වෙනත්
! style="width:50px;" |එකතුව
! style="width:50px;" |දෙමළ
! style="width:50px;" |ඉංග්රීසි
! style="width:50px;" |සිංහල
! style="width:50px;" |සඳහන් කර නැත
! style="width:50px;" |වෙනත්
! style="width:50px;" |එකතුව
|-
| align="left" |දෙමළ
|11,407
|1,057
|85
|58
|149
|'''12,756'''
|650
|257
|16
|13
|48
|'''984'''
|-
| align="left" |ඉන්දියානු දෙමළ
|406
|50
|4
|3
|15
|'''478'''
|21
|12
|0
|0
| -1
|'''32'''
|-
| align="left" |ශ්රී ලාංකික දෙමළ
|4,153
|702
|102
|27
|41
|'''5,025'''
|62
|83
|6
|0
|8
|'''159'''
|- style="font-weight:bold"
| align="left" |උප-එකතුව දෙමළ
|15,966
|1,809
|191
|88
|205
|18,259
|733
|352
|22
|13
|55
|1,175
|-
| align="left" |ඉන්දීය
|20,923
|77,033
|64
|3,204
|249,641
|'''350,865'''
|540
|31,992
|38
|217
|7,246
|'''40,033'''
|-
| align="left" |ශ්රී ලාංකික
|8,534
|23,792
|27,862
|442
|1,551
|'''62,181'''
|300
|11,541
|679
|47
|389
|'''12,956'''
|-
| align="left" |ඕස්ට්රේලියානු
|748
|4,777,283
|684
|24,942
|118,275
|'''4,921,932'''
|82
|2,135,198
|50
|6,458
|34,761
|'''2,176,549'''
|-
| align="left" |සිංහල
|942
|2,351
|16,898
|115
|225
|'''20,531'''
|76
|901
|1,372
|13
|54
|'''2,416'''
|-
| align="left" |ඉංග්රිසි
|862
|7,062,120
|809
|33,676
|125,990
|'''7,223,457'''
|7
|13,136
|8
|107
|1,821
|'''15,079'''
|-
| align="left" |මැලේ
|502
|6,973
|17
|134
|13,230
|'''20,856'''
|91
|9,015
|32
|56
|3,568
|'''12,762'''
|-
| align="left" |සිංගප්පූරු
|178
|1,930
|0
|123
|1,302
|'''3,533'''
|25
|2,083
|0
|13
|498
|'''2,619'''
|-
| align="left" |සඳහන් කර නැත
|856
|391,451
|913
|979,843
|102,167
|'''1,475,230'''
|47,984
|10,434,941
|45,710
|1,060,759
|3,465,645
|'''15,055,039'''
|-
| align="left" |වෙනත්
|640
|4,164,549
|754
|42,924
|3,202,008
|'''7,410,875'''
|313
|3,870,132
|281
|17,808
|300,557
|'''4,189,091'''
|- style="font-weight:bold"
| align="left" |එකතුව
|50,151
|16,509,291
|48,192
|1,085,491
|3,814,594
|21,507,719
|50,151
|16,509,291
|48,192
|1,085,491
|3,814,594
|21,507,719
|}
=== භාෂාව ===
2006 දී ඔස්ට්රේලියානුවන් 29,055 ක් ගෙදර සිංහල කතා කළෝය.<ref>{{උපන්යාස වෙබ් |title=2006 Census - Australia - Language |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/ViewData?action=404&documentproductno=0&documenttype=Details&order=1&tabname=Details&areacode=0&issue=2006&producttype=Census%20Tables&javascript=true&textversion=false&navmapdisplayed=true&breadcrumb=POLTD&&collection=Census&period=2006&productlabel=Language%20Spoken%20at%20Home%20%28full%20classification%20list%29%20by%20Sex&producttype=Census%20Tables&method=Place%20of%20Usual%20Residence&topic=Language& |access-date=22 March 2010}}</ref> SBS රේඩියෝව සිංහල භාෂාවෙන් ලබා ගත හැකි අතර, <ref>{{උපන්යාස වෙබ් |title=SBS Schedule |url=http://www.sbs.com.au/schedule/radio |access-date=22 March 2010}}</ref> මෙල්බර්න් රූපවාහිනී නාලිකාව වන චැනල් 31 ''ශ්රී ලාංකේය මෝනිං'' වැඩසටහන මෙහෙයවන අතර එහි සිංහල කොටස් ඇත.<ref>{{උපන්යාස වෙබ් |title=Channel 31 - Sri Lanka Morning Show |url=http://www.c31.org.au/show/our_shows/?show_title=Sri_Lanka_Morning_Show&show_id=190 |access-date=22 March 2010}}</ref>
=== ආගම ===
{{Pie chart|caption=ශ්රී ලාංකික ඕස්ට්රේලියානුවන්ගේ ආගම<ref>[https://culturalatlas.sbs.com.au/sri-lankan-culture/sri-lankan-culture-population-statistics#sri-lankan-culture-population-statistics]</ref>|label1=බෞද්ධ|label2=කතෝලික|label3=හින්දු|label4=වෙනත් ක්රිස්තියානි|label5=ඉස්ලාම්|label6=වෙනත්|value1=45.3|value2=19.4|value3=16.1|value4=3.6|value5=3.3|value6=12.4|color1=Gold|color2=#8888ff|color3=DarkOrange|color4=#444488|color5=Green|color6=White}}2016 දී, ශ්රී ලංකා ඔස්ට්රේලියානු ජනගහනයෙන් 40.8%ක් බෞද්ධයන් ලෙසද, 20.7%ක් [[කතෝලික සභාව|කතෝලිකයින්]] ලෙසද, 18.8%ක් හින්දු භක්තිකයන් ලෙසද, 4.2%ක් ඇංග්ලිකානුවන් ලෙසද, 3.7%ක් අන්යාගමිකයන් ලෙසද හඳුනාගෙන ඇත. <ref>{{උපන්යාස වෙබ් |title=2016 People in Australia who were born in Sri Lanka, Census Country of birth QuickStats {{!}} Australian Bureau of Statistics |url=https://www.abs.gov.au/census/find-census-data/quickstats/2016/7107_0 |access-date=2023-04-11 |website=www.abs.gov.au}}</ref>
ඕස්ට්රේලියාවේ බොහෝ සිංහලයන් [[ථේරවාදය|ථෙරවාදී]] බෞද්ධයන් වන අතර සිංහලයන්ගෙන් සුළු ප්රතිශතයක් ක්රිස්තියානි ආගමේ ශාඛා අනුගමනය කරයි. මෙල්බර්න් හි [[Eastern Suburbs (Melbourne)|නැගෙනහිර තදාසන්න]] ප්රදේශයේ ධම්ම සරණ බෞද්ධ විහාරය ඇතුළුව වික්ටෝරියා, නිව් සවුත් වේල්ස්, ක්වීන්ස්ලන්තය සහ දකුණු ඕස්ට්රේලියාව පුරා ශ්රී ලාංකිකයන් ථෙරවාදී බෞද්ධ විහාරස්ථාන රාශියක් පිහිටුවා ඇත. <ref>{{උපන්යාස වෙබ් |title=Dhamma Sarana Buddhist Temple |url=http://www.hotfrog.com.au/Companies/Dhamma-Sarana-Buddhist-Temple |access-date=22 March 2010}}</ref>
ශ්රී ලාංකික දෙමළ ජනතාවගෙන් බහුතරය හින්දු ය. සිඩ්නි මුරුගන් කෝවිල බටහිර සිඩ්නි හි ඉහළ දෙමළ ජනගහනයේ අවශ්යතා සඳහා ඉදිකරන ලද්දකි. විශාල සිඩ්නි ප්රදේශයේ කුඩා විහාරස්ථාන ඉදිකර ඇත. මෙල්බර්න් නගරයට ගිනිකොන දෙසින් කැරම් ඩවුන්ස් හි පිහිටි ශිව විෂ්ණු කෝවිල ද ශ්රී ලාංකික දෙමළ ජාතිකයන් විසින් ඉදිකරන ලද කෝවිලකි. බටහිර මෙල්බර්න් හි සන්ෂයින් මුරුගන් කෝවිල ද දෙමළ ප්රජාවට පහසුකම් සපයයි. ඇඩිලේඩ්, බ්රිස්බේන්, පර්ත්, ටවුන්ස්විල්, ඩාවින්, කැන්බරා සහ හෝබාර්ට් වැනි අනෙකුත් නගරවල ද හින්දු කෝවිල් ඉදිකර ඇත.
== සංස්කෘතිය ==
ජනප්රිය ලෙස සමරනු ලබන ප්රජා උත්සව අතරට [[ශ්රී ලාංකික නිදහස් ව්යාපාරය|ශ්රී ලංකා නිදහස් දිනය]] (පෙබරවාරි 4) සහ [[සිංහල අලුත් අවුරුද්ද|ශ්රී ලංකා අලුත් අවුරුද්ද]] (අප්රේල් 14) ඇතුළත් වේ. මෙල්බර්න්, හැව්ටන්, බ්රන්ස්වික්, නෝර්ත්කොට්, ග්ලෙන් වේවර්ලි සහ
ඩැන්ඩෙනොං හි ශ්රී ලංකාවේ අවන්හල් සාප්පු සවාරි වල ජනප්රිය අංගයක් බවට පත්වෙමින් පවතින අතර ඕස්ට්රේලියානු මාධ්ය ද සංස්කෘතික වැඩසටහන් විකාශනය කරමින් පුවත්පත්, රූපවාහිනී සහ ගුවන්විදුලි මධ්යස්ථාන සමඟ වර්ධනය වේ. <ref name="Sri Lankans">{{උපන්යාස වෙබ් |title=Sri Lankans |url=http://www.emelbourne.net.au/biogs/EM01419b.htm |access-date=20 August 2011 |publisher=eMelbourne}}</ref>
== ප්රජාව ==
{| class="wikitable" style="float:right; margin-left:.5em; font-size:90%;"
!උප නගර <ref group="N">Areas with a high concentration of Sri Lankans in Australia, according to the 2006 Census.</ref>
! ප්රතිශතයක් ලෙස
ශ්රී ලාංකිකයන්
|-
| පෙන්ඩල් හිල්, නිව් සවුත් වේල්ස්
| 9.4% <ref>{{උපන්යාස වෙබ් |title=2011 Census QuickStats : Pendle Hill (State Suburb) |url=http://www.censusdata.abs.gov.au/census_services/getproduct/census/2011/quickstat/SSC11859?opendocument&navpos=220 |access-date=2014-03-10 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| හෝම්බුෂ්, නිව් සවුත් වේල්ස්
| 8.5% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Homebush (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=homebush&locationSearchTerm=homebush&newarea=SSC11475&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC11475&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| හෝම්බුෂ් බටහිර, නිව් සවුත් වේල්ස්
| 5.4% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Homebush West (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=homebush&locationSearchTerm=homebush&newarea=SSC11479&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC11479&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| එන්ඩෝවර් හිල්ස්, වික්ටෝරියා
| 5.3% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Endeavour Hills (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Endeavour+Hills&locationSearchTerm=Endeavour+Hills&newarea=SSC21257&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21257&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ඩැන්ඩෙනොං, වික්ටෝරියා
| 4.8% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Dandenong (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Dandenong&locationSearchTerm=Dandenong&newarea=SSC21213&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21213&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ස්ට්රැත්ෆීල්ඩ් දකුණ, නිව් සවුත් වේල්ස්
| 4.8% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Strathfield South (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=strathfield&locationSearchTerm=croydon+park&newarea=SSC11951&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC11951&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ලින්බෲක්, වික්ටෝරියා
| 4.5% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Lynbrook (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Lynbrook&locationSearchTerm=Lynbrook&newarea=SSC21415&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21415&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| හලාම්, වික්ටෝරියා
| 4.3% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Hallam (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Hallam&locationSearchTerm=Hallam&newarea=SSC21313&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21313&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ලින්ඩ්හර්ස්ට්, වික්ටෝරියා
| 4.2% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Lyndhurst (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Lyndhurst&locationSearchTerm=Lyndhurst&newarea=SSC21417&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21417&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ඩැන්ඩෙනොං උතුර, වික්ටෝරියා
| 3.7% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Dandenong North (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Dandenong&locationSearchTerm=Dandenong&newarea=SSC21215&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21215&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| හැම්ප්ටන් පාර්ක්, වික්ටෝරියා
| 3.7% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Hampton Park (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Hampton+Park&locationSearchTerm=Hampton+Park&newarea=SSC21319&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21319&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| නොබෙල් පාර්ක්, වික්ටෝරියා
| 3.6% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Noble Park (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Noble+Park&locationSearchTerm=Noble+Park&newarea=SSC21501&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21501&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ග්ලෙන් වේවර්ලි, වික්ටෝරියා
| 3.6% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Glen Waverley (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Glen+Waverley&locationSearchTerm=Glen+Waverley&newarea=SSC21301&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21301&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ක්ලේටන් දකුණ, වික්ටෝරියා
| 3.4% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Clayton South (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Clayton&locationSearchTerm=Clayton&newarea=SSC21175&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21175&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ක්ලේටන්, වික්ටෝරියා
| 3.3% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Clayton (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Clayton&locationSearchTerm=Clayton&newarea=SSC21173&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21173&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ඕක්ලී නැගෙනහිර, වික්ටෝරියා
| 3.2% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Oakleigh East (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Oakleigh&locationSearchTerm=Oakleigh&newarea=SSC21519&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21519&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| කීස්බරෝ, වික්ටෝරියා
| 3.1% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Keysborough (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=Keysborough&locationSearchTerm=Keysborough&newarea=SSC21385&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC21385&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|-
| ලිඩ්කොම්බ්, නිව් සවුත් වේල්ස්
| 3.1% <ref>{{උපන්යාස වෙබ් |title=2006 Census QuickStats : Lidcombe (State Suburb) |url=http://www.censusdata.abs.gov.au/ABSNavigation/prenav/LocationSearch?locationLastSearchTerm=lidcombe&locationSearchTerm=lidcombe&newarea=SSC11589&submitbutton=View+QuickStats+%3E&mapdisplay=on&collection=Census&period=2006&areacode=SSC11589&geography=&method=Place+of+Usual+Residence&productlabel=&producttype=QuickStats&topic=&navmapdisplayed=true&javascript=true&breadcrumb=PL&topholder=0&leftholder=0¤taction=104&action=401&textversion=false&subaction=1 |access-date=2013-07-27 |publisher=Censusdata.abs.gov.au}}</ref>
|}
=== ඕස්ට්රේලියාව ===
; සිද්ධීන්
* ලංකන් ෆෙස්ට් - මෙල්බර්න් හි ශ්රී ලාංකීය සංස්කෘතික සංදර්ශනය <ref name="fest">[http://lankanfest.com.au/ Lankan Fest]</ref>
; ආයතන
* [[Global Sri Lankan Forum|ගෝලීය ශ්රී ලංකා සංසදය]]
* Sri Lanka German Technical Training Institute - Old boys Association Australia Inc.
* ශ්රී ලංකා අධ්යයන මධ්යස්ථානය තාක්ෂණය සහ සමාජ සුබසාධන ආයතනය (SCATS), ඕස්ට්රේලියාව (1992) <ref>{{උපන්යාස වෙබ් |title=SCATS: One of the oldest Sri Lankan community organisations in Melbourne, celebrating of its 25th year anniversary |url=https://www.sbs.com.au/yourlanguage/sinhalese/en/audiotrack/scats-one-oldest-sri-lankan-community-organisations-melbourne-celebrating-its-25th-year}}</ref>
* ඕස්ට්රේලියානු ශ්රී ලංකා කවුන්සිලය (1994)
* ශ්රී ලංකාව සඳහා කමිටුව (1993)
* ශ්රී ලංකා පොදුජන පෙරමුණ Australia Inc.
* බහු සංස්කෘතික මානව බලය සංස්ථාපිත
* එක්සත් ශ්රී ලංකා මුස්ලිම් සංගමය <ref>{{උපන්යාස වෙබ් |title=usmaa.org.au |url=http://www.usmaa.org.au/ |access-date=2013-07-27 |publisher=usmaa.org.au}}</ref> (1990)
; වෙබ් අඩවි
* TamilAustralian.com
* srilankadirectory.com.au
* ozsrilanka.com.au
* ausnewslanka.com
* lankacube.com
* ozlanka.com
=== කැන්බරා ===
* කැන්බරා ශ්රී ලංකා ධර්ම විහාර සංගමය <ref>{{උපන්යාස වෙබ් |title=The Sri Lanka Dhamma Vihara Association of Canberra(SLDVAC) Inc |url=http://www.dhammavihara.org.au/index.html |access-date=2013-07-27 |publisher=Dhammavihara.org.au}}</ref>
* ලංකන්ස් කැන්බරා පදනම
* ශ්රී ලංකා මහ කොමසාරිස් කාර්යාල
* කැන්බරා සිංහල සංස්කෘතික සංගමය
=== නිව් සවුත් වේල්ස් ===
; ආයතන
* ඔස්ට්රා-ලංකා මුස්ලිම් සංගමය (ALMA) <ref>{{උපන්යාස වෙබ් |title=alma.org.au |url=http://www.alma.org.au |access-date=2013-07-27 |publisher=alma.org.au}}</ref>
* NSW හි සිංහල සංගමය
* NSW හි සිංහල සංස්කෘතික සංසදය
* ශ්රී ලංකා ඕස්ට්රේලියානු මැලේ සංගමය (SLAMA)
* NSW හි ශ්රී ලංකා සංගමය
* කොළඹ විශ්ව විද්යාලයේ ආදි ශිෂ්ය සංගමය NSW Inc.
; ගුවන් විදුලි
* SBS රේඩියෝ 2 (සිඩ්නි 97.7 fm) <ref name="ReferenceA">{{උපන්යාස වෙබ් |title=SBS Radio - Sinhalese |url=http://radio.sbs.com.au/language.php?language=Sinhalese |archive-url=https://web.archive.org/web/20091001221704/http://radio.sbs.com.au/language.php?language=Sinhalese |archive-date=1 October 2009 |website=radio.sbs.com.au}}</ref>
* SBS රේඩියෝ 2 (වොලොංගොන්ග් 1035 පෙ.ව.) <ref name="ReferenceA" />
=== වික්ටෝරියා ===
; සිද්ධීන්
* ලංකන් ෆෙස්ට් - මෙල්බර්න් හි ශ්රී ලාංකීය සංස්කෘතික සංදර්ශනය <ref name="fest"/>
; ආයතන
* ඕස්ට්රේලියාවේ ශ්රී ලාංකික මුස්ලිම්වරුන්ගේ සංගමය (ASLAMA)
* වික්ටෝරියා කළු සහ රන් - ඩී.එස්.සේනානායක විද්යාලයීය ආදි ශිෂ්ය සංගමය <ref>[http://myblackandgold.org/ Black & Gold of Victoria - D.S. Senanayake College Old Boys Association]</ref>
* ඔස්ට්රේලියාවේ ජනවාර්ගික ප්රජාවන්ගේ කවුන්සිල සම්මේලනය
* යහපත් එඬේරාගේ කන්යාරාමය කොළඹ ආදි ශිෂ්ය සංගමය <ref>{{Citation |title=Good Shepherd Convent Colombo Past Pupils' Association |url=http://www.goodshepherdconventkotahena.com/PPA.html |access-date=2023-05-04 |archive-date=2023-01-27 |archive-url=https://web.archive.org/web/20230127113747/https://goodshepherdconventkotahena.com/ppa.html }}</ref>
* කැතරින් කීගල් ළමා අරමුදල (KKCF) <ref>[http://www.kkcf.org/ Katherine Keegel Children's Fund (KKCF)]</ref>
* උතුරු මෙල්බර්න් ශ්රී ලංකා ජ්යෙෂ්ඨ සංගමය Inc. <ref>{{උපන්යාස වෙබ් |title=Sri Lankan - Northern Melbourne Sri Lankan Senior's Association Inc. - - - Community Directory - City of Whittlesea |url=https://directory.whittlesea.vic.gov.au/seniors-and-aged/senior-citizen-clubs/sri-lankan-northern-melbourne-sri-lankan-seniors-association-inc.aspx}}</ref>
* රාජකීය විද්යාලයේ ආදි ශිෂ්ය සංගමය <ref>{{Citation |title=Royal College Old Boys Association |url=http://www.rcobaa.org.au/ |access-date=2023-05-04 |archive-date=2024-05-14 |archive-url=https://web.archive.org/web/20240514035256/https://www.rcobaa.org.au/ }}</ref>
* Sydney හි Nalandians - Nalanda College Old Boys Association, Sydney, Australia (NIS) <ref>[http://nalanda.com.au/ Nalanda College Old Boys Association, Sydney, Australia]</ref>
* නාලන්දා විද්යාලයීය ආදි ශිෂ්ය සංගමය, මෙල්බර්න්, ඕස්ට්රේලියාව <ref>{{Citation |title=OLD NALANDIANS ASSOCIATION OF AUSTRALIA (ONAA, Melbourne |url=http://www.nalandaoba.org.au/ |access-date=2023-05-04 |archive-date=2021-04-10 |archive-url=https://web.archive.org/web/20210410154310/http://www.nalandaoba.org.au/ }}</ref>
* නාලන්දා විද්යාලයීය ආදි ශිෂ්ය සංගමය, ක්වීන්ස්ලන්තය, ඕස්ට්රේලියාව <ref>{{Citation |title=Nalanda Old Boys Association Queensland Inc |url=https://nalandaobaqueensland.org/about/ |access-date=2023-05-04 |archive-date=2019-06-27 |archive-url=https://web.archive.org/web/20190627111535/https://nalandaobaqueensland.org/about/ }}</ref>
* නාලන්දා විද්යාලයීය ආදි ශිෂ්ය සංගමය, පර්ත්, ඕස්ට්රේලියාව <ref>[https://www.facebook.com/onaofwa/?_rdc=2&_rdr Old Nalandians Association of Western Australia Inc]</ref>
* සිංහල සංස්කෘතික හා ප්රජා සේවා පදනම
* ශ්රී ලංකාව සඳහා සාමය සමගිය සහ මානව හිමිකම් සඳහා වූ සංගමය (SPUR)
* වික්ටෝරියා ශ්රී ලංකා සංගමය (කලින් ඕස්ට්රේලියාවේ ලංකා සමාජය)
* තාක්ෂණය සහ සමාජ සුබසාධන ප්රවර්ධනය සඳහා වූ ශ්රී ලංකා අධ්යයන මධ්යස්ථානය
* ශාන්ත ජෝසප් විද්යාලයීය ආදි ශිෂ්ය සංගමය, <ref>[http://www.oldjoesaust.com.au/ St. Joseph's College Old Boys Union]</ref> ඕස්ට්රේලියාවේ ශ්රී ලාංකික පාසලක් පදනම් කරගත් විශාලතම ආදි ශිෂ්ය සංගමය
* ත්රිත්ව විද්යාලයීය ආදි ශිෂ්ය සංගමය
* ඕස්ට්රේලියාවේ එක්සත් ශ්රී ලංකා මුස්ලිම් සංගමය (USMAA) <ref>{{උපන්යාස වෙබ් |title=usmaa.org.au |url=http://www.usmaa.org.au |access-date=2013-07-27 |publisher=usmaa.org.au}}</ref>
* Maris Stella College OBA Melbourne ශාඛාව
* විශාඛා විද්යාලය ආදි ශිෂ්ය සංගමය (VVPPA)
* කැලණිය විශ්වවිද්යාලයේ ආදි ශිෂ්ය සංගමය ඕස්ට්රේලියාව
* අනුලා විද්යාලය වික්ටෝරියා ආදි ශිෂ්ය සංගමය (AVPPAV)
* ශාන්ත බෙනඩික්ට් විද්යාලයේ ආදි ශිෂ්ය සංගමය
=== දකුණු ඕස්ට්රේලියාව (ඇඩිලේඩ්) ===
; ආයතන
* ඇඩිලේඩ් ශ්රී ලංකා බෞද්ධ විහාරය <ref>[http://www.asbvihara.com.au/ Adelaide Sri Lanka Buddhist Vihara]</ref>
* ඇඩිලේඩ් ශ්රී ලංකා ප්රජාව <ref>{{Citation |title=Adelaide Sri Lankan Community |url=http://adelaidesrilankan.com/ |access-date=2023-05-04 |archive-date=2014-09-11 |archive-url=https://web.archive.org/web/20140911114541/http://adelaidesrilankan.com/ }}</ref>
{{Col-begin}}
{{Col-break}}
;Newspapers
* ''[[Hiru Kirana]]'' ([[Sinhala language|Sinhala]])
* ''[[Pahana (Newspaper)|Pahana]]'' (Sinhala)
* ''[[Sannasa]]'' (Sinhala)
{{Col-break}}
;TV
* ''[[One World Sri Lanka]]'' ([[Channel 31 (Australia)|Channel 31]])
* ''[[Sri Lanka Clip Show]]'' (Channel 31)
* ''[[Sri Lanka Morning Show]]'' (Channel 31)
* ''[[Sri Lanka Today]]'' (Channel 31)
* ''[[TV Sri Lanka]]'' (Channel 31)
{{Col-break}}
;Radio
* [[SBS Radio|SBS Radio 2]] (93.1 fm)
{{Col-end}}
=== බටහිර ඕස්ට්රේලියාව ===
; ආයතන
* AusLanka Charity Foundation
* ශ්රී ලංකා ඕස්ට්රේලියානු තරුණ සංගමය <ref>{{Citation |title=Sri Lankan Australian Youth Association |url=http://slaya.org.au/ |access-date=2023-05-04 |archive-date=2023-04-13 |archive-url=https://web.archive.org/web/20230413142217/http://slaya.org.au/ }}</ref>
* ශ්රී ලංකා බෞද්ධ විහාරය පර්ත් බටහිර ඕස්ට්රේලියාව <ref>{{Citation |title=Sri Lanka Buddhist Vihara Perth Western Australia |url=http://srilankanvihara.org.au/ |access-date=2023-05-04 |archive-date=2023-04-18 |archive-url=https://web.archive.org/web/20230418051032/http://srilankanvihara.org.au/ }}</ref>
* බටහිර ඕස්ට්රේලියාවේ ශ්රී ලංකා සංස්කෘතික සංගමය
* බටහිර ඕස්ට්රේලියාවේ ශ්රී ලංකා මුස්ලිම් සංගමය Inc. <ref>{{Citation |title=Sri Lankan Muslim Society of Western Australia Inc. |url=http://www.slmswa.org/ |access-date=2023-05-04 |archive-date=2021-10-21 |archive-url=https://web.archive.org/web/20211021154408/http://slmswa.org/ }}</ref>
=== උතුරු ප්රදේශය ===
* NT බෞද්ධ සංගමය <ref>{{Citation |title=The Buddhist Society of the N.T. |url=http://www.ntbuddhist.org.au/index.html |access-date=2023-05-04 |archive-date=2021-08-16 |archive-url=https://web.archive.org/web/20210816015520/http://www.ntbuddhist.org.au/index.html }}</ref>
* ශ්රී ලංකා ඕස්ට්රේලියානු මිත්රත්ව සංගමය <ref>{{Citation |title=Sri Lanka Australia Friendship Association |url=http://www.slafa.org.au/ |access-date=2023-05-04 |archive-date=2020-09-22 |archive-url=https://web.archive.org/web/20200922203545/http://www.slafa.org.au/ }}</ref>
== මේකත් බලන්න ==
* [[ඕස්ට්රේලියා–ශ්රී ලංකා සබඳතා|ඔස්ට්රේලියාව - ශ්රී ලංකා සබඳතා]]
* [[කොළඹ ක්රමය|කොළඹ සැලැස්ම]]
* දෙමළ ඕස්ට්රේලියානුවන්
== සටහන් ==
<references group="N" responsive="1"></references>
== යොමු කිරීම් ==
<references group="" responsive="0"></references>
== තවදුරටත් කියවීම ==
ඕස්ට්රේලියාවේ සිටින ශ්රී ලාංකිකයන් පිළිබඳ තොරතුරු පහත ප්රකාශනවලින් ලබාගත හැක.
* ගමගේ, එස්. 'සංස්කෘතිය, ජනවාර්ගිකත්වය සහ පන්තියේ තිර: ඕස්ට්රේලියාවේ ශ්රී ලාංකික ප්රජාවේ සංයුතිය වෙනස් කිරීම, අන්තර් සංස්කෘතික අධ්යයන සඟරාව, vol 19(1), 1998,pp. 37-56.
* ගමගේ, එස්. 2001. ඕස්ට්රේලියාවේ සිංහලයන්, ඕස්ට්රේලියානු ජනතාව තුළ - ජාතිය, එහි ජනතාව සහ ඔවුන්ගේ මූලාරම්භය පිළිබඳ විශ්වකෝෂය (සංස්කරණය) ජේම්ස් ජප්, 2 වන සංස්කරණය, කේම්බ්රිජ් විශ්වවිද්යාල මුද්රණාලය, කේම්බ්රිජ්, pp, 684–685.
* ගමගේ, එස්. 2002. බහු සංස්කෘතික සහ ඇංග්ලෝ-අනුකූලතාවයේ සන්දර්භය තුළ ඕස්ට්රේලියාවේ සිටින ශ්රී ලාංකික සංක්රමණිකයන් සහ ඔවුන්ගේ දරුවන්ගේ අනුවර්තන අත්දැකීම්, Annette Richardson සහ Michael Wyness (eds) හි සංස්කෘතික ඉදිරිදර්ශන ගවේෂණය කිරීම: ඒකාබද්ධ කිරීම සහ ගෝලීයකරණය, ජාත්යන්තර සංස්කෘතික පර්යේෂණ ජාලය (ICRN) . 3-29.
* ගමගේ, එස්. 2014. ඕස්ට්රේලියාවේ ශ්රී ලාංකිකයන්ගේ ජීවිතය: අනන්යතාවය, ජීවන රටාව සහ සංස්කෘතීන් දෙකක් අතර ජීවත්වීමේ උභතෝකෝටික, දිවයින (2014.01.29), කොළඹ.
* රීව්ස්, පී. 2014. The Encyclopedia of the Sri Lankan Diaspora, Editions Diier Millet Pty Ltd. සිංගප්පූරුව.
== බාහිර සබැඳි ==
* [https://books.google.com/books?id=yTKFBXfCI1QC&dq=sinhalese+australia&pg=PA684 ඕස්ට්රේලියානු ජනතාව]
* [https://web.archive.org/web/20091207165818/http://www.spur.asn.au/extra/MR_Election_2007_16112007.htm ශ්රී ලාංකික ඕස්ට්රේලියානුවන් ඕස්ට්රේලියාවේ විසිර යාම]
* [https://web.archive.org/web/20110728024854/http://sinhalaheritage.org/First_Ceylonese_family_to_Australia.html පළමු ලංකා පවුල ඕස්ට්රේලියාවට]
* [https://web.archive.org/web/20110719235936/http://tormel.brinkster.net/sl_comm/sl_comm.html DIMIA - ප්රජා තොරතුරු සාරාංශය]
* [https://web.archive.org/web/20110715031629/http://www.ozlanka.com/guides/srilanka-born.htm ශ්රී ලංකාවේ උපන් ප්රජාව]
* [https://web.archive.org/web/20101231074602/http://www.miceastmelb.com.au/documents/pdaproject/CulturalProfiles/SriLankanCulturalProfile2010.pdf ශ්රී ලාංකේය සංස්කෘතික පැතිකඩ]
[[ප්රවර්ගය:Pages with unreviewed translations]]
kxwzg36cst4i5uuk3i06nz4pqmbzeow
Module:Params
828
115573
796325
795902
2026-07-23T13:45:15Z
Grufo
64169
Update from [[d:Special:GoToLinkedPage/mediawikiwiki/Q122696746|master]] using [[mw:Synchronizer| #Synchronizer]]
796325
Scribunto
text/plain
require[[strict]]
--- ---
--- PRIVATE ENVIRONMENT ---
--- ________________________________ ---
--- ---
--[[ Abstract utilities ]]--
----------------------------
-- Helper function for `string.gsub()` (for managing zero-padded numbers)
local function zero_padded (str)
return ('%03d%s'):format(#str, str)
end
-- Helper function for `table.sort()` (for natural sorting)
local function natural_sort (var1, var2)
return var1:gsub('%d+', zero_padded) < var2:gsub('%d+', zero_padded)
end
-- Return a copy or a reference to a table
local function copy_or_ref_table (src, refonly)
if refonly then return src end
local newtab = {}
for key, val in pairs(src) do newtab[key] = val end
return newtab
end
-- Copy at most N items (of all kinds) from `src` to `dest` and return `dest`
local function copy_table_maxn (dest, src, len)
local idx = 1
for key, val in pairs(src) do
dest[key], idx = val, idx + 1
if idx > len then break end
end
return dest
end
-- Remove some numeric elements from a table, shifting everything to the left
local function remove_numeric_keys (tbl, idx, len)
local cache, tmp = {}, idx + len - 1
for key, val in pairs(tbl) do
if type(key) == 'number' and key >= idx then
if key > tmp then cache[key - len] = val end
tbl[key] = nil
end
end
for key, val in pairs(cache) do tbl[key] = val end
end
-- Make a reduced copy of a table (shifting in both directions if necessary)
local function copy_table_reduced (tbl, idx, len)
local ret, tmp = {}, idx + len - 1
if idx > 0 then
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key < idx then
ret[key] = val
elseif key > tmp then ret[key - len] = val end
end
elseif tmp > 0 then
local nshift = 1 - idx
for key, val in pairs(tbl) do
if type(key) ~= 'number' then ret[key] = val
elseif key > tmp then ret[key - tmp] = val
elseif key < idx then ret[key + nshift] = val end
end
else
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key > tmp then
ret[key] = val
elseif key < idx then ret[key + len] = val end
end
end
return ret
end
-- Make an expanded copy of a table (shifting in both directions if necessary)
local function copy_table_expanded (tbl, idx, len)
local ret, tmp = {}, idx + len - 1
if idx > 0 then
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key < idx then
ret[key] = val
else ret[key + len] = val end
end
elseif tmp > 0 then
local nshift = idx - 1
for key, val in pairs(tbl) do
if type(key) ~= 'number' then ret[key] = val
elseif key > 0 then ret[key + tmp] = val
elseif key < 1 then ret[key + nshift] = val end
end
else
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key > tmp then
ret[key] = val
else ret[key - len] = val end
end
end
return ret
end
-- Given a table, create two new tables containing the sorted list of keys
local function get_key_list_sorted (tbl, sort_fn)
local nums, words, nn, nw = {}, {}, 0, 0
for key, val in pairs(tbl) do
if type(key) == 'number' then
nn = nn + 1
nums[nn] = key
else
nw = nw + 1
words[nw] = key
end
end
table.sort(nums)
table.sort(words, sort_fn)
return nums, words, nn, nw
end
-- Parse a parameter name string and return it as a string or a number
local function get_parameter_name (par_str)
local ret = par_str:match'^%s*(.-)%s*$'
if ret ~= '0' and ret:find'^%-?[1-9]%d*$' == nil then return ret end
return tonumber(ret)
end
-- Move a key from a table to another, but only if under a different name and
-- always parsing numeric strings as numbers
local function steal_if_renamed (val, src, skey, dest, dkey)
local realkey = get_parameter_name(dkey)
if skey ~= realkey then dest[realkey], src[skey] = val, nil end
end
--[[ Public strings ]]--
------------------------
-- Special match keywords (functions and modifiers MUST avoid these names)
local mkeywords = {
['or'] = 0,
pattern = 1,
plain = 2,
strict = 3
}
-- Sort functions (functions and modifiers MUST avoid these names)
local sortfunctions = {
alphabetically = false,
naturally = natural_sort
}
-- Callback styles for the `mapping_*` and `renaming_*` class of modifiers
-- (functions and modifiers MUST avoid these names)
--[[
Meanings of the columns:
col[1] = Loop type (0-3)
col[2] = Number of module arguments that the style requires (1-3)
col[3] = Minimum number of sequential parameters passed to the callback
col[4] = Name of the callback parameter where to place each parameter name
col[5] = Name of the callback parameter where to place each parameter value
col[6] = Argument in the modifier's invocation that will override `col[4]`
col[7] = Argument in the modifier's invocation that will override `col[5]`
A value of `-1` indicates that no meaningful value is stored (i.e. `nil`)
]]--
local mapping_styles = {
names_and_values = { 3, 2, 2, 1, 2, -1, -1 },
values_and_names = { 3, 2, 2, 2, 1, -1, -1 },
values_only = { 1, 2, 1, -1, 1, -1, -1 },
names_only = { 2, 2, 1, 1, -1, -1, -1 },
names_and_values_as = { 3, 4, 0, -1, -1, 2, 3 },
names_only_as = { 2, 3, 0, -1, -1, 2, -1 },
values_only_as = { 1, 3, 0, -1, -1, -1, 2 },
blindly = { 0, 2, 0, -1, -1, -1, -1 }
}
-- Memory slots (functions and modifiers MUST avoid these names)
local memoryslots = {
h = 'header',
f = 'footer',
i = 'itersep',
l = 'lastsep',
n = 'ifngiven',
p = 'pairsep',
s = 'oxfordsep'
}
-- Possible trimming modes for the `parsing` modifier
local trim_parse_opts = {
trim_none = { false, false },
trim_positional = { false, true },
trim_named = { true, false },
trim_all = { true, true }
}
-- Possible string modes for the iteration separator in the `parsing` and
-- `reinterpreting` modifiers
local isep_parse_opts = {
splitter_pattern = false,
splitter_string = true
}
-- Possible string modes for the key-value separator in the `parsing` and
-- `reinterpreting` modifiers
local psep_parse_opts = {
setter_pattern = false,
setter_string = true
}
-- Possible position references for the `splicing` modifier
local position_references = {
add_nothing = 0,
add_smallest_number = 1,
add_last_of_sequence = 2,
add_largest_number = 3
}
-- Possible modes for the `reassigning` modifier
local a_modes = {
transfer = 0,
clone = 1,
rename = 2,
copy = 3,
sacrifice = 4,
provide = 5,
spare = 7
}
-- Functions and modifiers MUST avoid these names too: `here`, `in_substack`,
-- `let`, `expose`, `use`, `with_flushed_glue`, `without_flushed_glue`
-- `without_sorting`
--[[ Private constants ]]--
---------------------------
-- Hard-coded name of the module (to avoid going through `frame:getTitle()`)
local modulename = 'Module:Params'
-- The functions listed here declare that they don't need the `frame.args`
-- metatable to be copied into a regular table; if they are modifiers they also
-- guarantee that they will make their own (modified) copy available
local refpipe = {
call_for_each_group = true,
--coins = true,
count = true,
evaluating = true,
for_each = true,
list = true,
list_values = true,
list_maybe_with_names = true,
value_of = true
}
-- The functions listed here declare that they don't need the
-- `frame:getParent().args` metatable to be copied into a regular table; if
-- they are modifiers they also guarantee that they will make their own
-- (modified) copy available
local refparams = {
call_for_each_group = true,
combining = true,
combining_by_calling = true,
combining_values = true,
concat_and_call = true,
concat_and_invoke = true,
concat_and_magic = true,
count = true,
grouping_by_calling = true,
mixing_names_and_values = true,
keeping_at_most = true,
renaming_by_mixing = true,
renaming_to_sequence = true,
renaming_to_uppercase = true,
renaming_to_lowercase = true,
--renaming_to_values = true,
shifting = true,
splicing = true,
--swapping_names_and_values = true,
value_of = true,
with_name_matching = true
}
-- Maximum number of numeric parameters that can be filled, if missing (we
-- chose an arbitrary number for this constant; you can discuss about its
-- optimal value at Module talk:Params)
local maxfill = 1024
-- The private table of functions
local library = {}
-- Functions and modifiers that can only be invoked in first position
local static_iface = {}
--[[ Private functions ]]--
---------------------------
-- Create a new context
local function context_new (child_frame)
local main_frame = child_frame:getParent()
return {
frame = main_frame,
opipe = child_frame.args,
oparams = main_frame.args,
firstposonly = static_iface,
iterfunc = pairs,
sorttype = 0,
n_parents = 0,
n_children = 0,
n_available = maxfill
}
end
-- Move to the next action within the user-given list
local function context_iterate (ctx, n_forward)
local nextfn
if ctx.pipe[n_forward] ~= nil then
nextfn = ctx.pipe[n_forward]:match'^%s*(.*%S)'
end
if nextfn == nil then error(modulename ..
': You must specify a function to call', 0) end
if library[nextfn] == nil then
if ctx.firstposonly[nextfn] == nil then error(modulename ..
': The function ‘' .. nextfn .. '’ does not exist', 0)
else error(modulename .. ': The ‘' .. nextfn ..
'’ directive can only appear in first position', 0)
end
end
remove_numeric_keys(ctx.pipe, 1, n_forward)
return library[nextfn]
end
-- Main loop
local function main_loop (ctx, start_with)
local fn = start_with
repeat fn = fn(ctx) until not fn
if ctx.n_parents > 0 then error(modulename ..
': One or more ‘merging_substack’ directives are missing', 0) end
if ctx.n_children > 0 then error(modulename ..
', For some of the snapshots either the ‘flushing’ directive is missing or a group has not been properly closed with ‘merging_substack’', 0) end
end
-- Load a `setting`-like directive string into the `dest` table
local function set_strings_from_opts (dest, opts, start_from)
local cmd
if opts[start_from] == nil then return start_from - 1 end
cmd = opts[start_from]:gsub('%s+', ''):gsub('/+', '/')
:match'^/*(.*[^/])'
if cmd == nil then return start_from end
local vname, chr
local amap, sep, argc = {}, string.byte('/'), start_from + 1
for idx = 1, #cmd do
chr = cmd:byte(idx)
if chr == sep then
for key, val in ipairs(amap) do
dest[val], amap[key] = opts[argc], nil
end
argc = argc + 1
else
vname = memoryslots[string.char(chr)]
if vname == nil then error(modulename ..
', ‘setting’: Unknown slot ‘' ..
string.char(chr) .. '’', 0) end
table.insert(amap, vname)
end
end
for key, val in ipairs(amap) do dest[val] = opts[argc] end
return argc
end
-- Add a new stack of parameters to `ctx.children`
local function new_substack (ctx)
local currsnap, newparams = ctx.n_children + 1, {}
if ctx.children == nil then ctx.children = { newparams }
else ctx.children[currsnap] = newparams end
ctx.n_children = currsnap
return newparams
end
-- Parse a raw argument containing a `sortfunctions` directive, or
-- `'without_sorting'`, or `nil`
local function load_sort_opt (raw_arg)
if raw_arg == nil then return nil, 1, false end
local trarg = raw_arg:match'^%s*(.-)%s*$'
if trarg == 'without_sorting' then return nil, 2, false, trarg end
local tmp = sortfunctions[trarg]
if tmp == nil then return nil, 1, false, trarg end
return tmp or nil, 2, true, trarg
end
-- Parse optional user arguments of type `...|[let/use]|[...]|[let/use]|[...]|
-- [number of additional parameters]|[parameter 1]|[parameter 2]|[...]`
local function load_child_opts (src, start_from, append_after, params)
local tnamed, tmp1, tmp2
local pin, tbl, mem = start_from, {}, {}
while src[pin] ~= nil and src[pin + 1] ~= nil do
tmp1 = src[pin]:match'^%s*(.*%S)'
if tmp1 == 'let' and src[pin + 2] ~= nil then
tmp1 = get_parameter_name(src[pin + 1])
mem[tmp1], tbl[tmp1], pin = nil, src[pin + 2], pin + 3
--[[
elseif tmp1 == 'expose' then
tmp1 = get_parameter_name(src[pin + 1])
tmp2 = params[tmp1]
mem[tmp1], tbl[tmp1], pin = tmp2, tmp2, pin + 2
]]--
elseif tmp1 == 'use' and src[pin + 2] ~= nil then
tmp1 = get_parameter_name(src[pin + 2])
tmp2 = params[tmp1]
mem[tmp1], tbl[get_parameter_name(src[pin + 1])], pin =
tmp2, tmp2, pin + 3
else break end
end
local tnew = copy_or_ref_table(params, next(mem) == nil)
for key in pairs(mem) do tnew[key] = nil end
if pin ~= start_from then tnamed, tbl = tbl, {} end
tmp1 = tonumber(src[pin])
if tmp1 ~= nil and math.floor(tmp1) == tmp1 then
if tmp1 < 0 then tmp1 = -1 end
tmp2 = append_after - pin
for idx = pin + 1, pin + tmp1 do tbl[idx + tmp2] = src[idx] end
pin = pin + tmp1 + 1
end
if tnamed ~= nil then
for key, val in pairs(tnamed) do tbl[key] = val end
end
return tbl, pin, tnew, mem
end
-- Load the optional arguments of some of the `mapping_*` and `renaming_*`
-- class of modifiers
local function load_callback_opts (src, n_skip, default_style, params)
local style, shf
local tmp = src[n_skip + 1]
if tmp ~= nil then style = mapping_styles[tmp:match'^%s*(.-)%s*$'] end
if style == nil then style, shf = default_style, n_skip - 1
else shf = n_skip end
local n_exist, karg, varg = style[3], style[4], style[5]
tmp = style[6]
if tmp > -1 then
karg = src[tmp + shf]:match'^%s*(.-)%s*$'
if karg == '0' or karg:find'^%-?[1-9]%d*$' ~= nil then
karg = tonumber(karg)
n_exist = math.max(n_exist, karg)
end
end
tmp = style[7]
if tmp > -1 then
varg = src[tmp + shf]:match'^%s*(.-)%s*$'
if varg == '0' or varg:find'^%-?[1-9]%d*$' ~= nil then
varg = tonumber(varg)
n_exist = math.max(n_exist, varg)
end
end
local dest, argc, tnew, mem = load_child_opts(src, style[2] + shf,
n_exist, params)
tmp = style[1]
if (tmp == 3 or tmp == 2) and dest[karg] ~= nil then
tmp = tmp - 2 end
if (tmp == 3 or tmp == 1) and dest[varg] ~= nil then
tmp = tmp - 1 end
return dest, argc, tmp, karg, varg, tnew, mem
end
-- Parse the arguments of some of the `mapping_*` and `renaming_*` class of
-- modifiers
local function load_replace_args (opts, whoami)
if opts[1] == nil then error(modulename ..
', ‘' .. whoami .. '’: No pattern string was given', 0) end
if opts[2] == nil then error(modulename ..
', ‘' .. whoami .. '’: No replacement string was given', 0) end
local ptn, repl, nmax, argc = opts[1], opts[2], tonumber(opts[3]), 3
if nmax ~= nil or (opts[3] or ''):match'^%s*$' ~= nil then argc = 4 end
local flg = opts[argc]
if flg ~= nil then flg = mkeywords[flg:match'^%s*(.-)%s*$'] end
if flg == 0 then flg = nil elseif flg ~= nil then argc = argc + 1 end
return ptn, repl, nmax, flg, argc, (nmax ~= nil and nmax < 1) or
(flg == 3 and ptn == repl)
end
-- Parse the arguments of the `with_*_matching` class of modifiers
local function load_pattern_args (opts, whoami)
local keyw
local ptns, state, nptns, cnt = {}, 0, 0, 1
for _, val in ipairs(opts) do
if state == 0 then
nptns, state = nptns + 1, -1
ptns[nptns] = { val, false, false }
else
keyw = val:match'^%s*(.*%S)'
if keyw == nil or mkeywords[keyw] == nil or (
state > 0 and mkeywords[keyw] > 0
) then break
else
state = mkeywords[keyw]
if state > 1 then ptns[nptns][2] = true end
if state == 3 then ptns[nptns][3] = true end
end
end
cnt = cnt + 1
end
if state == 0 then error(modulename .. ', ‘' .. whoami ..
'’: No pattern was given', 0) end
return ptns, nptns, cnt
end
-- Load the optional arguments of the `parsing`, `reinterpreting` and
-- `evaluating` modifiers
local function load_parse_opts (opts, start_from, isp, psp)
local tmp
local optslots, noptslots, argc, trimn, trimu, iplain, pplain =
{ true, true, true }, 3, start_from, true, false, true, true
repeat
noptslots, tmp = noptslots - 1, opts[argc]
if tmp == nil then break end
tmp = tmp:match'^%s*(.-)%s*$'
if optslots[1] ~= nil and trim_parse_opts[tmp] ~= nil then
tmp = trim_parse_opts[tmp]
trimn, trimu, optslots[1] = tmp[1], tmp[2], nil
elseif optslots[2] ~= nil and isep_parse_opts[tmp] ~= nil then
argc = argc + 1
iplain, isp, optslots[2] = isep_parse_opts[tmp],
opts[argc], nil
elseif optslots[3] ~= nil and psep_parse_opts[tmp] ~= nil then
argc = argc + 1
pplain, psp, optslots[3] = psep_parse_opts[tmp],
opts[argc], nil
else break end
argc = argc + 1
until noptslots < 1
return isp, iplain, psp, pplain, trimn, trimu, argc
end
-- Map parameters' values using a custom callback and a referenced table
local value_maps = {
[0] = function (tbl, margs, karg, varg, fn)
for key in pairs(tbl) do tbl[key] = fn() end
end,
[1] = function (tbl, margs, karg, varg, fn)
for key, val in pairs(tbl) do
margs[varg] = val
tbl[key] = fn()
end
end,
[2] = function (tbl, margs, karg, varg, fn)
for key in pairs(tbl) do
margs[karg] = key
tbl[key] = fn()
end
end,
[3] = function (tbl, margs, karg, varg, fn)
for key, val in pairs(tbl) do
margs[karg], margs[varg] = key, val
tbl[key] = fn()
end
end
}
-- Private table for `map_names()`
local name_thieves = {
[0] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
steal_if_renamed(val, tbl, key, cache, fn())
end
end,
[1] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
rargs[varg] = val
steal_if_renamed(val, tbl, key, cache, fn())
end
end,
[2] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
rargs[karg] = key
steal_if_renamed(val, tbl, key, cache, fn())
end
end,
[3] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
rargs[karg], rargs[varg] = key, val
steal_if_renamed(val, tbl, key, cache, fn())
end
end
}
-- Map parameters' names using a custom callback and a referenced table
local function map_names (tbl, rargs, karg, varg, looptype, fn)
local cache = {}
name_thieves[looptype](cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(cache) do tbl[key] = val end
end
-- Return a new table that contains `src` regrouped according to the numeric
-- suffixes in its keys
local function make_groups (src)
-- NOTE: `src` might be the original metatable!
local prefix, gid
local groups = {}
for key, val in pairs(src) do
-- `key` must only be a string or a number...
if type(key) == 'string' then
prefix, gid = key:match'^%s*(.-)%s*(%-?%d*)%s*$'
gid = tonumber(gid) or ''
else
prefix, gid = '', key
end
if groups[gid] == nil then groups[gid] = {} end
if prefix == '0' or prefix:find'^%-?[1-9]%d*$' ~= nil then
prefix = tonumber(prefix)
if prefix < 1 then prefix = prefix - 1 end
end
groups[gid][prefix] = val
end
return groups
end
-- Split into parts a string containing the `$#` and `$@` placeholders and
-- return the information as a skeleton table, a canvas table and a length
local function parse_placeholder_string (target)
local idx, s_pos, skel, canvas = 1, 1, {}, {}
local e_pos = string.find(target, '%$[@#]', 1, false)
while e_pos ~= nil do
canvas[idx] = target:sub(s_pos, e_pos - 1)
skel[idx + 1] = target:sub(e_pos, e_pos + 1) == '$@'
idx = idx + 2
s_pos = e_pos + 2
e_pos = string.find(target, '%$[@#]', s_pos, false)
end
if (s_pos > target:len()) then idx = idx - 1
else canvas[idx] = target:sub(s_pos) end
return skel, canvas, idx
end
-- Populate a table by parsing a parameter string (heavy lifting for `parsing`,
-- `reinterpreting` and `evaluating`)
local function parse_parameter_string (tbl, str, isp, ipl, psp, ppl, trn, tru)
local key, val, spos1, spos2, pos1, pos2
local pos3, idx, lenplone = 0, 1, #str + 1
if isp == nil or isp == '' then
if psp == nil or psp == '' then
if tru then tbl[idx] = str:match'^%s*(.-)%s*$'
else tbl[idx] = str end
return idx
end
spos1, spos2 = str:find(psp, 1, ppl)
if spos1 == nil then
key = idx
if tru then val = str:match'^%s*(.-)%s*$'
else val = str end
idx = idx + 1
else
key = get_parameter_name(str:sub(1, spos1 - 1))
val = str:sub(spos2 + 1)
if trn then val = val:match'^%s*(.-)%s*$' end
end
tbl[key] = val
return idx
end
if psp == nil or psp == '' then
repeat
pos1 = pos3 + 1
pos2, pos3 = str:find(isp, pos1, ipl)
val = str:sub(pos1, (pos2 or lenplone) - 1)
if tru then val = val:match'^%s*(.-)%s*$' end
tbl[idx], idx = val, idx + 1
until pos2 == nil
return idx
end
repeat
pos1 = pos3 + 1
pos2, pos3 = str:find(isp, pos1, ipl)
val = str:sub(pos1, (pos2 or lenplone) - 1)
spos1, spos2 = val:find(psp, 1, ppl)
if spos1 == nil then
key = idx
if tru then val = val:match'^%s*(.-)%s*$' end
idx = idx + 1
else
key = get_parameter_name(val:sub(1, spos1 - 1))
val = val:sub(spos2 + 1)
if trn then val = val:match'^%s*(.-)%s*$' end
end
tbl[key] = val
until pos2 == nil
return idx
end
-- Heavy lifting for `snapshotting` and `remembering`
local function make_child (ctx, src, whoami)
local len = tonumber(ctx.pipe[1])
if len == nil or len == 0 then
local stack = new_substack(ctx)
for key, val in pairs(src) do stack[key] = val end
return len == nil and 1 or 2
end
if len < 0 or math.floor(len) ~= len then error(modulename ..
', ‘' .. whoami .. '’: The number of parameters to copy must be an integer greater than zero', 0) end
copy_table_maxn(new_substack(ctx), src, len)
return 2
end
-- Heavy lifting for `setting_by_flushing`, `combining` and `combining_values`
local function set_strings_from_substack (ctx, dest, whoami)
if ctx.n_children < 1 then error(modulename ..
', ‘' .. whoami .. '’: There are no substacks to flush', 0) end
local currsnap = ctx.n_children
local stack = ctx.children[currsnap]
for key, val in pairs(memoryslots) do
if stack[key] ~= nil then dest[val] = stack[key] end
end
ctx.children[currsnap], ctx.n_children = nil, currsnap - 1
end
-- Heavy lifting for `combining` and `combining_values`
local function combine_parameters (ctx, keyval_fn, whoami)
-- NOTE: `ctx.params` might be the original metatable! This function
-- MUST create a copy of it before returning
local opts = ctx.pipe
if ctx.pipe[1] == nil then error(modulename ..
', ‘' .. whoami .. '’: No parameter name was provided', 0) end
local argc
local tbl, vars = ctx.params, {}
local sortfn, varsarg0, do_sort, tmp = load_sort_opt(opts[2])
if varsarg0 == 2 then tmp = opts[3] and opts[3]:match'^%s*(.-)%s*$' end
if tmp == 'with_flushed_glue' then
varsarg0 = varsarg0 + 1
argc = set_strings_from_opts(vars, opts, varsarg0 + 1)
set_strings_from_substack(ctx, vars, whoami)
else
if tmp == 'without_flushed_glue' then varsarg0 = varsarg0 + 1 end
argc = set_strings_from_opts(vars, opts, varsarg0 + 1)
end
if argc < varsarg0 then error(modulename ..
', ‘' .. whoami .. '’: No setting directive was given', 0) end
if next(tbl) == nil then
if vars.ifngiven ~= nil then ctx.params =
{ [get_parameter_name(ctx.pipe[1])] = vars.ifngiven }
elseif tbl == ctx.oparams then ctx.params = {} end
return argc
end
local cache, len
if do_sort then
local words
cache, words, len, tmp = get_key_list_sorted(tbl, sortfn)
for idx = 1, tmp do cache[len + idx] = words[idx] end
len = len + tmp
else
len, cache = 0, {}
for key in pairs(tbl) do
len = len + 1
cache[len] = key
end
end
local pmap, nss, kvs, pps = {}, 0, vars.pairsep or '', vars.itersep or ''
for idx = 1, len do
tmp, pmap[nss + 1] = cache[idx], pps
pmap[nss + 2] = keyval_fn(tmp, tbl[tmp], kvs)
nss = nss + 2
end
tmp = vars.oxfordsep or vars.lastsep
if tmp ~= nil and nss > 4 then pmap[nss - 1] = tmp
elseif nss > 2 and vars.lastsep ~= nil then
pmap[nss - 1] = vars.lastsep
end
pmap[1] = vars.header or ''
if vars.footer ~= nil then pmap[nss + 1] = vars.footer end
ctx.params = { [get_parameter_name(ctx.pipe[1])] = table.concat(pmap) }
return argc
end
-- Concatenate the numeric keys from the table of parameters to the numeric
-- keys from the table of options; non-numeric keys from the table of options
-- will prevail over colliding non-numeric keys from the table of parameters
local function concat_params (ctx)
local retval, tbl, nmax = {}, ctx.params, table.maxn(ctx.pipe)
if ctx.subset == 1 then
-- We need only the sequence
for key, val in ipairs(tbl) do retval[key + nmax] = val end
else
if ctx.subset == -1 then
for key in ipairs(tbl) do tbl[key] = nil end
end
for key, val in pairs(tbl) do
if type(key) == 'number' and key > 0 then
retval[key + nmax] = val
else retval[key] = val end
end
end
for key, val in pairs(ctx.pipe) do retval[key] = val end
return retval
end
-- Flush the parameters by calling a custom function for each value (after this
-- function has been invoked `ctx.params` will be no longer usable)
local function flush_params (ctx, fn)
local tbl = ctx.params
if ctx.subset == 1 then
for key, val in ipairs(tbl) do fn(key, val) end
return
end
if ctx.subset == -1 then
for key, val in ipairs(tbl) do tbl[key] = nil end
end
if ctx.sorttype > 0 then
local nums, words, nn, nw = get_key_list_sorted(tbl, natural_sort)
if ctx.sorttype == 2 then
for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end
for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end
return
end
for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end
for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end
return
end
if ctx.subset ~= -1 then
for key, val in ipairs(tbl) do
fn(key, val)
tbl[key] = nil
end
end
for key, val in pairs(tbl) do fn(key, val) end
end
-- Flush the parameters by calling one of two custom functions for each value
-- (after this function has been invoked `ctx.params` will be no longer usable)
local function mixed_flush_params (ctx, fn_seq, fn_oth)
if ctx.subset == 1 then
for key, val in ipairs(ctx.params) do fn_seq(key, val) end
return
end
if ctx.subset == -1 then
flush_params(ctx, fn_oth)
return
end
local tbl = ctx.params
if ctx.sorttype > 0 then
local nums, words, nn, nw = get_key_list_sorted(tbl, natural_sort)
local sequence = {}
for key, val in ipairs(tbl) do sequence[key] = val end
if ctx.sorttype == 2 then
for idx = 1, nw do fn_oth(words[idx], tbl[words[idx]]) end
end
for idx = 1, nn do
if sequence[nums[idx]] then fn_seq(nums[idx], sequence[nums[idx]])
else fn_oth(nums[idx], tbl[nums[idx]]) end
end
if ctx.sorttype ~= 2 then
for idx = 1, nw do fn_oth(words[idx], tbl[words[idx]]) end
end
return
end
for key, val in ipairs(tbl) do
fn_seq(key, val)
tbl[key] = nil
end
for key, val in pairs(tbl) do fn_oth(key, val) end
end
-- Finalize and return a concatenated list
local function finalize_and_return_concatenated_list (ctx, lst, len, modsize)
if len > 0 then
local tmp = ctx.oxfordsep or ctx.lastsep
if tmp ~= nil and len > modsize * 2 then
lst[len - modsize + 1] = tmp
elseif len > modsize and ctx.lastsep ~= nil then
lst[len - modsize + 1] = ctx.lastsep
end
lst[1] = ctx.header or ''
if ctx.footer ~= nil then lst[len + 1] = ctx.footer end
ctx.text = table.concat(lst)
else ctx.text = ctx.ifngiven or '' end
end
--- ---
--- PUBLIC ENVIRONMENT ---
--- ________________________________ ---
--- ---
--[[ Modifiers ]]--
-------------------
-- Syntax: #invoke:params|sequential|pipe to
library.sequential = function (ctx)
if ctx.subset == 1 then error(modulename ..
': The ‘sequential’ directive has been provided more than once', 0) end
if ctx.subset == -1 then error(modulename ..
': The two directives ‘non-sequential’ and ‘sequential’ are in contradiction with each other', 0) end
if ctx.sorttype > 0 then error(modulename ..
': The ‘all_sorted’ and ‘reassorted’ directives are redundant when followed by ‘sequential’', 0) end
ctx.iterfunc, ctx.subset = ipairs, 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|non-sequential|pipe to
library['non-sequential'] = function (ctx)
if ctx.subset == -1 then error(modulename ..
': The ‘non-sequential’ directive has been provided more than once', 0) end
if ctx.subset == 1 then error(modulename ..
': The two directives ‘sequential’ and ‘non-sequential’ are in contradiction with each other', 0) end
ctx.iterfunc, ctx.subset = pairs, -1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|all_sorted|pipe to
library.all_sorted = function (ctx)
if ctx.sorttype == 1 then error(modulename ..
': The ‘all_sorted’ directive has been provided more than once', 0) end
if ctx.subset == 1 then error(modulename ..
': The ‘all_sorted’ directive is redundant after ‘sequential’', 0) end
if ctx.sorttype == 2 then error(modulename ..
': The two directives ‘reassorted’ and ‘sequential’ are in contradiction with each other', 0) end
ctx.sorttype = 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|reassorted|pipe to
library.reassorted = function (ctx)
if ctx.sorttype == 2 then error(modulename ..
': The ‘reassorted’ directive has been provided more than once', 0) end
if ctx.subset == 1 then error(modulename ..
': The ‘reassorted’ directive is redundant after ‘sequential’', 0) end
if ctx.sorttype == 1 then error(modulename ..
': The two directives ‘sequential’ and ‘reassorted’ are in contradiction with each other', 0) end
ctx.sorttype = 2
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|setting|directives|...|pipe to
library.setting = function (ctx)
local argc = set_strings_from_opts(ctx, ctx.pipe, 1)
if argc < 2 then error(modulename ..
', ‘setting’: No directive was given', 0) end
return context_iterate(ctx, argc + 1)
end
-- Syntax: #invoke:params|scoring|new parameter name|[container]|pipe to
library.scoring = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘scoring’: No parameter name was provided', 0) end
local tmp
local retval, opts = 0, ctx.pipe
for _ in pairs(ctx.params) do retval = retval + 1 end
if opts[2] ~= nil then tmp = opts[2]:match'^%s*(.*%S)' end
if tmp == 'in_substack' then
new_substack(ctx)[get_parameter_name(opts[1])] = tostring(retval)
return context_iterate(ctx, 3)
end
ctx.params[get_parameter_name(opts[1])] = tostring(retval)
return context_iterate(ctx, tmp == 'here' and 3 or 2)
end
-- Syntax: #invoke:params|squeezing|pipe to
library.squeezing = function (ctx)
local store, indices, tbl, newlen = {}, {}, ctx.params, 0
for key, val in pairs(tbl) do
if type(key) == 'number' then
newlen = newlen + 1
indices[newlen], store[key], tbl[key] = key, val, nil
end
end
table.sort(indices)
for idx = 1, newlen do tbl[idx] = store[indices[idx]] end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|filling_the_gaps|pipe to
library.filling_the_gaps = function (ctx)
local newval, tbl, tmp, nmin, nmax, nnums =
ctx.pipe[1], ctx.params, {}, 1, nil, -1
if newval == nil then error(modulename ..
', ‘filling_the_gaps’: No value was provided', 0) end
for key, val in pairs(tbl) do
if type(key) == 'number' then
if nmax == nil then
if key < nmin then nmin = key end
nmax = key
elseif key > nmax then nmax = key
elseif key < nmin then nmin = key end
tmp[key], nnums = val, nnums + 1
end
end
if nmax ~= nil and nmax - nmin > nnums then
ctx.n_available = ctx.n_available + nmin + nnums - nmax
if ctx.n_available < 0 then error(modulename ..
', ‘filling_the_gaps’: It is possible to fill at most ' ..
tostring(maxfill) .. ' parameters', 0) end
for idx = nmin, nmax, 1 do tbl[idx] = newval end
for key, val in pairs(tmp) do tbl[key] = val end
end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|clearing|pipe to
library.clearing = function (ctx)
local tbl, numerics = ctx.params, {}
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key], tbl[key] = val, nil
end
end
for key, val in ipairs(numerics) do tbl[key] = val end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|cutting|left cut|right cut|pipe to
library.cutting = function (ctx)
local lcut = tonumber(ctx.pipe[1])
if lcut == nil or math.floor(lcut) ~= lcut then error(modulename ..
', ‘cutting’: Left cut must be an integer number', 0) end
local rcut = tonumber(ctx.pipe[2])
if rcut == nil or math.floor(rcut) ~= rcut then error(modulename ..
', ‘cutting’: Right cut must be an integer number', 0) end
local tbl = ctx.params
local len = #tbl
if lcut < 0 then lcut = len + lcut end
if rcut < 0 then rcut = len + rcut end
local tot = lcut + rcut
if tot > 0 then
local cache = {}
if tot >= len then
for key in ipairs(tbl) do tbl[key] = nil end
tot = len
else
for idx = len - rcut + 1, len, 1 do tbl[idx] = nil end
for idx = 1, lcut, 1 do tbl[idx] = nil end
end
for key, val in pairs(tbl) do
if type(key) == 'number' and key > 0 then
if key > len then cache[key - tot] = val
else cache[key - lcut] = val end
tbl[key] = nil
end
end
for key, val in pairs(cache) do tbl[key] = val end
end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|cropping|left crop|right crop|pipe to
library.cropping = function (ctx)
local lcut = tonumber(ctx.pipe[1])
if lcut == nil or math.floor(lcut) ~= lcut then error(modulename ..
', ‘cropping’: Left crop must be an integer number', 0) end
local rcut = tonumber(ctx.pipe[2])
if rcut == nil or math.floor(rcut) ~= rcut then error(modulename ..
', ‘cropping’: Right crop must be an integer number', 0) end
local tbl = ctx.params
local nmin, nmax
for key in pairs(tbl) do
if type(key) == 'number' then
if nmin == nil then nmin, nmax = key, key
elseif key > nmax then nmax = key
elseif key < nmin then nmin = key end
end
end
if nmin ~= nil then
local len = nmax - nmin + 1
if lcut < 0 then lcut = len + lcut end
if rcut < 0 then rcut = len + rcut end
if lcut + rcut - len > -1 then
for key in pairs(tbl) do
if type(key) == 'number' then tbl[key] = nil end
end
elseif lcut + rcut > 0 then
for idx = nmax - rcut + 1, nmax do tbl[idx] = nil end
for idx = nmin, nmin + lcut - 1 do tbl[idx] = nil end
local lshift = nmin + lcut - 1
if lshift > 0 then
for idx = lshift + 1, nmax, 1 do
tbl[idx - lshift], tbl[idx] =
tbl[idx], nil
end
end
end
end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|purging|start offset|length|pipe to
library.purging = function (ctx)
local idx = tonumber(ctx.pipe[1])
if idx == nil or math.floor(idx) ~= idx then error(modulename ..
', ‘purging’: Start offset must be an integer number', 0) end
local len = tonumber(ctx.pipe[2])
if len == nil or math.floor(len) ~= len then error(modulename ..
', ‘purging’: Length must be an integer number', 0) end
local tbl = ctx.params
if len < 1 then
len = len + table.maxn(tbl)
if idx > len then return context_iterate(ctx, 3) end
len = len - idx + 1
end
ctx.params = copy_table_reduced(tbl, idx, len)
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|backpurging|start offset|length|pipe to
library.backpurging = function (ctx)
local last = tonumber(ctx.pipe[1])
if last == nil or math.floor(last) ~= last then error(modulename ..
', ‘backpurging’: Start offset must be an integer number', 0) end
local len = tonumber(ctx.pipe[2])
if len == nil or math.floor(len) ~= len then error(modulename ..
', ‘backpurging’: Length must be an integer number', 0) end
local idx
local tbl = ctx.params
if len > 0 then
idx = last - len + 1
else
for key in pairs(tbl) do
if type(key) == 'number' and (idx == nil or
key < idx) then idx = key end
end
if idx == nil then return context_iterate(ctx, 3) end
idx = idx - len
if last < idx then return context_iterate(ctx, 3) end
len = last - idx + 1
end
ctx.params = copy_table_reduced(ctx.params, idx, len)
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|shifting|addend|pipe to
library.shifting = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local nshift = tonumber(ctx.pipe[1])
if nshift == nil or nshift == 0 or math.floor(nshift) ~= nshift then
error(modulename .. ', ‘shifting’: A non-zero integer number must be provided', 0) end
local tbl = {}
for key, val in pairs(ctx.params) do
if type(key) == 'number' then tbl[key + nshift] = val
else tbl[key] = val end
end
ctx.params = tbl
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|reversing_numeric_names|pipe to
library.reversing_numeric_names = function (ctx)
local tbl, numerics, nmax = ctx.params, {}, 0
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key], tbl[key] = val, nil
if key > nmax then nmax = key end
end
end
for key, val in pairs(numerics) do tbl[nmax - key + 1] = val end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|pivoting_numeric_names|pipe to
--[[
library.pivoting_numeric_names = function (ctx)
local tbl = ctx.params
local shift = #tbl + 1
if shift < 2 then return library.reversing_numeric_names(ctx) end
local numerics = {}
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key] = val
tbl[key] = nil
end
end
for key, val in pairs(numerics) do tbl[shift - key] = val end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|mirroring_numeric_names|pipe to
--[[
library.mirroring_numeric_names = function (ctx)
local nmax, nmin
local tbl, numerics = ctx.params, {}
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key] = val
tbl[key] = nil
if nmax == nil then nmin, nmax = key, key
elseif key > nmax then nmax = key
elseif key < nmin then nmin = key end
end
end
for key, val in pairs(numerics) do tbl[nmax + nmin - key] = val end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|swapping_numeric_names|pipe to
--[[
library.swapping_numeric_names = function (ctx)
local tmp
local tbl, cache, nsize = ctx.params, {}, 0
for key in pairs(tbl) do
if type(key) == 'number' then
nsize = nsize + 1
cache[nsize] = key
end
end
table.sort(cache)
for idx = math.floor(nsize / 2), 1, -1 do
tmp = tbl[cache[idx] ]
tbl[cache[idx] ] = tbl[cache[nsize - idx + 1] ]
tbl[cache[nsize - idx + 1] ] = tmp
end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|sorting_sequential_values|[criterion]|pipe to
library.sorting_sequential_values = function (ctx)
local sortfn
if ctx.pipe[1] ~= nil then
sortfn = sortfunctions[ctx.pipe[1]:match'^%s*(.-)%s*$']
end
if sortfn then table.sort(ctx.params, sortfn)
else table.sort(ctx.params) end -- i.e. either `false` or `nil`
if sortfn == nil then return context_iterate(ctx, 1) end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|splicing|[add to position]|position|increment|
-- [number of elements to write]|...|pipe to
library.splicing = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tmp2, argc, pos, refp
local opts, tbl = ctx.pipe, ctx.params
local tmp1 = opts[1]
if tmp1 ~= nil then
tmp2 = tonumber(tmp1)
if tmp2 == nil or math.floor(tmp2) ~= tmp2 then
pos, argc, tmp2 = tonumber(opts[2]), 4,
tmp1:match'^%s*(.*%S)'
if tmp2 ~= nil then
refp = position_references[tmp2]
if refp == nil then error(modulename ..
', ‘splicing’: ‘' .. tostring(tmp2) ..
'’ is not a valid first argument', 0) end
else refp = 0 end
else pos, argc, refp = tmp2, 3, 0 end
else pos, argc, refp = tonumber(opts[2]), 4, 0 end
if pos == nil or math.floor(pos) ~= pos then error(modulename ..
', ‘splicing’: The position must be an integer number', 0) end
local len = tonumber(opts[argc - 1])
if len == nil or math.floor(len) ~= len then error(modulename ..
', ‘splicing’: The increment must be an integer number', 0) end
if refp == 2 then
for _ in ipairs(tbl) do pos = pos + 1 end
refp = 0
end
tmp1, tmp2 = nil, nil
if refp ~= 0 or len ~= 0 then
for key, val in pairs(tbl) do
if type(key) == 'number' then
if tmp1 == nil then tmp1, tmp2 = key, key
elseif key < tmp1 then tmp1 = key
elseif key > tmp2 then tmp2 = key end
end
end
end
if tmp2 == nil then len = 0
elseif refp == 3 then pos = pos + tmp2
elseif refp == 1 then pos = pos + tmp1 end
if len > 0 and pos + len > tmp1 and pos <= tmp2 then
tbl = copy_table_expanded(tbl, pos, len)
elseif len < 0 and pos - len > tmp1 and pos <= tmp2 then
tbl = copy_table_reduced(tbl, pos, -len)
else tbl = copy_or_ref_table(tbl, tbl ~= ctx.oparams) end
ctx.params = tbl
tmp1 = tonumber(opts[argc])
if len == 0 and (tmp1 == nil or tmp1 < 1) then error(modulename ..
', ‘splicing’: When the increment is zero the number of elements to add cannot be zero', 0) end
if tmp1 == nil or tmp1 < 0 or math.floor(tmp1) ~= tmp1 then
return context_iterate(ctx, argc)
end
tmp2 = argc - pos + 1
for key = pos, pos + tmp1 - 1 do tbl[key] = opts[key + tmp2] end
return context_iterate(ctx, argc + tmp1 + 1)
end
-- Syntax: #invoke:params|imposing|name|value|pipe to
library.imposing = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘imposing’: Missing parameter name to impose', 0) end
ctx.params[get_parameter_name(ctx.pipe[1])] = ctx.pipe[2]
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|providing|name|value|pipe to
library.providing = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘providing’: Missing parameter name to provide', 0) end
local key = get_parameter_name(ctx.pipe[1])
if ctx.params[key] == nil then ctx.params[key] = ctx.pipe[2] end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|reassigning|source|destination|[mode]|pipe to
library.reassigning = function (ctx)
local opts, tbl = ctx.pipe, ctx.params
if opts[1] == nil then error(modulename ..
', ‘reassigning’: Missing source parameter', 0) end
if opts[2] == nil then error(modulename ..
', ‘reassigning’: Missing destination parameter', 0) end
local mode, argc
local src = get_parameter_name(opts[1])
local val = tbl[src]
if opts[3] ~= nil then mode = a_modes[opts[3]:match'^%s*(.-)%s*$'] end
if mode == nil then mode, argc = 0, 3 else argc = 4 end
if val == nil and mode > 1 then return context_iterate(ctx, argc) end
local dest = get_parameter_name(opts[2])
local tmp = tbl[dest] == nil
if mode % 2 == 0 or (mode == 7 and tmp) then tbl[src] = nil end
if tmp or mode < 4 then tbl[dest] = val end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|discarding|name|[how many]|pipe to
library.discarding = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘discarding’: Missing parameter name to discard', 0) end
local len = tonumber(ctx.pipe[2])
if len == nil then
ctx.params[get_parameter_name(ctx.pipe[1])] = nil
return context_iterate(ctx, 2)
end
local key = tonumber(ctx.pipe[1])
if key == nil or math.floor(key) ~= key then error(modulename ..
', ‘discarding’: A range was provided, but the initial parameter name is not an integer number', 0) end
if len < 1 or math.floor(len) ~= len then error(modulename ..
', ‘discarding’: A range can only be an integer number greater than zero', 0) end
for idx = key, key + len - 1 do ctx.params[idx] = nil end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|excluding_non-numeric_names|pipe to
library['excluding_non-numeric_names'] = function (ctx)
local tmp = ctx.params
for key, val in pairs(tmp) do
if type(key) ~= 'number' then tmp[key] = nil end
end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|excluding_numeric_names|pipe to
library.excluding_numeric_names = function (ctx)
local tmp = ctx.params
for key, val in pairs(tmp) do
if type(key) == 'number' then tmp[key] = nil end
end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|with_name_matching|target 1|[plain flag 1]|[or]
-- |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag
-- N]|pipe to
library.with_name_matching = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tmp, ptn
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_name_matching')
local tbl, newparams = ctx.params, {}
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
tmp = ptn[1]
if tmp == '0' or tmp:find'^%-?[1-9]%d*$' ~= nil then
tmp = tonumber(tmp)
end
newparams[tmp] = tbl[tmp]
else
for key, val in pairs(tbl) do
if tostring(key):find(ptn[1], 1, ptn[2]) then
newparams[key] = val
end
end
end
end
ctx.params = newparams
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|with_name_not_matching|target 1|[plain flag 1]
-- |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain
-- flag N]|pipe to
library.with_name_not_matching = function (ctx)
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_name_not_matching')
local tbl = ctx.params
if nptns == 1 and targets[1][3] then
local tmp = targets[1][1]
if tmp == '0' or tmp:find'^%-?[1-9]%d*$' ~= nil then
tbl[tonumber(tmp)] = nil
else tbl[tmp] = nil end
return context_iterate(ctx, argc)
end
local yesmatch, ptn
for key in pairs(tbl) do
yesmatch = true
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
if tostring(key) ~= ptn[1] then
yesmatch = false
break
end
elseif not tostring(key):find(ptn[1], 1, ptn[2]) then
yesmatch = false
break
end
end
if yesmatch then tbl[key] = nil end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|with_value_matching|target 1|[plain flag 1]|[or]
-- |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag
-- N]|pipe to
library.with_value_matching = function (ctx)
local nomatch, ptn
local tbl = ctx.params
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_value_matching')
for key, val in pairs(tbl) do
nomatch = true
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
if val == ptn[1] then
nomatch = false
break
end
elseif val:find(ptn[1], 1, ptn[2]) then
nomatch = false
break
end
end
if nomatch then tbl[key] = nil end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|with_value_not_matching|target 1|[plain flag 1]
-- |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain
-- flag N]|pipe to
library.with_value_not_matching = function (ctx)
local yesmatch, ptn
local tbl = ctx.params
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_value_not_matching')
for key, val in pairs(tbl) do
yesmatch = true
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
if val ~= ptn[1] then
yesmatch = false
break
end
elseif not val:find(ptn[1], 1, ptn[2]) then
yesmatch = false
break
end
end
if yesmatch then tbl[key] = nil end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|keeping_at_most|number of parameters to pick|pipe to
library.keeping_at_most = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local len = tonumber(ctx.pipe[1])
if len == nil or len < 1 or math.floor(len) ~= len then error(modulename ..
', ‘keeping_at_most’: The number of parameters to keep must be an integer greater than zero', 0) end
ctx.params = copy_table_maxn({}, ctx.params, len)
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|trimming_values|pipe to
library.trimming_values = function (ctx)
local tbl = ctx.params
for key, val in pairs(tbl) do tbl[key] = val:match'^%s*(.-)%s*$' end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mapping_to_lowercase|pipe to
library.mapping_to_lowercase = function (ctx)
local tbl = ctx.params
for key, val in pairs(tbl) do tbl[key] = val:lower() end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mapping_to_uppercase|pipe to
library.mapping_to_uppercase = function (ctx)
local tbl = ctx.params
for key, val in pairs(tbl) do tbl[key] = val:upper() end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mapping_by_calling|template name|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe to
library.mapping_by_calling = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘mapping_by_calling’: No template name was provided', 0) end
local margs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.values_only, ctx.params)
local model = { title = tname, args = margs }
value_maps[looptype](tbl, margs, karg, varg, function ()
return ctx.frame:expandTemplate(model)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_invoking|module name|function name|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.mapping_by_invoking = function (ctx)
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘mapping_by_invoking’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘mapping_by_invoking’: No function name was provided', 0) end
local margs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 2, mapping_styles.values_only, ctx.params)
local model = { title = 'Module:' .. mname, args = margs }
local mfunc = require(model.title)[fname]
if mfunc == nil then error(modulename ..
', ‘mapping_by_invoking’: The function ‘' .. fname ..
'’ does not exist', 0) end
value_maps[looptype](tbl, margs, karg, varg, function ()
return tostring(mfunc(ctx.frame:newChild(model)))
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_magic|parser function|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.mapping_by_magic = function (ctx)
local magic
local opts = ctx.pipe
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘mapping_by_magic’: No parser function was provided', 0) end
local margs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.values_only, ctx.params)
value_maps[looptype](tbl, margs, karg, varg, function ()
return ctx.frame:callParserFunction(magic, margs)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_replacing|target|replace|[count]|[plain
-- flag]|pipe to
library.mapping_by_replacing = function (ctx)
local ptn, repl, nmax, flg, argc, die =
load_replace_args(ctx.pipe, 'mapping_by_replacing')
if die then return context_iterate(ctx, argc) end
local tbl = ctx.params
if flg == 3 then
for key, val in pairs(tbl) do
if val == ptn then tbl[key] = repl end
end
else
if flg == 2 then
-- Copied from Module:String's `str._escapePattern()`
ptn = ptn:gsub('[%(%)%.%%%+%-%*%?%[%^%$%]]', '%%%0')
end
for key, val in pairs(tbl) do
tbl[key] = val:gsub(ptn, repl, nmax)
end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_mixing|mixing string|pipe to
library.mapping_by_mixing = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘mapping_by_mixing’: No mixing string was provided', 0) end
local tbl, mix = ctx.params, ctx.pipe[1]
if mix == '$#' then
for key in pairs(tbl) do tbl[key] = tostring(key) end
return context_iterate(ctx, 2)
end
local skel, cnv, n_parts = parse_placeholder_string(mix)
for key, val in pairs(tbl) do
for idx = 2, n_parts, 2 do
if skel[idx] then cnv[idx] = val
else cnv[idx] = tostring(key) end
end
tbl[key] = table.concat(cnv)
end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|mapping_to_names|pipe to
--[[
library.mapping_to_names = function (ctx)
local tbl = ctx.params
for key in pairs(tbl) do tbl[key] = tostring(key) end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|renaming_to_lowercase|pipe to
library.renaming_to_lowercase = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for key, val in pairs(ctx.params) do
if type(key) == 'string' then cache[key:lower()] = val else
cache[key] = val end
end
ctx.params = cache
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|renaming_to_uppercase|pipe to
library.renaming_to_uppercase = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for key, val in pairs(ctx.params) do
if type(key) == 'string' then cache[key:upper()] = val else
cache[key] = val end
end
ctx.params = cache
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|renaming_to_sequence|[sort order]|pipe to
library.renaming_to_sequence = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache, len
local tbl = ctx.params
local sortfn, argc, do_sort = load_sort_opt(ctx.pipe[1])
if do_sort then
local words, wl
cache, words, len, wl = get_key_list_sorted(tbl, sortfn)
for idx = 1, len do cache[idx] = tbl[cache[idx]] end
for idx = 1, wl do cache[len + idx] = tbl[words[idx]] end
else
len, cache = 0, {}
for _, val in pairs(tbl) do
len = len + 1
cache[len] = val
end
end
ctx.params = cache
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_calling|template name|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe to
library.renaming_by_calling = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘renaming_by_calling’: No template name was provided', 0) end
local rargs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.names_only, ctx.params)
local model = { title = tname, args = rargs }
map_names(tbl, rargs, karg, varg, looptype, function ()
return ctx.frame:expandTemplate(model)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_invoking|module name|function
-- name|[call style]|[let/use]|[...]|[let/use]|[...]|[number of
-- additional arguments]|[argument 1]|[argument 2]|[...]|[argument
-- N]|pipe to
library.renaming_by_invoking = function (ctx)
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘renaming_by_invoking’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘renaming_by_invoking’: No function name was provided', 0) end
local rargs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 2, mapping_styles.names_only, ctx.params)
local model = { title = 'Module:' .. mname, args = rargs }
local mfunc = require(model.title)[fname]
if mfunc == nil then error(modulename ..
', ‘renaming_by_invoking’: The function ‘' .. fname ..
'’ does not exist', 0) end
map_names(tbl, rargs, karg, varg, looptype, function ()
return tostring(mfunc(ctx.frame:newChild(model)))
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_magic|parser function|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.renaming_by_magic = function (ctx)
local opts = ctx.pipe
local magic
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘renaming_by_magic’: No parser function was provided', 0) end
local rargs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.names_only, ctx.params)
map_names(tbl, rargs, karg, varg, looptype, function ()
return ctx.frame:callParserFunction(magic, rargs)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_replacing|target|replace|[count]|[plain
-- flag]|pipe to
library.renaming_by_replacing = function (ctx)
local ptn, repl, nmax, flg, argc, die =
load_replace_args(ctx.pipe, 'renaming_by_replacing')
if die then return context_iterate(ctx, argc) end
local tbl = ctx.params
if flg == 3 then
ptn = get_parameter_name(ptn)
local val = tbl[ptn]
if val ~= nil then
tbl[ptn], tbl[get_parameter_name(repl)] = nil, val
end
else
if flg == 2 then
-- Copied from Module:String's `str._escapePattern()`
ptn = ptn:gsub('[%(%)%.%%%+%-%*%?%[%^%$%]]', '%%%0')
end
local cache = {}
for key, val in pairs(tbl) do
steal_if_renamed(val, tbl, key, cache,
tostring(key):gsub(ptn, repl, nmax))
end
for key, val in pairs(cache) do tbl[key] = val end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_mixing|mixing string|pipe to
library.renaming_by_mixing = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
if ctx.pipe[1] == nil then error(modulename ..
', ‘renaming_by_mixing’: No mixing string was provided', 0) end
local mix = ctx.pipe[1]:match'^%s*(.-)%s*$'
local cache = {}
if mix == '$@' then
for _, val in pairs(ctx.params) do
cache[get_parameter_name(val)] = val
end
else
local skel, canvas, n_parts = parse_placeholder_string(mix)
for key, val in pairs(ctx.params) do
for idx = 2, n_parts, 2 do
if skel[idx] then canvas[idx] = val
else canvas[idx] = tostring(key) end
end
cache[get_parameter_name(table.concat(canvas))] = val
end
end
ctx.params = cache
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|renaming_to_values|pipe to
--[[
library.renaming_to_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for _, val in pairs(ctx.params) do cache[val] = val end
ctx.params = cache
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|grouping_by_calling|template
-- name|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.grouping_by_calling = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tmp, argc, tbl, mem = load_child_opts(ctx.pipe, 2, 0, ctx.params)
local gargs = {}
for key, val in pairs(tmp) do
if type(key) == 'number' and key < 1 then gargs[key - 1] = val
else gargs[key] = val end
end
tmp = ctx.pipe[1]
if tmp ~= nil then tmp = tmp:match'^%s*(.*%S)' end
if tmp == nil then error(modulename ..
', ‘grouping_by_calling’: No template name was provided', 0) end
local model = { title = tmp }
local groups = make_groups(tbl)
for gid, group in pairs(groups) do
for key, val in pairs(gargs) do group[key] = val end
group[0], model.args = gid, group
groups[gid] = ctx.frame:expandTemplate(model)
end
for key, val in pairs(mem) do groups[key] = val end
ctx.params = groups
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|parsing|string to parse|[trim flag]|[iteration
-- delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to
library.parsing = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘parsing’: No string to parse was provided', 0) end
local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =
load_parse_opts(opts, 2, '|', '=')
parse_parameter_string(ctx.params, opts[1], isep, iplain, psep, pplain,
trimnamed, trimunnamed)
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|reinterpreting|parameter to reinterpret|[trim
-- flag]|[iteration delimiter setter]|[...]|[key-value delimiter
-- setter]|[...]|pipe to
library.reinterpreting = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘reinterpreting’: No parameter to reinterpret was provided', 0) end
local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =
load_parse_opts(opts, 2, '|', '=')
local tbl, tmp = ctx.params, get_parameter_name(opts[1])
local str = tbl[tmp]
if str ~= nil then
tbl[tmp] = nil
parse_parameter_string(tbl, str, isep, iplain, psep, pplain,
trimnamed, trimunnamed)
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|evaluating|string to parse|[trim flag]|[iteration
-- delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to
library.evaluating = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘evaluating’: No string to parse was provided', 0) end
local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =
load_parse_opts(opts, 2, '!', ':')
if opts[1]:match'^%s*(.*%S)' == nil then
ctx.pipe = copy_or_ref_table(opts, opts ~= ctx.opipe)
return context_iterate(ctx, argc)
end
local new_opts, cache = {}, {}
local shift = parse_parameter_string(cache, opts[1], isep, iplain,
psep, pplain, trimnamed, trimunnamed) - argc
for key, val in pairs(opts) do
if type(key) ~= 'number' or key < 1 then new_opts[key] = val
elseif key >= argc then new_opts[key + shift] = val end
end
for key, val in pairs(cache) do new_opts[key] = val end
ctx.pipe = new_opts
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mixing_names_and_values|mixing string|pipe to
library.mixing_names_and_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
if ctx.pipe[1] == nil then error(modulename ..
', ‘mixing_names_and_values’: No mixing string was provided for parameter names', 0) end
if ctx.pipe[2] == nil then error(modulename ..
', ‘mixing_names_and_values’: No mixing string was provided for parameter values', 0) end
local tmp
local mix_k = ctx.pipe[1]:match'^%s*(.-)%s*$'
local cache, mix_v = {}, ctx.pipe[2]
if mix_k == '$@' and mix_v == '$@' then
for _, val in pairs(ctx.params) do
cache[get_parameter_name(val)] = val
end
elseif mix_k == '$@' and mix_v == '$#' then
for key, val in pairs(ctx.params) do
cache[get_parameter_name(val)] = tostring(key)
end
elseif mix_k == '$#' and mix_v == '$#' then
for key in pairs(ctx.params) do cache[key] = tostring(key) end
else
local skel_k, cnv_k, n_parts_k = parse_placeholder_string(mix_k)
local skel_v, cnv_v, n_parts_v = parse_placeholder_string(mix_v)
for key, val in pairs(ctx.params) do
tmp = tostring(key)
for idx = 2, n_parts_k, 2 do
if skel_k[idx] then cnv_k[idx] = val else cnv_k[idx] = tmp end
end
for idx = 2, n_parts_v, 2 do
if skel_v[idx] then cnv_v[idx] = val else cnv_v[idx] = tmp end
end
cache[get_parameter_name(table.concat(cnv_k))] =
table.concat(cnv_v)
end
end
ctx.params = cache
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|swapping_names_and_values|pipe to
--[[
library.swapping_names_and_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for key, val in pairs(ctx.params) do cache[val] = key end
ctx.params = cache
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|combining|new parameter name|[sort
-- order]|[with/without flushed glue]|setting directives|...|pipe to
library.combining = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
return context_iterate(ctx, combine_parameters(
ctx,
function (key, val, kvs) return key .. kvs .. val end,
'combining'
) + 1)
end
-- Syntax: #invoke:params|combining_values|new parameter name|[sort
-- order]|[with/without flushed glue]|setting directives|...|pipe to
library.combining_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
return context_iterate(ctx, combine_parameters(
ctx,
function (key, val, kvs) return val end,
'combining_values'
) + 1)
end
-- Syntax: #invoke:params|combining_by_calling|template name|new parameter
-- name|pipe to
library.combining_by_calling = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tname = ctx.pipe[1]
if tname ~= nil then tname = tname:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_calling’: No template name was provided', 0) end
if ctx.pipe[2] == nil then error(modulename ..
', ‘combining_by_calling’: No parameter name was provided', 0) end
ctx.params = {
[get_parameter_name(ctx.pipe[2])] = ctx.frame:expandTemplate{
title = tname,
args = ctx.params
}
}
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|combining_by_invoking|module name|function name|new
-- parameter name|pipe to
library.combining_by_invoking = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local mname = ctx.pipe[1]
if mname ~= nil then mname = mname:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_invoking’: No module name was provided', 0) end
local fname = ctx.pipe[2]
if fname ~= nil then fname = fname:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_invoking’: No function name was provided', 0) end
if ctx.pipe[3] == nil then error(modulename ..
', ‘combining_by_invoking’: No parameter name was provided', 0) end
local model = { title = 'Module:' .. mname, args = ctx.params }
local mfunc = require(model.title)[fname]
if mfunc == nil then error(modulename ..
', ‘mapping_by_invoking’: The function ‘' .. fname ..
'’ does not exist', 0) end
ctx.params = {
[get_parameter_name(ctx.pipe[3])] =
tostring(mfunc(ctx.frame:newChild(model)))
}
return context_iterate(ctx, 4)
end
-- Syntax: #invoke:params|combining_by_magic|parser function|new parameter
-- name|pipe to
library.combining_by_magic = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local magic = ctx.pipe[1]
if magic ~= nil then magic = magic:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_magic’: No parser function was provided', 0) end
if ctx.pipe[2] == nil then error(modulename ..
', ‘combining_by_magic’: No parameter name was provided', 0) end
ctx.params = {
[get_parameter_name(ctx.pipe[2])] =
ctx.frame:callParserFunction(magic, ctx.params)
}
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|snapshotting|[maximum number]|pipe to
library.snapshotting = function (ctx)
return context_iterate(ctx, make_child(ctx, ctx.params, 'snapshotting'))
end
-- Syntax: #invoke:params|remembering|[maximum number]|pipe to
library.remembering = function (ctx)
return context_iterate(ctx, make_child(ctx, ctx.oparams, 'remembering'))
end
-- Syntax: #invoke:params|entering_substack|[new]|pipe to
library.entering_substack = function (ctx)
local tbl, ncurrparent = ctx.params, ctx.n_parents + 1
if ctx.parents == nil then ctx.parents = { tbl }
else ctx.parents[ncurrparent] = tbl end
ctx.n_parents = ncurrparent
if ctx.pipe[1] ~= nil and ctx.pipe[1]:match'^%s*new%s*$' then
ctx.params = {}
return context_iterate(ctx, 2)
end
local currsnap = ctx.n_children
if currsnap > 0 then
ctx.params, ctx.children[currsnap], ctx.n_children =
ctx.children[currsnap], nil, currsnap - 1
else
local newparams = {}
for key, val in pairs(tbl) do newparams[key] = val end
ctx.params = newparams
end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|pulling|parameter name|pipe to
library.pulling = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘pulling’: No parameter to pull was provided', 0) end
local tmp = ctx.n_parents
local parent = tmp < 1 and ctx.oparams or ctx.parents[tmp]
tmp = get_parameter_name(opts[1])
if parent[tmp] ~= nil then ctx.params[tmp] = parent[tmp] end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|recalling|parameter name|pipe to
library.recalling = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘recalling’: No parameter to recall was provided', 0) end
local arg = get_parameter_name(opts[1])
if ctx.oparams[arg] ~= nil then ctx.params[arg] = ctx.oparams[arg] end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|finding|parameter name|pipe to
--[[
library.finding = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘finding’: No parameter to find was provided', 0) end
local arg = get_parameter_name(opts[1])
local parent
for idx = ctx.n_parents, 1, -1 do
parent = ctx.parents[idx]
if parent[arg] ~= nil then
ctx.params[arg] = parent[arg]
return context_iterate(ctx, 2)
end
end
if ctx.oparams[arg] ~= nil then ctx.params[arg] = ctx.oparams[arg] end
return context_iterate(ctx, 2)
end
]]--
-- Syntax: #invoke:params|picking|number of parameters to pick|pipe to
--[[
library.picking = function (ctx)
local len = tonumber(ctx.pipe[1])
if len == nil or len < 1 or math.floor(len) ~= len then error(modulename ..
', ‘picking’: The number of parameters to pick must be an integer greater than zero', 0) end
if ctx.n_parents < 1 then copy_table_maxn(ctx.params, ctx.oparams, len)
else copy_table_maxn(ctx.params, ctx.parents[ctx.n_parents], len) end
return context_iterate(ctx, 2)
end
]]--
-- Syntax: #invoke:params|detaching_substack|pipe to
library.detaching_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘detaching_substack’: No substack has been created', 0) end
local parent = ctx.parents[ncurrparent]
for key in pairs(ctx.params) do parent[key] = nil end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|dropping_substack|pipe to
library.dropping_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘dropping_substack’: No substack has been created', 0) end
ctx.params, ctx.parents[ncurrparent], ctx.n_parents =
ctx.parents[ncurrparent], nil, ncurrparent - 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|leaving_substack|pipe to
library.leaving_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘leaving_substack’: No substack has been created', 0) end
local currsnap = ctx.n_children + 1
if ctx.children == nil then ctx.children = { ctx.params }
else ctx.children[currsnap] = ctx.params end
ctx.params, ctx.parents[ncurrparent], ctx.n_parents, ctx.n_children =
ctx.parents[ncurrparent], nil, ncurrparent - 1, currsnap
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|merging_substack|pipe to
library.merging_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘merging_substack’: No substack has been created', 0) end
local parent, child = ctx.parents[ncurrparent], ctx.params
ctx.params, ctx.parents[ncurrparent], ctx.n_parents = parent, nil,
ncurrparent - 1
for key, val in pairs(child) do parent[key] = val end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|flushing|pipe to
library.flushing = function (ctx)
if ctx.n_children < 1 then error(modulename ..
', ‘flushing’: There are no substacks to flush', 0) end
local parent, currsnap = ctx.params, ctx.n_children
for key, val in pairs(ctx.children[currsnap]) do parent[key] = val end
ctx.children[currsnap], ctx.n_children = nil, currsnap - 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|setting_by_flushing|pipe to
library.setting_by_flushing = function (ctx)
set_strings_from_substack(ctx, ctx, 'setting_by_flushing')
return context_iterate(ctx, 1)
end
--[[ Functions ]]--
-----------------------------
-- Syntax: #invoke:params|count
library.count = function (ctx)
-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!
local retval = 0
for _ in ctx.iterfunc(ctx.params) do retval = retval + 1 end
if ctx.subset == -1 then retval = retval - #ctx.params end
ctx.text = retval
return false
end
-- Syntax: #invoke:args|concat_and_call|template name|[prepend 1]|[prepend 2]
-- |[...]|[item n]|[named item 1=value 1]|[...]|[named item n=value
-- n]|[...]
library.concat_and_call = function (ctx)
-- NOTE: `ctx.params` might be the original metatable!
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘concat_and_call’: No template name was provided', 0) end
remove_numeric_keys(opts, 1, 1)
ctx.text = ctx.frame:expandTemplate{
title = tname,
args = concat_params(ctx)
}
return false
end
-- Syntax: #invoke:args|concat_and_invoke|module name|function name|[prepend
-- 1]|[prepend 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named
-- item n=value n]|[...]
library.concat_and_invoke = function (ctx)
-- NOTE: `ctx.params` might be the original metatable!
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘concat_and_invoke’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘concat_and_invoke’: No function name was provided', 0) end
remove_numeric_keys(opts, 1, 2)
local mfunc = require('Module:' .. mname)[fname]
if mfunc == nil then error(modulename ..
', ‘concat_and_invoke’: The function ‘' .. fname ..
'’ does not exist', 0) end
ctx.text = mfunc(ctx.frame:newChild{
title = 'Module:' .. mname,
args = concat_params(ctx)
})
return false
end
-- Syntax: #invoke:args|concat_and_magic|parser function|[prepend 1]|[prepend
-- 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named item n=
-- value n]|[...]
library.concat_and_magic = function (ctx)
-- NOTE: `ctx.params` might be the original metatable!
local magic
local opts = ctx.pipe
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘concat_and_magic’: No parser function was provided', 0) end
remove_numeric_keys(opts, 1, 1)
ctx.text = ctx.frame:callParserFunction(magic, concat_params(ctx))
return false
end
-- Syntax: #invoke:params|value_of|parameter name
library.value_of = function (ctx)
-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘value_of’: No parameter name was provided', 0) end
local val
local key = opts[1]:match'^%s*(.-)%s*$'
if key == '0' or key:find'^%-?[1-9]%d*$' ~= nil then
key = tonumber(key)
val = ctx.params[key]
-- No worries: #ctx.params is unused when the modifier is in
-- first position (and therefore `ctx.params` is a metatable)
if val ~= nil and (
ctx.subset ~= -1 or key > #ctx.params or key < 1
) and (
ctx.subset ~= 1 or (key <= #ctx.params and key > 0)
) then
ctx.text = (ctx.header or '') .. val .. (ctx.footer or '')
else ctx.text = ctx.ifngiven or '' end
else
val = ctx.params[key]
if ctx.subset ~= 1 and val ~= nil then ctx.text = (ctx.header
or '') .. val .. (ctx.footer or '')
else ctx.text = ctx.ifngiven or '' end
end
return false
end
-- Syntax: #invoke:params|list
library.list = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local ret, nss, kvs, pps = {}, 0, ctx.pairsep or '', ctx.itersep or ''
flush_params(ctx, function (key, val)
ret[nss + 1], ret[nss + 2], ret[nss + 3], ret[nss + 4], nss =
pps, key, kvs, val, nss + 4
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 4)
return false
end
-- Syntax: #invoke:params|list_values
library.list_values = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
-- NOTE: `library.coins()` and `library.unique_coins()` rely on us
local ret, nss, pps = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
ret[nss + 1], ret[nss + 2], nss = pps, val, nss + 2
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|list_maybe_with_names
library.list_maybe_with_names = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local ret, nss, kvs, pps = {}, 0, ctx.pairsep or '', ctx.itersep or ''
mixed_flush_params(
ctx,
function (key, val)
ret[nss + 1], ret[nss + 2], ret[nss + 3],
ret[nss + 4], nss = pps, '', '', val, nss + 4
end,
function (key, val)
ret[nss + 1], ret[nss + 2], ret[nss + 3],
ret[nss + 4], nss = pps, key, kvs, val, nss + 4
end
)
finalize_and_return_concatenated_list(ctx, ret, nss, 4)
return false
end
-- Syntax: #invoke:params|coins|[first coin = value 1]|[second coin = value
-- 2]|[...]|[last coin = value N]
--[[
library.coins = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local opts, tbl = ctx.pipe, ctx.params
for key, val in pairs(tbl) do tbl[key] = opts[get_parameter_name(val)] end
return library.list_values(ctx)
end
]]--
-- Syntax: #invoke:params|unique_coins|[first coin = value 1]|[second coin =
-- value 2]|[...]|[last coin = value N]
--[[
library.unique_coins = function (ctx)
local tmp
local opts, tbl = ctx.pipe, ctx.params
for key, val in pairs(tbl) do
tmp = get_parameter_name(val)
tbl[key], opts[tmp] = opts[tmp], nil
end
return library.list_values(ctx)
end
]]
-- Syntax: #invoke:params|for_each|wikitext
library.for_each = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local ret, nss, pps, txt = {}, 0, ctx.itersep or '', ctx.pipe[1] or ''
local skel, cnv, n_parts = parse_placeholder_string(txt)
flush_params(ctx, function (key, val)
for idx = 2, n_parts, 2 do
if skel[idx] then cnv[idx] = val
else cnv[idx] = tostring(key) end
end
ret[nss + 1], nss = pps, nss + 2
ret[nss] = table.concat(cnv)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|call_for_each|template name|[append 1]|[append 2]
-- |[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.call_for_each = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘call_for_each’: No template name was provided', 0) end
local model = { title = tname, args = opts }
local ret, nss, ccs = {}, 0, ctx.itersep or ''
table.insert(opts, 1, true)
flush_params(ctx, function (key, val)
opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2
ret[nss] = ctx.frame:expandTemplate(model)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|invoke_for_each|module name|module function|[append
-- 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]
-- |[named param n=value n]|[...]
library.invoke_for_each = function (ctx)
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘invoke_for_each’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘invoke_for_each’: No function name was provided', 0) end
local model = { title = 'Module:' .. mname, args = opts }
local mfunc = require(model.title)[fname]
local ret, nss, ccs = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2
ret[nss] = mfunc(ctx.frame:newChild(model))
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|magic_for_each|parser function|[append 1]|[append 2]
-- |[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.magic_for_each = function (ctx)
local magic
local opts = ctx.pipe
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘magic_for_each’: No parser function was provided', 0) end
local ret, nss, ccs = {}, 0, ctx.itersep or ''
table.insert(opts, 1, true)
flush_params(ctx, function (key, val)
opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2
ret[nss] = ctx.frame:callParserFunction(magic, opts)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|call_for_each_value|template name|[append 1]|[append
-- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.call_for_each_value = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘call_for_each_value’: No template name was provided', 0) end
local model = { title = tname, args = opts }
local ret, nss, ccs = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
opts[1], ret[nss + 1], nss = val, ccs, nss + 2
ret[nss] = ctx.frame:expandTemplate(model)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|invoke_for_each_value|module name|[append 1]|[append
-- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.invoke_for_each_value = function (ctx)
local opts = ctx.pipe
local mname, fname
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘invoke_for_each_value’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘invoke_for_each_value’: No function name was provided', 0) end
local model = { title = 'Module:' .. mname, args = opts }
local mfunc = require(model.title)[fname]
local ret, nss, ccs = {}, 0, ctx.itersep or ''
remove_numeric_keys(opts, 1, 1)
flush_params(ctx, function (key, val)
opts[1], ret[nss + 1], nss = val, ccs, nss + 2
ret[nss] = mfunc(ctx.frame:newChild(model))
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|magic_for_each_value|parser function|[append 1]
-- |[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named
-- param n=value n]|[...]
library.magic_for_each_value = function (ctx)
local opts = ctx.pipe
local magic
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘magic_for_each_value’: No parser function was provided', 0) end
local ret, nss, ccs = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
opts[1], ret[nss + 1], nss = val, ccs, nss + 2
ret[nss] = ctx.frame:callParserFunction(magic, opts)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|call_for_each_group|template name|[append 1]|[append
-- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.call_for_each_group = function (ctx)
-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!
local tmp
if ctx.pipe[1] ~= nil then tmp = ctx.pipe[1]:match'^%s*(.*%S)' end
if tmp == nil then error(modulename ..
', ‘call_for_each_group’: No template name was provided', 0) end
local model = { title = tmp }
local opts, ret, nss, ccs = {}, {}, 0, ctx.itersep or ''
for key, val in pairs(ctx.pipe) do
if type(key) == 'number' then opts[key - 1] = val
else opts[key] = val end
end
ctx.pipe = opts
ctx.params = make_groups(ctx.params)
flush_params(ctx, function (gid, group)
for key, val in pairs(opts) do group[key] = val end
group[0], model.args, ret[nss + 1], nss = gid, group, ccs,
nss + 2
ret[nss] = ctx.frame:expandTemplate(model)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
--[[ First-position-only modifiers ]]--
---------------------------------------
-- Syntax: #invoke:params|new|pipe to
static_iface.new = function (child_frame)
local ctx = context_new(child_frame)
ctx.pipe = copy_or_ref_table(ctx.opipe, false)
ctx.params = {}
main_loop(ctx, context_iterate(ctx, 1))
return ctx.text
end
--[[ First-position-only functions ]]--
---------------------------------------
-- Syntax: #invoke:params|self
static_iface.self = function (frame)
return frame:getParent():getTitle()
end
--[[ Public metatable of functions ]]--
---------------------------------------
return setmetatable({}, {
__index = function (_, query)
local fname = query:match'^%s*(.*%S)'
if fname == nil then error(modulename ..
': You must specify a function to call', 0) end
local func = static_iface[fname]
if func ~= nil then return func end
func = library[fname]
if func == nil then error(modulename ..
': The function ‘' .. fname .. '’ does not exist', 0) end
return function (child_frame)
local ctx = context_new(child_frame)
ctx.pipe = copy_or_ref_table(ctx.opipe, refpipe[fname])
ctx.params = copy_or_ref_table(ctx.oparams, refparams[fname])
main_loop(ctx, func)
return ctx.text
end
end
})
s0wwht3ty2l3u443tnfm9mh3z5pmpgj
796337
796325
2026-07-24T03:49:38Z
Grufo
64169
Update from [[d:Special:GoToLinkedPage/mediawikiwiki/Q122696746|master]] using [[mw:Synchronizer| #Synchronizer]]
796337
Scribunto
text/plain
require[[strict]]
--- ---
--- PRIVATE ENVIRONMENT ---
--- ________________________________ ---
--- ---
--[[ Abstract utilities ]]--
----------------------------
-- Helper function for `string.gsub()` (for managing zero-padded numbers)
local function zero_padded (str)
return ('%03d%s'):format(#str, str)
end
-- Helper function for `table.sort()` (for natural sorting)
local function natural_sort (var1, var2)
return var1:gsub('%d+', zero_padded) < var2:gsub('%d+', zero_padded)
end
-- Return a copy or a reference to a table
local function copy_or_ref_table (src, refonly)
if refonly then return src end
local newtab = {}
for key, val in pairs(src) do newtab[key] = val end
return newtab
end
-- Copy at most N items (of all kinds) from `src` to `dest` and return `dest`
local function copy_table_maxn (dest, src, len)
local idx = 1
for key, val in pairs(src) do
dest[key], idx = val, idx + 1
if idx > len then break end
end
return dest
end
-- Remove some numeric elements from a table, shifting everything to the left
local function remove_numeric_keys (tbl, idx, len)
local cache, tmp = {}, idx + len - 1
for key, val in pairs(tbl) do
if type(key) == 'number' and key >= idx then
if key > tmp then cache[key - len] = val end
tbl[key] = nil
end
end
for key, val in pairs(cache) do tbl[key] = val end
end
-- Make a reduced copy of a table (shifting in both directions if necessary)
local function copy_table_reduced (tbl, idx, len)
local ret, tmp = {}, idx + len - 1
if idx > 0 then
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key < idx then
ret[key] = val
elseif key > tmp then ret[key - len] = val end
end
elseif tmp > 0 then
local nshift = 1 - idx
for key, val in pairs(tbl) do
if type(key) ~= 'number' then ret[key] = val
elseif key > tmp then ret[key - tmp] = val
elseif key < idx then ret[key + nshift] = val end
end
else
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key > tmp then
ret[key] = val
elseif key < idx then ret[key + len] = val end
end
end
return ret
end
-- Make an expanded copy of a table (shifting in both directions if necessary)
local function copy_table_expanded (tbl, idx, len)
local ret, tmp = {}, idx + len - 1
if idx > 0 then
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key < idx then
ret[key] = val
else ret[key + len] = val end
end
elseif tmp > 0 then
local nshift = idx - 1
for key, val in pairs(tbl) do
if type(key) ~= 'number' then ret[key] = val
elseif key > 0 then ret[key + tmp] = val
elseif key < 1 then ret[key + nshift] = val end
end
else
for key, val in pairs(tbl) do
if type(key) ~= 'number' or key > tmp then
ret[key] = val
else ret[key - len] = val end
end
end
return ret
end
-- Given a table, create two new tables containing the sorted list of keys
local function get_key_list_sorted (tbl, sort_fn)
local nums, words, nn, nw = {}, {}, 0, 0
for key, val in pairs(tbl) do
if type(key) == 'number' then
nn = nn + 1
nums[nn] = key
else
nw = nw + 1
words[nw] = key
end
end
table.sort(nums)
table.sort(words, sort_fn)
return nums, words, nn, nw
end
-- Parse a parameter name string and return it as a string or a number
local function get_parameter_name (par_str)
local ret = par_str:match'^%s*(.-)%s*$'
if ret ~= '0' and ret:find'^%-?[1-9]%d*$' == nil then return ret end
return tonumber(ret)
end
-- Move a key from a table to another, but only if under a different name and
-- always parsing numeric strings as numbers
local function steal_if_renamed (val, src, skey, dest, dkey)
local realkey = get_parameter_name(dkey)
if skey ~= realkey then dest[realkey], src[skey] = val, nil end
end
--[[ Public strings ]]--
------------------------
-- Special match keywords (functions and modifiers MUST avoid these names)
local mkeywords = {
['or'] = 0,
pattern = 1,
plain = 2,
strict = 3
}
-- Sort functions (functions and modifiers MUST avoid these names)
local sortfunctions = {
alphabetically = false,
naturally = natural_sort
}
-- Callback styles for the `mapping_*` and `renaming_*` class of modifiers
-- (functions and modifiers MUST avoid these names)
--[[
Meanings of the columns:
col[1] = Loop type (0-3)
col[2] = Number of module arguments that the style requires (1-3)
col[3] = Minimum number of sequential parameters passed to the callback
col[4] = Name of the callback parameter where to place each parameter name
col[5] = Name of the callback parameter where to place each parameter value
col[6] = Argument in the modifier's invocation that will override `col[4]`
col[7] = Argument in the modifier's invocation that will override `col[5]`
A value of `-1` indicates that no meaningful value is stored (i.e. `nil`)
]]--
local mapping_styles = {
names_and_values = { 3, 2, 2, 1, 2, -1, -1 },
values_and_names = { 3, 2, 2, 2, 1, -1, -1 },
values_only = { 1, 2, 1, -1, 1, -1, -1 },
names_only = { 2, 2, 1, 1, -1, -1, -1 },
names_and_values_as = { 3, 4, 0, -1, -1, 2, 3 },
names_only_as = { 2, 3, 0, -1, -1, 2, -1 },
values_only_as = { 1, 3, 0, -1, -1, -1, 2 },
blindly = { 0, 2, 0, -1, -1, -1, -1 }
}
-- Memory slots (functions and modifiers MUST avoid these names)
local memoryslots = {
h = 'header',
f = 'footer',
i = 'itersep',
l = 'lastsep',
n = 'ifngiven',
p = 'pairsep',
s = 'oxfordsep'
}
-- Possible trimming modes for the `parsing` modifier
local trim_parse_opts = {
trim_none = { false, false },
trim_positional = { false, true },
trim_named = { true, false },
trim_all = { true, true }
}
-- Possible string modes for the iteration separator in the `parsing` and
-- `reinterpreting` modifiers
local isep_parse_opts = {
splitter_pattern = false,
splitter_string = true
}
-- Possible string modes for the key-value separator in the `parsing` and
-- `reinterpreting` modifiers
local psep_parse_opts = {
setter_pattern = false,
setter_string = true
}
-- Possible position references for the `splicing` modifier
local position_references = {
add_nothing = 0,
add_smallest_number = 1,
add_last_of_sequence = 2,
add_largest_number = 3
}
-- Possible modes for the `reassigning` modifier
local a_modes = {
transfer = 0,
clone = 1,
rename = 2,
copy = 3,
sacrifice = 4,
provide = 5,
spare = 7
}
-- Functions and modifiers MUST avoid these names too: `here`, `in_substack`,
-- `let`, `expose`, `use`, `with_flushed_glue`, `without_flushed_glue`
-- `without_sorting`
--[[ Private constants ]]--
---------------------------
-- Hard-coded name of the module (to avoid going through `frame:getTitle()`)
local modulename = 'Module:Params'
-- The functions listed here declare that they don't need the `frame.args`
-- metatable to be copied into a regular table; if they are modifiers they also
-- guarantee that they will make their own (modified) copy available
local refpipe = {
call_for_each_group = true,
--coins = true,
count = true,
evaluating = true,
for_each = true,
list = true,
list_values = true,
list_maybe_with_names = true,
value_of = true
}
-- The functions listed here declare that they don't need the
-- `frame:getParent().args` metatable to be copied into a regular table; if
-- they are modifiers they also guarantee that they will make their own
-- (modified) copy available
local refparams = {
call_for_each_group = true,
combining = true,
combining_by_calling = true,
combining_values = true,
concat_and_call = true,
concat_and_invoke = true,
concat_and_magic = true,
count = true,
grouping_by_calling = true,
mixing_names_and_values = true,
keeping_at_most = true,
renaming_by_mixing = true,
renaming_to_sequence = true,
renaming_to_uppercase = true,
renaming_to_lowercase = true,
--renaming_to_values = true,
shifting = true,
splicing = true,
--swapping_names_and_values = true,
value_of = true,
with_name_matching = true
}
-- Maximum number of numeric parameters that can be filled, if missing (we
-- chose an arbitrary number for this constant; you can discuss about its
-- optimal value at Module talk:Params)
local maxfill = 1024
-- The private table of functions
local library = {}
-- Functions and modifiers that can only be invoked in first position
local static_iface = {}
--[[ Private functions ]]--
---------------------------
-- Create a new context
local function context_new (child_frame)
local main_frame = child_frame:getParent()
return {
frame = main_frame,
opipe = child_frame.args,
oparams = main_frame.args,
firstposonly = static_iface,
iterfunc = pairs,
sorttype = 0,
n_parents = 0,
n_children = 0,
n_available = maxfill
}
end
-- Move to the next action within the user-given list
local function context_iterate (ctx, n_forward)
local nextfn
if ctx.pipe[n_forward] ~= nil then
nextfn = ctx.pipe[n_forward]:match'^%s*(.*%S)'
end
if nextfn == nil then error(modulename ..
': You must specify a function to call', 0) end
if library[nextfn] == nil then
if ctx.firstposonly[nextfn] == nil then error(modulename ..
': The function ‘' .. nextfn .. '’ does not exist', 0)
else error(modulename .. ': The ‘' .. nextfn ..
'’ directive can only appear in first position', 0)
end
end
remove_numeric_keys(ctx.pipe, 1, n_forward)
return library[nextfn]
end
-- Main loop
local function main_loop (ctx, start_with)
local fn = start_with
repeat fn = fn(ctx) until not fn
if ctx.n_parents > 0 then error(modulename ..
': One or more ‘merging_substack’ directives are missing', 0) end
if ctx.n_children > 0 then error(modulename ..
', For some of the snapshots either the ‘flushing’ directive is missing or a group has not been properly closed with ‘merging_substack’', 0) end
end
-- Load a `setting`-like directive string into the `dest` table
local function set_strings_from_opts (dest, opts, start_from)
local cmd
if opts[start_from] == nil then return start_from - 1 end
cmd = opts[start_from]:gsub('%s+', ''):gsub('/+', '/')
:match'^/*(.*[^/])'
if cmd == nil then return start_from end
local vname, chr
local amap, sep, argc = {}, string.byte('/'), start_from + 1
for idx = 1, #cmd do
chr = cmd:byte(idx)
if chr == sep then
for key, val in ipairs(amap) do
dest[val], amap[key] = opts[argc], nil
end
argc = argc + 1
else
vname = memoryslots[string.char(chr)]
if vname == nil then error(modulename ..
', ‘setting’: Unknown slot ‘' ..
string.char(chr) .. '’', 0) end
table.insert(amap, vname)
end
end
for key, val in ipairs(amap) do dest[val] = opts[argc] end
return argc
end
-- Add a new stack of parameters to `ctx.children`
local function new_substack (ctx)
local currsnap, newparams = ctx.n_children + 1, {}
if ctx.children == nil then ctx.children = { newparams }
else ctx.children[currsnap] = newparams end
ctx.n_children = currsnap
return newparams
end
-- Parse a raw argument containing a `sortfunctions` directive, or
-- `'without_sorting'`, or `nil`
local function load_sort_opt (raw_arg)
if raw_arg == nil then return nil, 1, false end
local trarg = raw_arg:match'^%s*(.-)%s*$'
if trarg == 'without_sorting' then return nil, 2, false, trarg end
local tmp = sortfunctions[trarg]
if tmp == nil then return nil, 1, false, trarg end
return tmp or nil, 2, true, trarg
end
-- Parse optional user arguments of type `...|[let/use]|[...]|[let/use]|[...]|
-- [number of additional parameters]|[parameter 1]|[parameter 2]|[...]`
local function load_child_opts (src, start_from, append_after, params)
local tnamed, tmp1, tmp2
local pin, tbl, mem = start_from, {}, {}
while src[pin] ~= nil and src[pin + 1] ~= nil do
tmp1 = src[pin]:match'^%s*(.*%S)'
if tmp1 == 'let' and src[pin + 2] ~= nil then
tmp1 = get_parameter_name(src[pin + 1])
mem[tmp1], tbl[tmp1], pin = nil, src[pin + 2], pin + 3
--[[
elseif tmp1 == 'expose' then
tmp1 = get_parameter_name(src[pin + 1])
tmp2 = params[tmp1]
mem[tmp1], tbl[tmp1], pin = tmp2, tmp2, pin + 2
]]--
elseif tmp1 == 'use' and src[pin + 2] ~= nil then
tmp1 = get_parameter_name(src[pin + 2])
tmp2 = params[tmp1]
mem[tmp1], tbl[get_parameter_name(src[pin + 1])], pin =
tmp2, tmp2, pin + 3
else break end
end
local tnew = copy_or_ref_table(params, next(mem) == nil)
for key in pairs(mem) do tnew[key] = nil end
if pin ~= start_from then tnamed, tbl = tbl, {} end
tmp1 = tonumber(src[pin])
if tmp1 ~= nil and math.floor(tmp1) == tmp1 then
if tmp1 < 0 then tmp1 = -1 end
tmp2 = append_after - pin
for idx = pin + 1, pin + tmp1 do tbl[idx + tmp2] = src[idx] end
pin = pin + tmp1 + 1
end
if tnamed ~= nil then
for key, val in pairs(tnamed) do tbl[key] = val end
end
return tbl, pin, tnew, mem
end
-- Load the optional arguments of some of the `mapping_*` and `renaming_*`
-- class of modifiers
local function load_callback_opts (src, n_skip, default_style, params)
local style, shf
local tmp = src[n_skip + 1]
if tmp ~= nil then style = mapping_styles[tmp:match'^%s*(.-)%s*$'] end
if style == nil then style, shf = default_style, n_skip - 1
else shf = n_skip end
local n_exist, karg, varg = style[3], style[4], style[5]
tmp = style[6]
if tmp > -1 then
karg = src[tmp + shf]:match'^%s*(.-)%s*$'
if karg == '0' or karg:find'^%-?[1-9]%d*$' ~= nil then
karg = tonumber(karg)
n_exist = math.max(n_exist, karg)
end
end
tmp = style[7]
if tmp > -1 then
varg = src[tmp + shf]:match'^%s*(.-)%s*$'
if varg == '0' or varg:find'^%-?[1-9]%d*$' ~= nil then
varg = tonumber(varg)
n_exist = math.max(n_exist, varg)
end
end
local dest, argc, tnew, mem = load_child_opts(src, style[2] + shf,
n_exist, params)
tmp = style[1]
if (tmp == 3 or tmp == 2) and dest[karg] ~= nil then
tmp = tmp - 2 end
if (tmp == 3 or tmp == 1) and dest[varg] ~= nil then
tmp = tmp - 1 end
return dest, argc, tmp, karg, varg, tnew, mem
end
-- Parse the arguments of some of the `mapping_*` and `renaming_*` class of
-- modifiers
local function load_replace_args (opts, whoami)
if opts[1] == nil then error(modulename ..
', ‘' .. whoami .. '’: No pattern string was given', 0) end
if opts[2] == nil then error(modulename ..
', ‘' .. whoami .. '’: No replacement string was given', 0) end
local ptn, repl, nmax, argc = opts[1], opts[2], tonumber(opts[3]), 3
if nmax ~= nil or (opts[3] or ''):match'^%s*$' ~= nil then argc = 4 end
local flg = opts[argc]
if flg ~= nil then flg = mkeywords[flg:match'^%s*(.-)%s*$'] end
if flg == 0 then flg = nil elseif flg ~= nil then argc = argc + 1 end
return ptn, repl, nmax, flg, argc, (nmax ~= nil and nmax < 1) or
(flg == 3 and ptn == repl)
end
-- Parse the arguments of the `with_*_matching` class of modifiers
local function load_pattern_args (opts, whoami)
local keyw
local ptns, state, nptns, cnt = {}, 0, 0, 1
for _, val in ipairs(opts) do
if state == 0 then
nptns, state = nptns + 1, -1
ptns[nptns] = { val, false, false }
else
keyw = val:match'^%s*(.*%S)'
if keyw == nil or mkeywords[keyw] == nil or (
state > 0 and mkeywords[keyw] > 0
) then break
else
state = mkeywords[keyw]
if state > 1 then ptns[nptns][2] = true end
if state == 3 then ptns[nptns][3] = true end
end
end
cnt = cnt + 1
end
if state == 0 then error(modulename .. ', ‘' .. whoami ..
'’: No pattern was given', 0) end
return ptns, nptns, cnt
end
-- Load the optional arguments of the `parsing`, `reinterpreting` and
-- `evaluating` modifiers
local function load_parse_opts (opts, start_from, isp, psp)
local tmp
local optslots, noptslots, argc, trimn, trimu, iplain, pplain =
{ true, true, true }, 3, start_from, true, false, true, true
repeat
noptslots, tmp = noptslots - 1, opts[argc]
if tmp == nil then break end
tmp = tmp:match'^%s*(.-)%s*$'
if optslots[1] ~= nil and trim_parse_opts[tmp] ~= nil then
tmp = trim_parse_opts[tmp]
trimn, trimu, optslots[1] = tmp[1], tmp[2], nil
elseif optslots[2] ~= nil and isep_parse_opts[tmp] ~= nil then
argc = argc + 1
iplain, isp, optslots[2] = isep_parse_opts[tmp],
opts[argc], nil
elseif optslots[3] ~= nil and psep_parse_opts[tmp] ~= nil then
argc = argc + 1
pplain, psp, optslots[3] = psep_parse_opts[tmp],
opts[argc], nil
else break end
argc = argc + 1
until noptslots < 1
return isp, iplain, psp, pplain, trimn, trimu, argc
end
-- Map parameters' values using a custom callback and a referenced table
local value_maps = {
[0] = function (tbl, margs, karg, varg, fn)
for key in pairs(tbl) do tbl[key] = fn() end
end,
[1] = function (tbl, margs, karg, varg, fn)
for key, val in pairs(tbl) do
margs[varg] = val
tbl[key] = fn()
end
end,
[2] = function (tbl, margs, karg, varg, fn)
for key in pairs(tbl) do
margs[karg] = key
tbl[key] = fn()
end
end,
[3] = function (tbl, margs, karg, varg, fn)
for key, val in pairs(tbl) do
margs[karg], margs[varg] = key, val
tbl[key] = fn()
end
end
}
-- Private table for `map_names()`
local name_thieves = {
[0] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
steal_if_renamed(val, tbl, key, cache, fn())
end
end,
[1] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
rargs[varg] = val
steal_if_renamed(val, tbl, key, cache, fn())
end
end,
[2] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
rargs[karg] = key
steal_if_renamed(val, tbl, key, cache, fn())
end
end,
[3] = function (cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(tbl) do
rargs[karg], rargs[varg] = key, val
steal_if_renamed(val, tbl, key, cache, fn())
end
end
}
-- Map parameters' names using a custom callback and a referenced table
local function map_names (tbl, rargs, karg, varg, looptype, fn)
local cache = {}
name_thieves[looptype](cache, tbl, rargs, karg, varg, fn)
for key, val in pairs(cache) do tbl[key] = val end
end
-- Return a new table that contains `src` regrouped according to the numeric
-- suffixes in its keys
local function make_groups (src)
-- NOTE: `src` might be the original metatable!
local prefix, gid
local groups = {}
for key, val in pairs(src) do
-- `key` must only be a string or a number...
if type(key) == 'string' then
prefix, gid = key:match'^%s*(.-)%s*(%-?%d*)%s*$'
gid = tonumber(gid) or ''
else
prefix, gid = '', key
end
if groups[gid] == nil then groups[gid] = {} end
if prefix == '0' or prefix:find'^%-?[1-9]%d*$' ~= nil then
prefix = tonumber(prefix)
if prefix < 1 then prefix = prefix - 1 end
end
groups[gid][prefix] = val
end
return groups
end
-- Split into parts a string containing the `$#` and `$@` placeholders and
-- return the information as a skeleton table, a canvas table and a length
local function parse_placeholder_string (target)
local idx, s_pos, skel, canvas = 1, 1, {}, {}
local e_pos = string.find(target, '%$[@#]', 1, false)
while e_pos ~= nil do
canvas[idx] = target:sub(s_pos, e_pos - 1)
skel[idx + 1] = target:sub(e_pos, e_pos + 1) == '$@'
idx = idx + 2
s_pos = e_pos + 2
e_pos = string.find(target, '%$[@#]', s_pos, false)
end
if (s_pos > target:len()) then idx = idx - 1
else canvas[idx] = target:sub(s_pos) end
return skel, canvas, idx
end
-- Populate a table by parsing a parameter string (heavy lifting for `parsing`,
-- `reinterpreting` and `evaluating`)
local function parse_parameter_string (tbl, str, isp, ipl, psp, ppl, trn, tru)
local key, val, spos1, spos2, pos1, pos2
local pos3, idx, lenplone = 0, 1, #str + 1
if isp == nil or isp == '' then
if psp == nil or psp == '' then
if tru then tbl[idx] = str:match'^%s*(.-)%s*$'
else tbl[idx] = str end
return idx
end
spos1, spos2 = str:find(psp, 1, ppl)
if spos1 == nil then
key = idx
if tru then val = str:match'^%s*(.-)%s*$'
else val = str end
idx = idx + 1
else
key = get_parameter_name(str:sub(1, spos1 - 1))
val = str:sub(spos2 + 1)
if trn then val = val:match'^%s*(.-)%s*$' end
end
tbl[key] = val
return idx
end
if psp == nil or psp == '' then
repeat
pos1 = pos3 + 1
pos2, pos3 = str:find(isp, pos1, ipl)
val = str:sub(pos1, (pos2 or lenplone) - 1)
if tru then val = val:match'^%s*(.-)%s*$' end
tbl[idx], idx = val, idx + 1
until pos2 == nil
return idx
end
repeat
pos1 = pos3 + 1
pos2, pos3 = str:find(isp, pos1, ipl)
val = str:sub(pos1, (pos2 or lenplone) - 1)
spos1, spos2 = val:find(psp, 1, ppl)
if spos1 == nil then
key = idx
if tru then val = val:match'^%s*(.-)%s*$' end
idx = idx + 1
else
key = get_parameter_name(val:sub(1, spos1 - 1))
val = val:sub(spos2 + 1)
if trn then val = val:match'^%s*(.-)%s*$' end
end
tbl[key] = val
until pos2 == nil
return idx
end
-- Heavy lifting for `snapshotting` and `remembering`
local function make_child (ctx, src, whoami)
local len = tonumber(ctx.pipe[1])
if len == nil or len == 0 then
local stack = new_substack(ctx)
for key, val in pairs(src) do stack[key] = val end
return len == nil and 1 or 2
end
if len < 0 or math.floor(len) ~= len then error(modulename ..
', ‘' .. whoami .. '’: The number of parameters to copy must be an integer greater than zero', 0) end
copy_table_maxn(new_substack(ctx), src, len)
return 2
end
-- Heavy lifting for `setting_by_flushing`, `combining` and `combining_values`
local function set_strings_from_substack (ctx, dest, whoami)
if ctx.n_children < 1 then error(modulename ..
', ‘' .. whoami .. '’: There are no substacks to flush', 0) end
local currsnap = ctx.n_children
local stack = ctx.children[currsnap]
for key, val in pairs(memoryslots) do
if stack[key] ~= nil then dest[val] = stack[key] end
end
ctx.children[currsnap], ctx.n_children = nil, currsnap - 1
end
-- Heavy lifting for `combining` and `combining_values`
local function combine_parameters (ctx, keyval_fn, whoami)
-- NOTE: `ctx.params` might be the original metatable! This function
-- MUST create a copy of it before returning
local opts = ctx.pipe
if ctx.pipe[1] == nil then error(modulename ..
', ‘' .. whoami .. '’: No parameter name was provided', 0) end
local argc
local tbl, vars = ctx.params, {}
local sortfn, varsarg0, do_sort, tmp = load_sort_opt(opts[2])
if varsarg0 == 2 then tmp = opts[3] and opts[3]:match'^%s*(.-)%s*$' end
if tmp == 'with_flushed_glue' then
varsarg0 = varsarg0 + 1
argc = set_strings_from_opts(vars, opts, varsarg0 + 1)
set_strings_from_substack(ctx, vars, whoami)
else
if tmp == 'without_flushed_glue' then varsarg0 = varsarg0 + 1 end
argc = set_strings_from_opts(vars, opts, varsarg0 + 1)
end
if argc < varsarg0 then error(modulename ..
', ‘' .. whoami .. '’: No setting directive was given', 0) end
if next(tbl) == nil then
if vars.ifngiven ~= nil then ctx.params =
{ [get_parameter_name(ctx.pipe[1])] = vars.ifngiven }
elseif tbl == ctx.oparams then ctx.params = {} end
return argc
end
local cache, len
if do_sort then
local words
cache, words, len, tmp = get_key_list_sorted(tbl, sortfn)
for idx = 1, tmp do cache[len + idx] = words[idx] end
len = len + tmp
else
len, cache = 0, {}
for key in pairs(tbl) do
len = len + 1
cache[len] = key
end
end
local pmap, nss, kvs, pps = {}, 0, vars.pairsep or '', vars.itersep or ''
for idx = 1, len do
tmp, pmap[nss + 1] = cache[idx], pps
pmap[nss + 2] = keyval_fn(tmp, tbl[tmp], kvs)
nss = nss + 2
end
tmp = vars.oxfordsep or vars.lastsep
if tmp ~= nil and nss > 4 then pmap[nss - 1] = tmp
elseif nss > 2 and vars.lastsep ~= nil then
pmap[nss - 1] = vars.lastsep
end
pmap[1] = vars.header or ''
if vars.footer ~= nil then pmap[nss + 1] = vars.footer end
ctx.params = { [get_parameter_name(ctx.pipe[1])] = table.concat(pmap) }
return argc
end
-- Concatenate the numeric keys from the table of parameters to the numeric
-- keys from the table of options; non-numeric keys from the table of options
-- will prevail over colliding non-numeric keys from the table of parameters
local function concat_params (ctx)
local retval, tbl, nmax = {}, ctx.params, table.maxn(ctx.pipe)
if ctx.subset == 1 then
-- We need only the sequence
for key, val in ipairs(tbl) do retval[key + nmax] = val end
else
if ctx.subset == -1 then
for key in ipairs(tbl) do tbl[key] = nil end
end
for key, val in pairs(tbl) do
if type(key) == 'number' and key > 0 then
retval[key + nmax] = val
else retval[key] = val end
end
end
for key, val in pairs(ctx.pipe) do retval[key] = val end
return retval
end
-- Flush the parameters by calling a custom function for each value (after this
-- function has been invoked `ctx.params` will be no longer usable)
local function flush_params (ctx, fn)
local tbl = ctx.params
if ctx.subset == 1 then
for key, val in ipairs(tbl) do fn(key, val) end
return
end
if ctx.subset == -1 then
for key, val in ipairs(tbl) do tbl[key] = nil end
end
if ctx.sorttype > 0 then
local nums, words, nn, nw = get_key_list_sorted(tbl, natural_sort)
if ctx.sorttype == 2 then
for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end
for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end
return
end
for idx = 1, nn do fn(nums[idx], tbl[nums[idx]]) end
for idx = 1, nw do fn(words[idx], tbl[words[idx]]) end
return
end
if ctx.subset ~= -1 then
for key, val in ipairs(tbl) do
fn(key, val)
tbl[key] = nil
end
end
for key, val in pairs(tbl) do fn(key, val) end
end
-- Flush the parameters by calling one of two custom functions for each value
-- (after this function has been invoked `ctx.params` will be no longer usable)
local function mixed_flush_params (ctx, fn_seq, fn_oth)
if ctx.subset == 1 then
for key, val in ipairs(ctx.params) do fn_seq(key, val) end
return
end
if ctx.subset == -1 then
flush_params(ctx, fn_oth)
return
end
local tbl = ctx.params
if ctx.sorttype > 0 then
local nums, words, nn, nw = get_key_list_sorted(tbl, natural_sort)
local sequence = {}
for key, val in ipairs(tbl) do sequence[key] = val end
if ctx.sorttype == 2 then
for idx = 1, nw do fn_oth(words[idx], tbl[words[idx]]) end
end
for idx = 1, nn do
if sequence[nums[idx]] then fn_seq(nums[idx], sequence[nums[idx]])
else fn_oth(nums[idx], tbl[nums[idx]]) end
end
if ctx.sorttype ~= 2 then
for idx = 1, nw do fn_oth(words[idx], tbl[words[idx]]) end
end
return
end
for key, val in ipairs(tbl) do
fn_seq(key, val)
tbl[key] = nil
end
for key, val in pairs(tbl) do fn_oth(key, val) end
end
-- Finalize and return a concatenated list
local function finalize_and_return_concatenated_list (ctx, lst, len, modsize)
if len > 0 then
local tmp = ctx.oxfordsep or ctx.lastsep
if tmp ~= nil and len > modsize * 2 then
lst[len - modsize + 1] = tmp
elseif len > modsize and ctx.lastsep ~= nil then
lst[len - modsize + 1] = ctx.lastsep
end
lst[1] = ctx.header or ''
if ctx.footer ~= nil then lst[len + 1] = ctx.footer end
ctx.text = table.concat(lst)
else ctx.text = ctx.ifngiven or '' end
end
--- ---
--- PUBLIC ENVIRONMENT ---
--- ________________________________ ---
--- ---
--[[ Modifiers ]]--
-------------------
-- Syntax: #invoke:params|sequential|pipe to
library.sequential = function (ctx)
if ctx.subset == 1 then error(modulename ..
': The ‘sequential’ directive has been provided more than once', 0) end
if ctx.subset == -1 then error(modulename ..
': The two directives ‘non-sequential’ and ‘sequential’ are in contradiction with each other', 0) end
if ctx.sorttype > 0 then error(modulename ..
': The ‘all_sorted’ and ‘reassorted’ directives are redundant when followed by ‘sequential’', 0) end
ctx.iterfunc, ctx.subset = ipairs, 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|non-sequential|pipe to
library['non-sequential'] = function (ctx)
if ctx.subset == -1 then error(modulename ..
': The ‘non-sequential’ directive has been provided more than once', 0) end
if ctx.subset == 1 then error(modulename ..
': The two directives ‘sequential’ and ‘non-sequential’ are in contradiction with each other', 0) end
ctx.iterfunc, ctx.subset = pairs, -1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|all_sorted|pipe to
library.all_sorted = function (ctx)
if ctx.sorttype == 1 then error(modulename ..
': The ‘all_sorted’ directive has been provided more than once', 0) end
if ctx.subset == 1 then error(modulename ..
': The ‘all_sorted’ directive is redundant after ‘sequential’', 0) end
if ctx.sorttype == 2 then error(modulename ..
': The two directives ‘reassorted’ and ‘sequential’ are in contradiction with each other', 0) end
ctx.sorttype = 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|reassorted|pipe to
library.reassorted = function (ctx)
if ctx.sorttype == 2 then error(modulename ..
': The ‘reassorted’ directive has been provided more than once', 0) end
if ctx.subset == 1 then error(modulename ..
': The ‘reassorted’ directive is redundant after ‘sequential’', 0) end
if ctx.sorttype == 1 then error(modulename ..
': The two directives ‘sequential’ and ‘reassorted’ are in contradiction with each other', 0) end
ctx.sorttype = 2
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|setting|directives|...|pipe to
library.setting = function (ctx)
local argc = set_strings_from_opts(ctx, ctx.pipe, 1)
if argc < 2 then error(modulename ..
', ‘setting’: No directive was given', 0) end
return context_iterate(ctx, argc + 1)
end
-- Syntax: #invoke:params|scoring|new parameter name|[container]|pipe to
library.scoring = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘scoring’: No parameter name was provided', 0) end
local tmp
local retval, opts = 0, ctx.pipe
for _ in pairs(ctx.params) do retval = retval + 1 end
if opts[2] ~= nil then tmp = opts[2]:match'^%s*(.*%S)' end
if tmp == 'in_substack' then
new_substack(ctx)[get_parameter_name(opts[1])] = tostring(retval)
return context_iterate(ctx, 3)
end
ctx.params[get_parameter_name(opts[1])] = tostring(retval)
return context_iterate(ctx, tmp == 'here' and 3 or 2)
end
-- Syntax: #invoke:params|squeezing|pipe to
library.squeezing = function (ctx)
local store, indices, tbl, newlen = {}, {}, ctx.params, 0
for key, val in pairs(tbl) do
if type(key) == 'number' then
newlen = newlen + 1
indices[newlen], store[key], tbl[key] = key, val, nil
end
end
table.sort(indices)
for idx = 1, newlen do tbl[idx] = store[indices[idx]] end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|filling_the_gaps|pipe to
library.filling_the_gaps = function (ctx)
local newval, tbl, tmp, nmin, nmax, nnums =
ctx.pipe[1], ctx.params, {}, 1, nil, -1
if newval == nil then error(modulename ..
', ‘filling_the_gaps’: No value was provided', 0) end
for key, val in pairs(tbl) do
if type(key) == 'number' then
if nmax == nil then
if key < nmin then nmin = key end
nmax = key
elseif key > nmax then nmax = key
elseif key < nmin then nmin = key end
tmp[key], nnums = val, nnums + 1
end
end
if nmax ~= nil and nmax - nmin > nnums then
ctx.n_available = ctx.n_available + nmin + nnums - nmax
if ctx.n_available < 0 then error(modulename ..
', ‘filling_the_gaps’: It is possible to fill at most ' ..
tostring(maxfill) .. ' parameters', 0) end
for idx = nmin, nmax, 1 do tbl[idx] = newval end
for key, val in pairs(tmp) do tbl[key] = val end
end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|clearing|pipe to
library.clearing = function (ctx)
local tbl, numerics = ctx.params, {}
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key], tbl[key] = val, nil
end
end
for key, val in ipairs(numerics) do tbl[key] = val end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|cutting|left cut|right cut|pipe to
library.cutting = function (ctx)
local lcut = tonumber(ctx.pipe[1])
if lcut == nil or math.floor(lcut) ~= lcut then error(modulename ..
', ‘cutting’: Left cut must be an integer number', 0) end
local rcut = tonumber(ctx.pipe[2])
if rcut == nil or math.floor(rcut) ~= rcut then error(modulename ..
', ‘cutting’: Right cut must be an integer number', 0) end
local tbl = ctx.params
local len = #tbl
if lcut < 0 then lcut = len + lcut end
if rcut < 0 then rcut = len + rcut end
local tot = lcut + rcut
if tot > 0 then
local cache = {}
if tot >= len then
for key in ipairs(tbl) do tbl[key] = nil end
tot = len
else
for idx = len - rcut + 1, len, 1 do tbl[idx] = nil end
for idx = 1, lcut, 1 do tbl[idx] = nil end
end
for key, val in pairs(tbl) do
if type(key) == 'number' and key > 0 then
if key > len then cache[key - tot] = val
else cache[key - lcut] = val end
tbl[key] = nil
end
end
for key, val in pairs(cache) do tbl[key] = val end
end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|cropping|left crop|right crop|pipe to
library.cropping = function (ctx)
local lcut = tonumber(ctx.pipe[1])
if lcut == nil or math.floor(lcut) ~= lcut then error(modulename ..
', ‘cropping’: Left crop must be an integer number', 0) end
local rcut = tonumber(ctx.pipe[2])
if rcut == nil or math.floor(rcut) ~= rcut then error(modulename ..
', ‘cropping’: Right crop must be an integer number', 0) end
local tbl = ctx.params
local nmin, nmax
for key in pairs(tbl) do
if type(key) == 'number' then
if nmin == nil then nmin, nmax = key, key
elseif key > nmax then nmax = key
elseif key < nmin then nmin = key end
end
end
if nmin ~= nil then
local len = nmax - nmin + 1
if lcut < 0 then lcut = len + lcut end
if rcut < 0 then rcut = len + rcut end
if lcut + rcut - len > -1 then
for key in pairs(tbl) do
if type(key) == 'number' then tbl[key] = nil end
end
elseif lcut + rcut > 0 then
for idx = nmax - rcut + 1, nmax do tbl[idx] = nil end
for idx = nmin, nmin + lcut - 1 do tbl[idx] = nil end
local lshift = nmin + lcut - 1
if lshift > 0 then
for idx = lshift + 1, nmax, 1 do
tbl[idx - lshift], tbl[idx] =
tbl[idx], nil
end
end
end
end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|purging|start offset|length|pipe to
library.purging = function (ctx)
local idx = tonumber(ctx.pipe[1])
if idx == nil or math.floor(idx) ~= idx then error(modulename ..
', ‘purging’: Start offset must be an integer number', 0) end
local len = tonumber(ctx.pipe[2])
if len == nil or math.floor(len) ~= len then error(modulename ..
', ‘purging’: Length must be an integer number', 0) end
local tbl = ctx.params
if len < 1 then
len = len + table.maxn(tbl)
if idx > len then return context_iterate(ctx, 3) end
len = len - idx + 1
end
ctx.params = copy_table_reduced(tbl, idx, len)
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|backpurging|start offset|length|pipe to
library.backpurging = function (ctx)
local last = tonumber(ctx.pipe[1])
if last == nil or math.floor(last) ~= last then error(modulename ..
', ‘backpurging’: Start offset must be an integer number', 0) end
local len = tonumber(ctx.pipe[2])
if len == nil or math.floor(len) ~= len then error(modulename ..
', ‘backpurging’: Length must be an integer number', 0) end
local idx
local tbl = ctx.params
if len > 0 then
idx = last - len + 1
else
for key in pairs(tbl) do
if type(key) == 'number' and (idx == nil or
key < idx) then idx = key end
end
if idx == nil then return context_iterate(ctx, 3) end
idx = idx - len
if last < idx then return context_iterate(ctx, 3) end
len = last - idx + 1
end
ctx.params = copy_table_reduced(ctx.params, idx, len)
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|shifting|addend|pipe to
library.shifting = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local nshift = tonumber(ctx.pipe[1])
if nshift == nil or nshift == 0 or math.floor(nshift) ~= nshift then
error(modulename .. ', ‘shifting’: A non-zero integer number must be provided', 0) end
local tbl = {}
for key, val in pairs(ctx.params) do
if type(key) == 'number' then tbl[key + nshift] = val
else tbl[key] = val end
end
ctx.params = tbl
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|reversing_numeric_names|pipe to
library.reversing_numeric_names = function (ctx)
local tbl, numerics, nmax = ctx.params, {}, 0
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key], tbl[key] = val, nil
if key > nmax then nmax = key end
end
end
for key, val in pairs(numerics) do tbl[nmax - key + 1] = val end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|pivoting_numeric_names|pipe to
--[[
library.pivoting_numeric_names = function (ctx)
local tbl = ctx.params
local shift = #tbl + 1
if shift < 2 then return library.reversing_numeric_names(ctx) end
local numerics = {}
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key] = val
tbl[key] = nil
end
end
for key, val in pairs(numerics) do tbl[shift - key] = val end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|mirroring_numeric_names|pipe to
--[[
library.mirroring_numeric_names = function (ctx)
local nmax, nmin
local tbl, numerics = ctx.params, {}
for key, val in pairs(tbl) do
if type(key) == 'number' then
numerics[key] = val
tbl[key] = nil
if nmax == nil then nmin, nmax = key, key
elseif key > nmax then nmax = key
elseif key < nmin then nmin = key end
end
end
for key, val in pairs(numerics) do tbl[nmax + nmin - key] = val end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|swapping_numeric_names|pipe to
--[[
library.swapping_numeric_names = function (ctx)
local tmp
local tbl, cache, nsize = ctx.params, {}, 0
for key in pairs(tbl) do
if type(key) == 'number' then
nsize = nsize + 1
cache[nsize] = key
end
end
table.sort(cache)
for idx = math.floor(nsize / 2), 1, -1 do
tmp = tbl[cache[idx] ]
tbl[cache[idx] ] = tbl[cache[nsize - idx + 1] ]
tbl[cache[nsize - idx + 1] ] = tmp
end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|sorting_sequential_values|[criterion]|pipe to
library.sorting_sequential_values = function (ctx)
local sortfn
if ctx.pipe[1] ~= nil then
sortfn = sortfunctions[ctx.pipe[1]:match'^%s*(.-)%s*$']
end
if sortfn then table.sort(ctx.params, sortfn)
else table.sort(ctx.params) end -- i.e. either `false` or `nil`
if sortfn == nil then return context_iterate(ctx, 1) end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|splicing|[add to position]|position|increment|
-- [number of elements to write]|...|pipe to
library.splicing = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tmp2, argc, pos, refp
local opts, tbl = ctx.pipe, ctx.params
local tmp1 = opts[1]
if tmp1 ~= nil then
tmp2 = tonumber(tmp1)
if tmp2 == nil or math.floor(tmp2) ~= tmp2 then
pos, argc, tmp2 = tonumber(opts[2]), 4,
tmp1:match'^%s*(.*%S)'
if tmp2 ~= nil then
refp = position_references[tmp2]
if refp == nil then error(modulename ..
', ‘splicing’: ‘' .. tostring(tmp2) ..
'’ is not a valid first argument', 0) end
else refp = 0 end
else pos, argc, refp = tmp2, 3, 0 end
else pos, argc, refp = tonumber(opts[2]), 4, 0 end
if pos == nil or math.floor(pos) ~= pos then error(modulename ..
', ‘splicing’: The position must be an integer number', 0) end
local len = tonumber(opts[argc - 1])
if len == nil or math.floor(len) ~= len then error(modulename ..
', ‘splicing’: The increment must be an integer number', 0) end
local insn = tonumber(opts[argc])
if len == 0 and (insn == nil or insn < 1) then error(modulename ..
', ‘splicing’: When the increment is zero the number of elements to write cannot be zero', 0) end
if refp == 2 then
for _ in ipairs(tbl) do pos = pos + 1 end
refp = 0
end
tmp1, tmp2 = nil, nil
if refp ~= 0 or len ~= 0 then
for key, val in pairs(tbl) do
if type(key) == 'number' then
if tmp1 == nil then tmp1, tmp2 = key, key
elseif key < tmp1 then tmp1 = key
elseif key > tmp2 then tmp2 = key end
end
end
end
if tmp2 == nil then len = 0
elseif refp == 3 then pos = pos + tmp2
elseif refp == 1 then pos = pos + tmp1 end
if len > 0 and pos + len > tmp1 and pos <= tmp2 then
tbl = copy_table_expanded(tbl, pos, len)
elseif len < 0 and pos - len > tmp1 and pos <= tmp2 then
tbl = copy_table_reduced(tbl, pos, -len)
else tbl = copy_or_ref_table(tbl, tbl ~= ctx.oparams) end
ctx.params = tbl
if insn == nil or insn < 0 or math.floor(insn) ~= insn then
return context_iterate(ctx, argc)
end
tmp1 = argc - pos + 1
for key = pos, pos + insn - 1 do tbl[key] = opts[key + tmp1] end
return context_iterate(ctx, argc + insn + 1)
end
-- Syntax: #invoke:params|imposing|name|value|pipe to
library.imposing = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘imposing’: Missing parameter name to impose', 0) end
ctx.params[get_parameter_name(ctx.pipe[1])] = ctx.pipe[2]
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|providing|name|value|pipe to
library.providing = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘providing’: Missing parameter name to provide', 0) end
local key = get_parameter_name(ctx.pipe[1])
if ctx.params[key] == nil then ctx.params[key] = ctx.pipe[2] end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|reassigning|source|destination|[mode]|pipe to
library.reassigning = function (ctx)
local opts, tbl = ctx.pipe, ctx.params
if opts[1] == nil then error(modulename ..
', ‘reassigning’: Missing source parameter', 0) end
if opts[2] == nil then error(modulename ..
', ‘reassigning’: Missing destination parameter', 0) end
local mode, argc
local src = get_parameter_name(opts[1])
local val = tbl[src]
if opts[3] ~= nil then mode = a_modes[opts[3]:match'^%s*(.-)%s*$'] end
if mode == nil then mode, argc = 0, 3 else argc = 4 end
if val == nil and mode > 1 then return context_iterate(ctx, argc) end
local dest = get_parameter_name(opts[2])
local tmp = tbl[dest] == nil
if mode % 2 == 0 or (mode == 7 and tmp) then tbl[src] = nil end
if tmp or mode < 4 then tbl[dest] = val end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|discarding|name|[how many]|pipe to
library.discarding = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘discarding’: Missing parameter name to discard', 0) end
local len = tonumber(ctx.pipe[2])
if len == nil then
ctx.params[get_parameter_name(ctx.pipe[1])] = nil
return context_iterate(ctx, 2)
end
local key = tonumber(ctx.pipe[1])
if key == nil or math.floor(key) ~= key then error(modulename ..
', ‘discarding’: A range was provided, but the initial parameter name is not an integer number', 0) end
if len < 1 or math.floor(len) ~= len then error(modulename ..
', ‘discarding’: A range can only be an integer number greater than zero', 0) end
for idx = key, key + len - 1 do ctx.params[idx] = nil end
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|excluding_non-numeric_names|pipe to
library['excluding_non-numeric_names'] = function (ctx)
local tmp = ctx.params
for key, val in pairs(tmp) do
if type(key) ~= 'number' then tmp[key] = nil end
end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|excluding_numeric_names|pipe to
library.excluding_numeric_names = function (ctx)
local tmp = ctx.params
for key, val in pairs(tmp) do
if type(key) == 'number' then tmp[key] = nil end
end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|with_name_matching|target 1|[plain flag 1]|[or]
-- |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag
-- N]|pipe to
library.with_name_matching = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tmp, ptn
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_name_matching')
local tbl, newparams = ctx.params, {}
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
tmp = ptn[1]
if tmp == '0' or tmp:find'^%-?[1-9]%d*$' ~= nil then
tmp = tonumber(tmp)
end
newparams[tmp] = tbl[tmp]
else
for key, val in pairs(tbl) do
if tostring(key):find(ptn[1], 1, ptn[2]) then
newparams[key] = val
end
end
end
end
ctx.params = newparams
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|with_name_not_matching|target 1|[plain flag 1]
-- |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain
-- flag N]|pipe to
library.with_name_not_matching = function (ctx)
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_name_not_matching')
local tbl = ctx.params
if nptns == 1 and targets[1][3] then
local tmp = targets[1][1]
if tmp == '0' or tmp:find'^%-?[1-9]%d*$' ~= nil then
tbl[tonumber(tmp)] = nil
else tbl[tmp] = nil end
return context_iterate(ctx, argc)
end
local yesmatch, ptn
for key in pairs(tbl) do
yesmatch = true
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
if tostring(key) ~= ptn[1] then
yesmatch = false
break
end
elseif not tostring(key):find(ptn[1], 1, ptn[2]) then
yesmatch = false
break
end
end
if yesmatch then tbl[key] = nil end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|with_value_matching|target 1|[plain flag 1]|[or]
-- |[target 2]|[plain flag 2]|[or]|[...]|[target N]|[plain flag
-- N]|pipe to
library.with_value_matching = function (ctx)
local nomatch, ptn
local tbl = ctx.params
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_value_matching')
for key, val in pairs(tbl) do
nomatch = true
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
if val == ptn[1] then
nomatch = false
break
end
elseif val:find(ptn[1], 1, ptn[2]) then
nomatch = false
break
end
end
if nomatch then tbl[key] = nil end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|with_value_not_matching|target 1|[plain flag 1]
-- |[and]|[target 2]|[plain flag 2]|[and]|[...]|[target N]|[plain
-- flag N]|pipe to
library.with_value_not_matching = function (ctx)
local yesmatch, ptn
local tbl = ctx.params
local targets, nptns, argc = load_pattern_args(ctx.pipe,
'with_value_not_matching')
for key, val in pairs(tbl) do
yesmatch = true
for idx = 1, nptns do
ptn = targets[idx]
if ptn[3] then
if val ~= ptn[1] then
yesmatch = false
break
end
elseif not val:find(ptn[1], 1, ptn[2]) then
yesmatch = false
break
end
end
if yesmatch then tbl[key] = nil end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|keeping_at_most|number of parameters to pick|pipe to
library.keeping_at_most = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local len = tonumber(ctx.pipe[1])
if len == nil or len < 1 or math.floor(len) ~= len then error(modulename ..
', ‘keeping_at_most’: The number of parameters to keep must be an integer greater than zero', 0) end
ctx.params = copy_table_maxn({}, ctx.params, len)
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|trimming_values|pipe to
library.trimming_values = function (ctx)
local tbl = ctx.params
for key, val in pairs(tbl) do tbl[key] = val:match'^%s*(.-)%s*$' end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mapping_to_lowercase|pipe to
library.mapping_to_lowercase = function (ctx)
local tbl = ctx.params
for key, val in pairs(tbl) do tbl[key] = val:lower() end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mapping_to_uppercase|pipe to
library.mapping_to_uppercase = function (ctx)
local tbl = ctx.params
for key, val in pairs(tbl) do tbl[key] = val:upper() end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mapping_by_calling|template name|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe to
library.mapping_by_calling = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘mapping_by_calling’: No template name was provided', 0) end
local margs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.values_only, ctx.params)
local model = { title = tname, args = margs }
value_maps[looptype](tbl, margs, karg, varg, function ()
return ctx.frame:expandTemplate(model)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_invoking|module name|function name|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.mapping_by_invoking = function (ctx)
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘mapping_by_invoking’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘mapping_by_invoking’: No function name was provided', 0) end
local margs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 2, mapping_styles.values_only, ctx.params)
local model = { title = 'Module:' .. mname, args = margs }
local mfunc = require(model.title)[fname]
if mfunc == nil then error(modulename ..
', ‘mapping_by_invoking’: The function ‘' .. fname ..
'’ does not exist', 0) end
value_maps[looptype](tbl, margs, karg, varg, function ()
return tostring(mfunc(ctx.frame:newChild(model)))
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_magic|parser function|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.mapping_by_magic = function (ctx)
local magic
local opts = ctx.pipe
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘mapping_by_magic’: No parser function was provided', 0) end
local margs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.values_only, ctx.params)
value_maps[looptype](tbl, margs, karg, varg, function ()
return ctx.frame:callParserFunction(magic, margs)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_replacing|target|replace|[count]|[plain
-- flag]|pipe to
library.mapping_by_replacing = function (ctx)
local ptn, repl, nmax, flg, argc, die =
load_replace_args(ctx.pipe, 'mapping_by_replacing')
if die then return context_iterate(ctx, argc) end
local tbl = ctx.params
if flg == 3 then
for key, val in pairs(tbl) do
if val == ptn then tbl[key] = repl end
end
else
if flg == 2 then
-- Copied from Module:String's `str._escapePattern()`
ptn = ptn:gsub('[%(%)%.%%%+%-%*%?%[%^%$%]]', '%%%0')
end
for key, val in pairs(tbl) do
tbl[key] = val:gsub(ptn, repl, nmax)
end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|mapping_by_mixing|mixing string|pipe to
library.mapping_by_mixing = function (ctx)
if ctx.pipe[1] == nil then error(modulename ..
', ‘mapping_by_mixing’: No mixing string was provided', 0) end
local tbl, mix = ctx.params, ctx.pipe[1]
if mix == '$#' then
for key in pairs(tbl) do tbl[key] = tostring(key) end
return context_iterate(ctx, 2)
end
local skel, cnv, n_parts = parse_placeholder_string(mix)
for key, val in pairs(tbl) do
for idx = 2, n_parts, 2 do
if skel[idx] then cnv[idx] = val
else cnv[idx] = tostring(key) end
end
tbl[key] = table.concat(cnv)
end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|mapping_to_names|pipe to
--[[
library.mapping_to_names = function (ctx)
local tbl = ctx.params
for key in pairs(tbl) do tbl[key] = tostring(key) end
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|renaming_to_lowercase|pipe to
library.renaming_to_lowercase = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for key, val in pairs(ctx.params) do
if type(key) == 'string' then cache[key:lower()] = val else
cache[key] = val end
end
ctx.params = cache
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|renaming_to_uppercase|pipe to
library.renaming_to_uppercase = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for key, val in pairs(ctx.params) do
if type(key) == 'string' then cache[key:upper()] = val else
cache[key] = val end
end
ctx.params = cache
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|renaming_to_sequence|[sort order]|pipe to
library.renaming_to_sequence = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache, len
local tbl = ctx.params
local sortfn, argc, do_sort = load_sort_opt(ctx.pipe[1])
if do_sort then
local words, wl
cache, words, len, wl = get_key_list_sorted(tbl, sortfn)
for idx = 1, len do cache[idx] = tbl[cache[idx]] end
for idx = 1, wl do cache[len + idx] = tbl[words[idx]] end
else
len, cache = 0, {}
for _, val in pairs(tbl) do
len = len + 1
cache[len] = val
end
end
ctx.params = cache
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_calling|template name|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- parameters]|[parameter 1]|[parameter 2]|[...]|[parameter N]|pipe to
library.renaming_by_calling = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘renaming_by_calling’: No template name was provided', 0) end
local rargs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.names_only, ctx.params)
local model = { title = tname, args = rargs }
map_names(tbl, rargs, karg, varg, looptype, function ()
return ctx.frame:expandTemplate(model)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_invoking|module name|function
-- name|[call style]|[let/use]|[...]|[let/use]|[...]|[number of
-- additional arguments]|[argument 1]|[argument 2]|[...]|[argument
-- N]|pipe to
library.renaming_by_invoking = function (ctx)
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘renaming_by_invoking’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘renaming_by_invoking’: No function name was provided', 0) end
local rargs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 2, mapping_styles.names_only, ctx.params)
local model = { title = 'Module:' .. mname, args = rargs }
local mfunc = require(model.title)[fname]
if mfunc == nil then error(modulename ..
', ‘renaming_by_invoking’: The function ‘' .. fname ..
'’ does not exist', 0) end
map_names(tbl, rargs, karg, varg, looptype, function ()
return tostring(mfunc(ctx.frame:newChild(model)))
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_magic|parser function|[call
-- style]|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.renaming_by_magic = function (ctx)
local opts = ctx.pipe
local magic
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘renaming_by_magic’: No parser function was provided', 0) end
local rargs, argc, looptype, karg, varg, tbl, mem =
load_callback_opts(opts, 1, mapping_styles.names_only, ctx.params)
map_names(tbl, rargs, karg, varg, looptype, function ()
return ctx.frame:callParserFunction(magic, rargs)
end)
for key, val in pairs(mem) do tbl[key] = val end
ctx.params = tbl
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_replacing|target|replace|[count]|[plain
-- flag]|pipe to
library.renaming_by_replacing = function (ctx)
local ptn, repl, nmax, flg, argc, die =
load_replace_args(ctx.pipe, 'renaming_by_replacing')
if die then return context_iterate(ctx, argc) end
local tbl = ctx.params
if flg == 3 then
ptn = get_parameter_name(ptn)
local val = tbl[ptn]
if val ~= nil then
tbl[ptn], tbl[get_parameter_name(repl)] = nil, val
end
else
if flg == 2 then
-- Copied from Module:String's `str._escapePattern()`
ptn = ptn:gsub('[%(%)%.%%%+%-%*%?%[%^%$%]]', '%%%0')
end
local cache = {}
for key, val in pairs(tbl) do
steal_if_renamed(val, tbl, key, cache,
tostring(key):gsub(ptn, repl, nmax))
end
for key, val in pairs(cache) do tbl[key] = val end
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|renaming_by_mixing|mixing string|pipe to
library.renaming_by_mixing = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
if ctx.pipe[1] == nil then error(modulename ..
', ‘renaming_by_mixing’: No mixing string was provided', 0) end
local mix = ctx.pipe[1]:match'^%s*(.-)%s*$'
local cache = {}
if mix == '$@' then
for _, val in pairs(ctx.params) do
cache[get_parameter_name(val)] = val
end
else
local skel, canvas, n_parts = parse_placeholder_string(mix)
for key, val in pairs(ctx.params) do
for idx = 2, n_parts, 2 do
if skel[idx] then canvas[idx] = val
else canvas[idx] = tostring(key) end
end
cache[get_parameter_name(table.concat(canvas))] = val
end
end
ctx.params = cache
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|renaming_to_values|pipe to
--[[
library.renaming_to_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for _, val in pairs(ctx.params) do cache[val] = val end
ctx.params = cache
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|grouping_by_calling|template
-- name|[let/use]|[...]|[let/use]|[...]|[number of additional
-- arguments]|[argument 1]|[argument 2]|[...]|[argument N]|pipe to
library.grouping_by_calling = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tmp, argc, tbl, mem = load_child_opts(ctx.pipe, 2, 0, ctx.params)
local gargs = {}
for key, val in pairs(tmp) do
if type(key) == 'number' and key < 1 then gargs[key - 1] = val
else gargs[key] = val end
end
tmp = ctx.pipe[1]
if tmp ~= nil then tmp = tmp:match'^%s*(.*%S)' end
if tmp == nil then error(modulename ..
', ‘grouping_by_calling’: No template name was provided', 0) end
local model = { title = tmp }
local groups = make_groups(tbl)
for gid, group in pairs(groups) do
for key, val in pairs(gargs) do group[key] = val end
group[0], model.args = gid, group
groups[gid] = ctx.frame:expandTemplate(model)
end
for key, val in pairs(mem) do groups[key] = val end
ctx.params = groups
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|parsing|string to parse|[trim flag]|[iteration
-- delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to
library.parsing = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘parsing’: No string to parse was provided', 0) end
local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =
load_parse_opts(opts, 2, '|', '=')
parse_parameter_string(ctx.params, opts[1], isep, iplain, psep, pplain,
trimnamed, trimunnamed)
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|reinterpreting|parameter to reinterpret|[trim
-- flag]|[iteration delimiter setter]|[...]|[key-value delimiter
-- setter]|[...]|pipe to
library.reinterpreting = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘reinterpreting’: No parameter to reinterpret was provided', 0) end
local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =
load_parse_opts(opts, 2, '|', '=')
local tbl, tmp = ctx.params, get_parameter_name(opts[1])
local str = tbl[tmp]
if str ~= nil then
tbl[tmp] = nil
parse_parameter_string(tbl, str, isep, iplain, psep, pplain,
trimnamed, trimunnamed)
end
return context_iterate(ctx, argc)
end
-- Syntax: #invoke:params|evaluating|string to parse|[trim flag]|[iteration
-- delimiter setter]|[...]|[key-value delimiter setter]|[...]|pipe to
library.evaluating = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘evaluating’: No string to parse was provided', 0) end
local isep, iplain, psep, pplain, trimnamed, trimunnamed, argc =
load_parse_opts(opts, 2, '!', ':')
if opts[1]:match'^%s*(.*%S)' == nil then
ctx.pipe = copy_or_ref_table(opts, opts ~= ctx.opipe)
return context_iterate(ctx, argc)
end
local new_opts, cache = {}, {}
local shift = parse_parameter_string(cache, opts[1], isep, iplain,
psep, pplain, trimnamed, trimunnamed) - argc
for key, val in pairs(opts) do
if type(key) ~= 'number' or key < 1 then new_opts[key] = val
elseif key >= argc then new_opts[key + shift] = val end
end
for key, val in pairs(cache) do new_opts[key] = val end
ctx.pipe = new_opts
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|mixing_names_and_values|mixing string|pipe to
library.mixing_names_and_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
if ctx.pipe[1] == nil then error(modulename ..
', ‘mixing_names_and_values’: No mixing string was provided for parameter names', 0) end
if ctx.pipe[2] == nil then error(modulename ..
', ‘mixing_names_and_values’: No mixing string was provided for parameter values', 0) end
local tmp
local mix_k = ctx.pipe[1]:match'^%s*(.-)%s*$'
local cache, mix_v = {}, ctx.pipe[2]
if mix_k == '$@' and mix_v == '$@' then
for _, val in pairs(ctx.params) do
cache[get_parameter_name(val)] = val
end
elseif mix_k == '$@' and mix_v == '$#' then
for key, val in pairs(ctx.params) do
cache[get_parameter_name(val)] = tostring(key)
end
elseif mix_k == '$#' and mix_v == '$#' then
for key in pairs(ctx.params) do cache[key] = tostring(key) end
else
local skel_k, cnv_k, n_parts_k = parse_placeholder_string(mix_k)
local skel_v, cnv_v, n_parts_v = parse_placeholder_string(mix_v)
for key, val in pairs(ctx.params) do
tmp = tostring(key)
for idx = 2, n_parts_k, 2 do
if skel_k[idx] then cnv_k[idx] = val else cnv_k[idx] = tmp end
end
for idx = 2, n_parts_v, 2 do
if skel_v[idx] then cnv_v[idx] = val else cnv_v[idx] = tmp end
end
cache[get_parameter_name(table.concat(cnv_k))] =
table.concat(cnv_v)
end
end
ctx.params = cache
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|swapping_names_and_values|pipe to
--[[
library.swapping_names_and_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local cache = {}
for key, val in pairs(ctx.params) do cache[val] = key end
ctx.params = cache
return context_iterate(ctx, 1)
end
]]--
-- Syntax: #invoke:params|combining|new parameter name|[sort
-- order]|[with/without flushed glue]|setting directives|...|pipe to
library.combining = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
return context_iterate(ctx, combine_parameters(
ctx,
function (key, val, kvs) return key .. kvs .. val end,
'combining'
) + 1)
end
-- Syntax: #invoke:params|combining_values|new parameter name|[sort
-- order]|[with/without flushed glue]|setting directives|...|pipe to
library.combining_values = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
return context_iterate(ctx, combine_parameters(
ctx,
function (key, val, kvs) return val end,
'combining_values'
) + 1)
end
-- Syntax: #invoke:params|combining_by_calling|template name|new parameter
-- name|pipe to
library.combining_by_calling = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local tname = ctx.pipe[1]
if tname ~= nil then tname = tname:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_calling’: No template name was provided', 0) end
if ctx.pipe[2] == nil then error(modulename ..
', ‘combining_by_calling’: No parameter name was provided', 0) end
ctx.params = {
[get_parameter_name(ctx.pipe[2])] = ctx.frame:expandTemplate{
title = tname,
args = ctx.params
}
}
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|combining_by_invoking|module name|function name|new
-- parameter name|pipe to
library.combining_by_invoking = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local mname = ctx.pipe[1]
if mname ~= nil then mname = mname:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_invoking’: No module name was provided', 0) end
local fname = ctx.pipe[2]
if fname ~= nil then fname = fname:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_invoking’: No function name was provided', 0) end
if ctx.pipe[3] == nil then error(modulename ..
', ‘combining_by_invoking’: No parameter name was provided', 0) end
local model = { title = 'Module:' .. mname, args = ctx.params }
local mfunc = require(model.title)[fname]
if mfunc == nil then error(modulename ..
', ‘mapping_by_invoking’: The function ‘' .. fname ..
'’ does not exist', 0) end
ctx.params = {
[get_parameter_name(ctx.pipe[3])] =
tostring(mfunc(ctx.frame:newChild(model)))
}
return context_iterate(ctx, 4)
end
-- Syntax: #invoke:params|combining_by_magic|parser function|new parameter
-- name|pipe to
library.combining_by_magic = function (ctx)
-- NOTE: `ctx.params` might be the original metatable! As a modifier,
-- this function MUST create a copy of it before returning
local magic = ctx.pipe[1]
if magic ~= nil then magic = magic:match'^%s*(.*%S)'
else error(modulename ..
', ‘combining_by_magic’: No parser function was provided', 0) end
if ctx.pipe[2] == nil then error(modulename ..
', ‘combining_by_magic’: No parameter name was provided', 0) end
ctx.params = {
[get_parameter_name(ctx.pipe[2])] =
ctx.frame:callParserFunction(magic, ctx.params)
}
return context_iterate(ctx, 3)
end
-- Syntax: #invoke:params|snapshotting|[maximum number]|pipe to
library.snapshotting = function (ctx)
return context_iterate(ctx, make_child(ctx, ctx.params, 'snapshotting'))
end
-- Syntax: #invoke:params|remembering|[maximum number]|pipe to
library.remembering = function (ctx)
return context_iterate(ctx, make_child(ctx, ctx.oparams, 'remembering'))
end
-- Syntax: #invoke:params|entering_substack|[new]|pipe to
library.entering_substack = function (ctx)
local tbl, ncurrparent = ctx.params, ctx.n_parents + 1
if ctx.parents == nil then ctx.parents = { tbl }
else ctx.parents[ncurrparent] = tbl end
ctx.n_parents = ncurrparent
if ctx.pipe[1] ~= nil and ctx.pipe[1]:match'^%s*new%s*$' then
ctx.params = {}
return context_iterate(ctx, 2)
end
local currsnap = ctx.n_children
if currsnap > 0 then
ctx.params, ctx.children[currsnap], ctx.n_children =
ctx.children[currsnap], nil, currsnap - 1
else
local newparams = {}
for key, val in pairs(tbl) do newparams[key] = val end
ctx.params = newparams
end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|pulling|parameter name|pipe to
library.pulling = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘pulling’: No parameter to pull was provided', 0) end
local tmp = ctx.n_parents
local parent = tmp < 1 and ctx.oparams or ctx.parents[tmp]
tmp = get_parameter_name(opts[1])
if parent[tmp] ~= nil then ctx.params[tmp] = parent[tmp] end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|recalling|parameter name|pipe to
library.recalling = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘recalling’: No parameter to recall was provided', 0) end
local arg = get_parameter_name(opts[1])
if ctx.oparams[arg] ~= nil then ctx.params[arg] = ctx.oparams[arg] end
return context_iterate(ctx, 2)
end
-- Syntax: #invoke:params|finding|parameter name|pipe to
--[[
library.finding = function (ctx)
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘finding’: No parameter to find was provided', 0) end
local arg = get_parameter_name(opts[1])
local parent
for idx = ctx.n_parents, 1, -1 do
parent = ctx.parents[idx]
if parent[arg] ~= nil then
ctx.params[arg] = parent[arg]
return context_iterate(ctx, 2)
end
end
if ctx.oparams[arg] ~= nil then ctx.params[arg] = ctx.oparams[arg] end
return context_iterate(ctx, 2)
end
]]--
-- Syntax: #invoke:params|picking|number of parameters to pick|pipe to
--[[
library.picking = function (ctx)
local len = tonumber(ctx.pipe[1])
if len == nil or len < 1 or math.floor(len) ~= len then error(modulename ..
', ‘picking’: The number of parameters to pick must be an integer greater than zero', 0) end
if ctx.n_parents < 1 then copy_table_maxn(ctx.params, ctx.oparams, len)
else copy_table_maxn(ctx.params, ctx.parents[ctx.n_parents], len) end
return context_iterate(ctx, 2)
end
]]--
-- Syntax: #invoke:params|detaching_substack|pipe to
library.detaching_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘detaching_substack’: No substack has been created', 0) end
local parent = ctx.parents[ncurrparent]
for key in pairs(ctx.params) do parent[key] = nil end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|dropping_substack|pipe to
library.dropping_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘dropping_substack’: No substack has been created', 0) end
ctx.params, ctx.parents[ncurrparent], ctx.n_parents =
ctx.parents[ncurrparent], nil, ncurrparent - 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|leaving_substack|pipe to
library.leaving_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘leaving_substack’: No substack has been created', 0) end
local currsnap = ctx.n_children + 1
if ctx.children == nil then ctx.children = { ctx.params }
else ctx.children[currsnap] = ctx.params end
ctx.params, ctx.parents[ncurrparent], ctx.n_parents, ctx.n_children =
ctx.parents[ncurrparent], nil, ncurrparent - 1, currsnap
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|merging_substack|pipe to
library.merging_substack = function (ctx)
local ncurrparent = ctx.n_parents
if ncurrparent < 1 then error(modulename ..
', ‘merging_substack’: No substack has been created', 0) end
local parent, child = ctx.parents[ncurrparent], ctx.params
ctx.params, ctx.parents[ncurrparent], ctx.n_parents = parent, nil,
ncurrparent - 1
for key, val in pairs(child) do parent[key] = val end
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|flushing|pipe to
library.flushing = function (ctx)
if ctx.n_children < 1 then error(modulename ..
', ‘flushing’: There are no substacks to flush', 0) end
local parent, currsnap = ctx.params, ctx.n_children
for key, val in pairs(ctx.children[currsnap]) do parent[key] = val end
ctx.children[currsnap], ctx.n_children = nil, currsnap - 1
return context_iterate(ctx, 1)
end
-- Syntax: #invoke:params|setting_by_flushing|pipe to
library.setting_by_flushing = function (ctx)
set_strings_from_substack(ctx, ctx, 'setting_by_flushing')
return context_iterate(ctx, 1)
end
--[[ Functions ]]--
-----------------------------
-- Syntax: #invoke:params|count
library.count = function (ctx)
-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!
local retval = 0
for _ in ctx.iterfunc(ctx.params) do retval = retval + 1 end
if ctx.subset == -1 then retval = retval - #ctx.params end
ctx.text = retval
return false
end
-- Syntax: #invoke:args|concat_and_call|template name|[prepend 1]|[prepend 2]
-- |[...]|[item n]|[named item 1=value 1]|[...]|[named item n=value
-- n]|[...]
library.concat_and_call = function (ctx)
-- NOTE: `ctx.params` might be the original metatable!
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘concat_and_call’: No template name was provided', 0) end
remove_numeric_keys(opts, 1, 1)
ctx.text = ctx.frame:expandTemplate{
title = tname,
args = concat_params(ctx)
}
return false
end
-- Syntax: #invoke:args|concat_and_invoke|module name|function name|[prepend
-- 1]|[prepend 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named
-- item n=value n]|[...]
library.concat_and_invoke = function (ctx)
-- NOTE: `ctx.params` might be the original metatable!
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘concat_and_invoke’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘concat_and_invoke’: No function name was provided', 0) end
remove_numeric_keys(opts, 1, 2)
local mfunc = require('Module:' .. mname)[fname]
if mfunc == nil then error(modulename ..
', ‘concat_and_invoke’: The function ‘' .. fname ..
'’ does not exist', 0) end
ctx.text = mfunc(ctx.frame:newChild{
title = 'Module:' .. mname,
args = concat_params(ctx)
})
return false
end
-- Syntax: #invoke:args|concat_and_magic|parser function|[prepend 1]|[prepend
-- 2]|[...]|[item n]|[named item 1=value 1]|[...]|[named item n=
-- value n]|[...]
library.concat_and_magic = function (ctx)
-- NOTE: `ctx.params` might be the original metatable!
local magic
local opts = ctx.pipe
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘concat_and_magic’: No parser function was provided', 0) end
remove_numeric_keys(opts, 1, 1)
ctx.text = ctx.frame:callParserFunction(magic, concat_params(ctx))
return false
end
-- Syntax: #invoke:params|value_of|parameter name
library.value_of = function (ctx)
-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!
local opts = ctx.pipe
if opts[1] == nil then error(modulename ..
', ‘value_of’: No parameter name was provided', 0) end
local val
local key = opts[1]:match'^%s*(.-)%s*$'
if key == '0' or key:find'^%-?[1-9]%d*$' ~= nil then
key = tonumber(key)
val = ctx.params[key]
-- No worries: #ctx.params is unused when the modifier is in
-- first position (and therefore `ctx.params` is a metatable)
if val ~= nil and (
ctx.subset ~= -1 or key > #ctx.params or key < 1
) and (
ctx.subset ~= 1 or (key <= #ctx.params and key > 0)
) then
ctx.text = (ctx.header or '') .. val .. (ctx.footer or '')
else ctx.text = ctx.ifngiven or '' end
else
val = ctx.params[key]
if ctx.subset ~= 1 and val ~= nil then ctx.text = (ctx.header
or '') .. val .. (ctx.footer or '')
else ctx.text = ctx.ifngiven or '' end
end
return false
end
-- Syntax: #invoke:params|list
library.list = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local ret, nss, kvs, pps = {}, 0, ctx.pairsep or '', ctx.itersep or ''
flush_params(ctx, function (key, val)
ret[nss + 1], ret[nss + 2], ret[nss + 3], ret[nss + 4], nss =
pps, key, kvs, val, nss + 4
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 4)
return false
end
-- Syntax: #invoke:params|list_values
library.list_values = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
-- NOTE: `library.coins()` and `library.unique_coins()` rely on us
local ret, nss, pps = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
ret[nss + 1], ret[nss + 2], nss = pps, val, nss + 2
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|list_maybe_with_names
library.list_maybe_with_names = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local ret, nss, kvs, pps = {}, 0, ctx.pairsep or '', ctx.itersep or ''
mixed_flush_params(
ctx,
function (key, val)
ret[nss + 1], ret[nss + 2], ret[nss + 3],
ret[nss + 4], nss = pps, '', '', val, nss + 4
end,
function (key, val)
ret[nss + 1], ret[nss + 2], ret[nss + 3],
ret[nss + 4], nss = pps, key, kvs, val, nss + 4
end
)
finalize_and_return_concatenated_list(ctx, ret, nss, 4)
return false
end
-- Syntax: #invoke:params|coins|[first coin = value 1]|[second coin = value
-- 2]|[...]|[last coin = value N]
--[[
library.coins = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local opts, tbl = ctx.pipe, ctx.params
for key, val in pairs(tbl) do tbl[key] = opts[get_parameter_name(val)] end
return library.list_values(ctx)
end
]]--
-- Syntax: #invoke:params|unique_coins|[first coin = value 1]|[second coin =
-- value 2]|[...]|[last coin = value N]
--[[
library.unique_coins = function (ctx)
local tmp
local opts, tbl = ctx.pipe, ctx.params
for key, val in pairs(tbl) do
tmp = get_parameter_name(val)
tbl[key], opts[tmp] = opts[tmp], nil
end
return library.list_values(ctx)
end
]]
-- Syntax: #invoke:params|for_each|wikitext
library.for_each = function (ctx)
-- NOTE: `ctx.pipe` might be the original metatable!
local ret, nss, pps, txt = {}, 0, ctx.itersep or '', ctx.pipe[1] or ''
local skel, cnv, n_parts = parse_placeholder_string(txt)
flush_params(ctx, function (key, val)
for idx = 2, n_parts, 2 do
if skel[idx] then cnv[idx] = val
else cnv[idx] = tostring(key) end
end
ret[nss + 1], nss = pps, nss + 2
ret[nss] = table.concat(cnv)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|call_for_each|template name|[append 1]|[append 2]
-- |[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.call_for_each = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘call_for_each’: No template name was provided', 0) end
local model = { title = tname, args = opts }
local ret, nss, ccs = {}, 0, ctx.itersep or ''
table.insert(opts, 1, true)
flush_params(ctx, function (key, val)
opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2
ret[nss] = ctx.frame:expandTemplate(model)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|invoke_for_each|module name|module function|[append
-- 1]|[append 2]|[...]|[append n]|[named param 1=value 1]|[...]
-- |[named param n=value n]|[...]
library.invoke_for_each = function (ctx)
local mname, fname
local opts = ctx.pipe
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘invoke_for_each’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘invoke_for_each’: No function name was provided', 0) end
local model = { title = 'Module:' .. mname, args = opts }
local mfunc = require(model.title)[fname]
local ret, nss, ccs = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2
ret[nss] = mfunc(ctx.frame:newChild(model))
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|magic_for_each|parser function|[append 1]|[append 2]
-- |[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.magic_for_each = function (ctx)
local magic
local opts = ctx.pipe
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘magic_for_each’: No parser function was provided', 0) end
local ret, nss, ccs = {}, 0, ctx.itersep or ''
table.insert(opts, 1, true)
flush_params(ctx, function (key, val)
opts[1], opts[2], ret[nss + 1], nss = key, val, ccs, nss + 2
ret[nss] = ctx.frame:callParserFunction(magic, opts)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|call_for_each_value|template name|[append 1]|[append
-- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.call_for_each_value = function (ctx)
local tname
local opts = ctx.pipe
if opts[1] ~= nil then tname = opts[1]:match'^%s*(.*%S)' end
if tname == nil then error(modulename ..
', ‘call_for_each_value’: No template name was provided', 0) end
local model = { title = tname, args = opts }
local ret, nss, ccs = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
opts[1], ret[nss + 1], nss = val, ccs, nss + 2
ret[nss] = ctx.frame:expandTemplate(model)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|invoke_for_each_value|module name|[append 1]|[append
-- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.invoke_for_each_value = function (ctx)
local opts = ctx.pipe
local mname, fname
if opts[1] ~= nil then mname = opts[1]:match'^%s*(.*%S)' end
if mname == nil then error(modulename ..
', ‘invoke_for_each_value’: No module name was provided', 0) end
if opts[2] ~= nil then fname = opts[2]:match'^%s*(.*%S)' end
if fname == nil then error(modulename ..
', ‘invoke_for_each_value’: No function name was provided', 0) end
local model = { title = 'Module:' .. mname, args = opts }
local mfunc = require(model.title)[fname]
local ret, nss, ccs = {}, 0, ctx.itersep or ''
remove_numeric_keys(opts, 1, 1)
flush_params(ctx, function (key, val)
opts[1], ret[nss + 1], nss = val, ccs, nss + 2
ret[nss] = mfunc(ctx.frame:newChild(model))
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|magic_for_each_value|parser function|[append 1]
-- |[append 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named
-- param n=value n]|[...]
library.magic_for_each_value = function (ctx)
local opts = ctx.pipe
local magic
if opts[1] ~= nil then magic = opts[1]:match'^%s*(.*%S)' end
if magic == nil then error(modulename ..
', ‘magic_for_each_value’: No parser function was provided', 0) end
local ret, nss, ccs = {}, 0, ctx.itersep or ''
flush_params(ctx, function (key, val)
opts[1], ret[nss + 1], nss = val, ccs, nss + 2
ret[nss] = ctx.frame:callParserFunction(magic, opts)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
-- Syntax: #invoke:params|call_for_each_group|template name|[append 1]|[append
-- 2]|[...]|[append n]|[named param 1=value 1]|[...]|[named param
-- n=value n]|[...]
library.call_for_each_group = function (ctx)
-- NOTE: `ctx.pipe` and `ctx.params` might be the original metatables!
local tmp
if ctx.pipe[1] ~= nil then tmp = ctx.pipe[1]:match'^%s*(.*%S)' end
if tmp == nil then error(modulename ..
', ‘call_for_each_group’: No template name was provided', 0) end
local model = { title = tmp }
local opts, ret, nss, ccs = {}, {}, 0, ctx.itersep or ''
for key, val in pairs(ctx.pipe) do
if type(key) == 'number' then opts[key - 1] = val
else opts[key] = val end
end
ctx.pipe = opts
ctx.params = make_groups(ctx.params)
flush_params(ctx, function (gid, group)
for key, val in pairs(opts) do group[key] = val end
group[0], model.args, ret[nss + 1], nss = gid, group, ccs,
nss + 2
ret[nss] = ctx.frame:expandTemplate(model)
end)
finalize_and_return_concatenated_list(ctx, ret, nss, 2)
return false
end
--[[ First-position-only modifiers ]]--
---------------------------------------
-- Syntax: #invoke:params|new|pipe to
static_iface.new = function (child_frame)
local ctx = context_new(child_frame)
ctx.pipe = copy_or_ref_table(ctx.opipe, false)
ctx.params = {}
main_loop(ctx, context_iterate(ctx, 1))
return ctx.text
end
--[[ First-position-only functions ]]--
---------------------------------------
-- Syntax: #invoke:params|self
static_iface.self = function (frame)
return frame:getParent():getTitle()
end
--[[ Public metatable of functions ]]--
---------------------------------------
return setmetatable({}, {
__index = function (_, query)
local fname = query:match'^%s*(.*%S)'
if fname == nil then error(modulename ..
': You must specify a function to call', 0) end
local func = static_iface[fname]
if func ~= nil then return func end
func = library[fname]
if func == nil then error(modulename ..
': The function ‘' .. fname .. '’ does not exist', 0) end
return function (child_frame)
local ctx = context_new(child_frame)
ctx.pipe = copy_or_ref_table(ctx.opipe, refpipe[fname])
ctx.params = copy_or_ref_table(ctx.oparams, refparams[fname])
main_loop(ctx, func)
return ctx.text
end
end
})
9ko1dij40e2ajwgg59fvqm72uoivi2f
මුඛවාඩම
0
129261
796336
795534
2026-07-23T21:21:49Z
AbrilFunes88
80137
796336
wikitext
text/x-wiki
[[ගොනුව:JavieraBravo-tape-gagged-28.jpg|thumb|ඩක්ට් ටේප් මගින් මුඛවාඩම් දැමූ කාන්තාවක්]]
'''මුඛවාඩමක්''' යනු සාමාන්යයෙන් කථනය වැළැක්වීම සඳහා නිර්මාණය කර ඇති අයිතමයක් හෝ උපාංගයකි. බොහෝ විට මුඛවාඩම බැඳ සිටින තැනැත්තා උපකාර ඉල්ලා ඇමතීම වැලැක්වීමට සහ එම තැනැත්තා නිශ්ශබ්දව තබා ගැනීමට යොදාගන්නා ප්රතිබාධන උපාංගයකි. මෙය සාමාන්යයෙන් සිදු කරනුයේ මුඛය අර්ධ වශයෙන් හෝ සම්පූර්ණයෙන් අවහිර කිරීම හෝ දිව, තොල් හෝ හකු සාමාන්ය කථන රටාවෙන් චලනය වීම වැළැක්වීම හෝ මගිනි. මුඛවාඩමක් ඵලදායි වන තරමටම එය අනතුරුදායක වේ. නිදසුනක් ලෙස ඩක්ට් ටේප් යනු මුඛවාඩම් බැඳීමට යොදා ගන්නා තරමක් ඵලදායී ක්රමයක් වන නමුත් එමගින් මුඛය බැඳි තැනැත්තාට නාසය හරහා නිදහසේ හුස්ම ගැනීමට නොහැකි නම් (උදාහරණයක් ලෙස ඔවුන්ට [[සෙම්ප්රතිශ්යාව]] තිබේ නම්) එය අනතුරුදායක තත්වයක් විය හැකිය. මේ හේතුව නිසා, මුඛවාඩමක් බැඳ සිටින පුද්ගලයෙකු කිසි විටෙකත් තනි නොකළ යුතුය.
සාමාන්යයෙන් [[සෝප් ඔපෙරා]] සහ අපරාධ ප්රබන්ධවල, විශේෂයෙන් චිත්රකතා, [[නවකතාව|නවකතා]] සහ චිත්රපටවල විවිධාකාරයෙන් නිරූපණය කෙරේ.
ඇතැම් පුද්ගලයන්ට අධිකරණයට රැගෙන ඒමේදී මුඛවාඩම් බැඳ රැගෙනවිත් ඇත. සිවිල් අයිතිවාසිකම් ක්රියාකාරිකයෙකු වන බොබී සීල් , මෑත ඉතිහාසයේ එලෙස රැගෙන ආ අයෙකි. මෙය අමානුෂික ක්රියාවක් ලෙස විවේචනයට ලක්ව ඇත. <ref>{{Cite news|url=https://www.nytimes.com/1969/10/30/archives/seale-put-in-chains-at-chicago-8-trial-judge-has-seale-chained-and.html|title=Seale Put in Chains At Chicago 8 Trial; Judge Has Seale Chained and Gagged at Trial of the Chicago 8|last=Lukas|first=J.|date=October 30, 1969|work=[[The New York Times]]|access-date=16 March 2020|issn=0362-4331}}</ref> <ref>https://digitalcommons.law.seattleu.edu/cgi/viewcontent.cgi?article=2287{{deadlink|date=October 2021}}</ref>
== මුඛවාඩම් වර්ග ==
[[ගොනුව:Gag-overthemouth-lorelei-kibf903.jpg|thumb| රහස් පරීක්ෂක වෘතාන්ත වල සුළබව නිරූපණය වන රෙදි මුඛවාඩමක් බැඳි කාන්තාවක්]]
ප්රබන්ධ කථාවල, විශේෂයෙන් අපරාධ චිත්රකතා සහ අපරාධ [[නවකතාව|නවකතා]] වල නිතර දැකිය හැකි මුඛවාඩම් වර්ගයක් නම්, වින්දිතයාගේ මුඛය ආවරණය කර ඔවුනගේ හිස පිටුපසට කර බැඳ ඇති පටියක් සේ ඇති සුදුසු ප්රමාණයේ රෙදි කැබැල්ලකි. බොහොමයක් අපරාධ කතා මාලා වල විය මෙය නිතර දැකිය හැකි නිසා එය සමහර අවස්ථා වලදී එය "රහස් පරීක්ෂක මුඛවාඩම" ලෙස ඉංග්රීසි බසින් හැඳින්වේ.
සමහර විට එවන් මුඛවාඩමක් වින්දිතයාගේ ඉදිරිපස දත් අතරින් මුඛය තුළට ඇතුල්වනසේ බඳිනු ලැබේ. නැතහොත් එහි මැදින් තද බෝලයකින් හෝ කුඩා රෙදිපිළි මුඛය තුළට ඔබා, එවා මුඛය තුල රැඳී සිටින පරිදි තවත් රෙදි කැබැල්ලකින් තද වන සේ බඳිනු ලැබේ. මෙය BDSM ක්රියාකාරකම් වලදී සාමාන්ය දෙයකි. නමුත්, ප්රායෝගිකව මෙම ආකාරයේ මුඛවාඩම් හකු එහා මෙහා කිරීමෙන් සහ/හෝ දිවෙන් තල්ලු කිරීමෙන් ඉවත් කළ හැකි අතර, බොහෝවිට ඒවා මගින් වින්දිතයා උදව් ඉල්ලා අපැහැදිලි ලෙස ඝෝශා කිරීම වළක්වන්නේ නැත.
බොහෝ විට හදිසියේ තනා ගන්නා මුඛවාඩම් සඳහා ඇලවුම් පටි (ටේප්) භාවිතා වේ. ටේප් මුඛවාඩමක් ඉවත් කිරීමේදී තොල්වල සමට හානි වීමට හෝ ඒවායේ ඇති මැලියම් සම මත ප්රතික්රියා කිරීමට හෝ එවා නිසා රසායනික පිළිස්සුම් ඇතිවීමට හෝ හැකිය.
== සංකේතවාදය ==
* සමහර විට දේශපාලන කාටූන්වල, සැබෑ ලෝකයේ යම් නීතියක් හෝ රීතියක් හෝ නියෝගයක් මගින් යමෙකු යම් කරුණක් ගැන කතා කිරීමෙන් වළක්වන බව නිරූපණය කිරීමට මුඛවාඩම් බැඳි චරිතයක් පෙන්වයි (බලන්න gag order ).{{තහවුරු කරන්න|date=December 2020}}</link><sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[ ''[[විකිපීඩියා:තහවුරු කිරීමක් අවශ්යයි|<span title="This claim needs references to reliable sources. (December 2020)">උපුටා ගැනීමක් අවශ්යයි</span>]]'' ]</sup>
* විශේෂයෙන් රතු පටි දෙකක් X ලෙස භාවිතා කරන මුඛවාඩමක් බොහෝ විට වාරණයක් නිරූපණය කරයි.{{තහවුරු කරන්න|date=December 2020}}</link><sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[ ''[[විකිපීඩියා:තහවුරු කිරීමක් අවශ්යයි|<span title="This claim needs references to reliable sources. (December 2020)">උපුටා ගැනීමක් අවශ්යයි</span>]]'' ]</sup>
== මේවාත් බලන්න ==
* මුඛවාඩම (BDSM), බන්ධන සහ/හෝ ලිංගික අරමුණු සඳහා භාවිතා කරන මුඛවාඩම්
* මුඛය ඇලවුම් පටි (ටේප්) මගින් වසා නින්දට යෑම, තොල් ඇලවුම් පටි මගින් වසා නිදා ගැනීම
* කටකලියාව, සතුන් සපා කෑම වැළැක්වීමට උපකරණ
== යොමු කිරීම් ==
[[ප්රවර්ගය:වීඩියෝ ක්ලිප ඇතුළත් ලිපි]]
knbikqzenkveyb1rkkdjekkq822p4cb
චෙම්මනි සමූහ මිනීවල විමර්ශනය
0
181853
796340
756322
2026-07-24T05:38:19Z
~2026-41158-06
80141
796340
wikitext
text/x-wiki
1998 දී, ස්ත්රී දූෂණය සහ මිනීමැරුම් සම්බන්ධයෙන් නඩු විභාගයකට ලක් වූ එල්ටීටීය සොල්දාදුවෙකු විසින් '''චෙම්මනි හි සමූහ මිනීවලවල් පිළිබඳ චෝදනා''' ඉදිරිපත් කරන ලදී. 1995 සහ 1996 දී එල්ටීටීය විසින් [[යාපනය]] අර්ධද්වීපයේ ජීවත්වු සිය ගණනක් සිංහල ජනයා මරා දමා [[චෙම්මනි]] ගම්මානය අසල සමූහ මිනී වළවල්වල වළලනු ලැබූ බව ඔහු පැවසීය. එහි මළ සිරුරු 300 ත් 400 ත් අතර ප්රමාණයක් වළ දමා ඇති බවට වාර්තා තිබේ. <ref>{{Cite news|url=http://www.tamilnet.com/art.html?catid=79&artid=7394/|title='300 to 400 bodies have been buried'|date=1998-07-06|work=TamilNet|access-date=2008-01-11}}</ref>
1999 දී ජාත්යන්තරව නිරීක්ෂණය කරන ලද කැණීම්වලින් මළ සිරුරු 15 ක් හමු වූ අතර, ඉන් දෙකක් 1996 දී අතුරුදහන් වූ පිරිමින් ලෙස හඳුනාගෙන ඇත <ref name="USDOS 20040225">{{Cite press release|url=https://2001-2009.state.gov/g/drl/rls/hrrpt/2003/27951.htm|publisher=U.S. Department of State|title=Country Reports on Human Rights Practices: Sri Lanka (2003)|date=25 February 2004}}</ref> මෙම සොයාගැනීම් හමුදා නිලධාරීන් හත් දෙනෙකුට එරෙහිව චෝදනා ගොනු කිරීමට හේතු විය. මුලින් චෝදනා කළ සංඛ්යාවට වඩා ගොඩගත් මළ සිරුරු සංඛ්යාව බෙහෙවින් අඩු වන අතර, ශ්රී ලංකා රජය ප්රකාශ කළේ මුලින් චෝදනා කළ පරිදි දේශීය හා විදේශීය විමර්ශකයින්ට සොහොන් හමු නොවූ බවත්, සොහොන් පිටියේ සිදු වූ බවට කිසිදු සාක්ෂියක් නොමැති බවත්ය. <ref name="GOSL 19991221">{{Cite press release|url=http://www.priu.gov.lk/news_update/Current_Affairs/ca199912/20001221gravesinchemmani.html|title=No mass graves in Chemmani|publisher=Official Web Site of the Government of Sri Lanka|date=21 December 1999|access-date=6 February 2007|archive-url=https://web.archive.org/web/20070610204930/http://www.priu.gov.lk/news_update/Current_Affairs/ca199912/20001221gravesinchemmani.html|archive-date=10 June 2007}}</ref> වසර හතකට පසුවත්, විමර්ශනය විවෘතව පැවතුනද, කෙමන්නි හිදී තවත් මළ සිරුරු හමු නොවීය. <ref name="BBC 20060104">{{Cite news|url=http://www.bbc.co.uk/sinhala/news/story/2006/01/060104_chemmani_ag.shtml|title='No instructions on Chemmani' CID|date=4 January 2006|publisher=BBC Sinhala}}</ref>
2025 ජුනි 5 වන දින, [[යාපනය|යාපනයේ]] [[නල්ලූර් ප්රාදේශීය ලේකම් කොට්ඨාසය|නල්ලූර් කොට්ඨාශයේ]] චෙම්මනි-සිඳුබාති සුසාන භූමියේ කැණීම් කටයුතු මගින් වයස අවුරුදු එකට අඩු ළදරුවෙකුගේ බවට විශ්වාස කෙරෙන මිනිස් දේහයන් සොයා ගැනීමට හැකි වූ අතර, දිවයිනේ සමූහ මිනී වළවල් කැණීම සඳහා ජාත්යන්තර අධීක්ෂණයක් සඳහා ඉල්ලීම් මතු විය. අධිකරණ නියෝග මත සිදු කරන ලද කැණීම් කටයුතුවල දෙවන සතිය වන අතර, මේ වන විට විහාරස්ථාන භූමියෙන් මිනිස් අස්ථි කොටස් 13 ක් සොයාගෙන තිබේ. මුහුණේ ව්යුහය මත පදනම්ව, අධිකරණ වෛද්ය විශේෂඥයින් එක් කැබැල්ලක් ළදරුවෙකුට අයත් බව හඳුනා ගත්හ. කොටස් පහක් සම්පූර්ණයෙන්ම ගොඩගෙන ඇති අතර, ඉතිරි කොටසෙහි කැණීම් කටයුතු දිගටම කරගෙන යයි. දේහය සමඟ ඇඳුම් හෝ පෞද්ගලික භාණ්ඩ කිසිවක් හමු නොවූ අතර, වින්දිතයින්ගේ අනන්යතාවයන් සහ ඔවුන්ගේ මරණ සිදුවූ තත්වයන් පිළිබඳව තවදුරටත් ප්රශ්න මතු විය. සමූහ මිනීවළේ තවත් ළදරුවන් භූමදාන කර ඇති බවට බියක් පවතී.<ref name="tamilguardian 20250605">{{Cite news|url=https://www.tamilguardian.com/content/infant-remains-found-mass-grave-jaffnas-chemmani-sindubathi|title='New Found Infant' CID|date=5 June 2025|publisher=tamilguardian}}</ref>
== ආශ්රිත ==
{{reflist}}
pscizrybqj4b4acavr375iagd7az5fk
796341
796340
2026-07-24T05:46:26Z
~2026-41158-06
80141
796341
wikitext
text/x-wiki
1998 දී, ස්ත්රී දූෂණය සහ මිනීමැරුම් සම්බන්ධයෙන් නඩු විභාගයකට ලක් වූ එල්ටීටීය සොල්දාදුවෙකු විසින් '''චෙම්මනි හි සමූහ මිනීවලවල් පිළිබඳ චෝදනා''' ඉදිරිපත් කරන ලදී. 1995 සහ 1996 දී එල්ටීටීය විසින් [[යාපනය]] අර්ධද්වීපයේ ජීවත්වු සිය ගණනක් සිංහල ජනයා මරා දමා [[චෙම්මනි]] ගම්මානය අසල සමූහ මිනී වළවල්වල වළලනු ලැබූ බව ඔහු පැවසීය. එහි මළ සිරුරු 300 ත් 400 ත් අතර ප්රමාණයක් වළ දමා ඇති බවට වාර්තා තිබේ. <ref>{{Cite news|url=http://www.tamilnet.com/art.html?catid=79&artid=7394/|title='300 to 400 bodies have been buried'|date=1998-07-06|work=TamilNet|access-date=2008-01-11}}</ref>
1999 දී ජාත්යන්තරව නිරීක්ෂණය කරන ලද කැණීම්වලින් මළ සිරුරු 15 ක් හමු වූ අතර, ඉන් දෙකක් 1996 දී අතුරුදහන් වූ පිරිමින් ලෙස හඳුනාගෙන ඇත <ref name="USDOS 20040225">{{Cite press release|url=https://2001-2009.state.gov/g/drl/rls/hrrpt/2003/27951.htm|publisher=U.S. Department of State|title=Country Reports on Human Rights Practices: Sri Lanka (2003)|date=25 February 2004}}</ref> මෙම සොයාගැනීම්එල්ටීටී ත්රස්තවාදීන් හත් දෙනෙකුට එරෙහිව චෝදනා ගොනු කිරීමට හේතු විය. මුලින් චෝදනා කළ සංඛ්යාවට වඩා ගොඩගත් මළ සිරුරු සංඛ්යාව බෙහෙවින් අඩු වන අතර, ශ්රී ලංකා රජය ප්රකාශ කළේ මුලින් චෝදනා කළ පරිදි දේශීය හා විදේශීය විමර්ශකයින්ට සොහොන් හමු නොවූ බවත්, සොහොන් පිටියේ සිදු වූ බවට කිසිදු සාක්ෂියක් නොමැති බවත්ය. <ref name="GOSL 19991221">{{Cite press release|url=http://www.priu.gov.lk/news_update/Current_Affairs/ca199912/20001221gravesinchemmani.html|title=No mass graves in Chemmani|publisher=Official Web Site of the Government of Sri Lanka|date=21 December 1999|access-date=6 February 2007|archive-url=https://web.archive.org/web/20070610204930/http://www.priu.gov.lk/news_update/Current_Affairs/ca199912/20001221gravesinchemmani.html|archive-date=10 June 2007}}</ref> වසර හතකට පසුවත්, විමර්ශනය විවෘතව පැවතුනද, කෙමන්නි හිදී තවත් මළ සිරුරු හමු නොවීය. <ref name="BBC 20060104">{{Cite news|url=http://www.bbc.co.uk/sinhala/news/story/2006/01/060104_chemmani_ag.shtml|title='No instructions on Chemmani' CID|date=4 January 2006|publisher=BBC Sinhala}}</ref>
2025 ජුනි 5 වන දින, [[යාපනය|යාපනයේ]] [[නල්ලූර් ප්රාදේශීය ලේකම් කොට්ඨාසය|නල්ලූර් කොට්ඨාශයේ]] චෙම්මනි-සිඳුබාති සුසාන භූමියේ කැණීම් කටයුතු මගින් වයස අවුරුදු එකට අඩු ළදරුවෙකුගේ බවට විශ්වාස කෙරෙන මිනිස් දේහයන් සොයා ගැනීමට හැකි වූ අතර, දිවයිනේ සමූහ මිනී වළවල් කැණීම සඳහා ජාත්යන්තර අධීක්ෂණයක් සඳහා ඉල්ලීම් මතු විය. අධිකරණ නියෝග මත සිදු කරන ලද කැණීම් කටයුතුවල දෙවන සතිය වන අතර, මේ වන විට විහාරස්ථාන භූමියෙන් මිනිස් අස්ථි කොටස් 13 ක් සොයාගෙන තිබේ. මුහුණේ ව්යුහය මත පදනම්ව, අධිකරණ වෛද්ය විශේෂඥයින් එක් කැබැල්ලක් ළදරුවෙකුට අයත් බව හඳුනා ගත්හ. කොටස් පහක් සම්පූර්ණයෙන්ම ගොඩගෙන ඇති අතර, ඉතිරි කොටසෙහි කැණීම් කටයුතු දිගටම කරගෙන යයි. දේහය සමඟ ඇඳුම් හෝ පෞද්ගලික භාණ්ඩ කිසිවක් හමු නොවූ අතර, වින්දිතයින්ගේ අනන්යතාවයන් සහ ඔවුන්ගේ මරණ සිදුවූ තත්වයන් පිළිබඳව තවදුරටත් ප්රශ්න මතු විය. සමූහ මිනීවළේ තවත් ළදරුවන් භූමදාන කර ඇති බවට බියක් පවතී.<ref name="tamilguardian 20250605">{{Cite news|url=https://www.tamilguardian.com/content/infant-remains-found-mass-grave-jaffnas-chemmani-sindubathi|title='New Found Infant' CID|date=5 June 2025|publisher=tamilguardian}}</ref>
== ආශ්රිත ==
{{reflist}}
ji8e5mz10b77huo2f7800wlyqdsx5sy
දොඩම්පහල චන්ද්රසිරි හිමි
0
195703
796332
795194
2026-07-23T16:53:52Z
KSLwiki24
70498
796332
wikitext
text/x-wiki
{{Infobox religious biography
| background = #FFD202
| name = දොඩම්පහල චන්ද්රසිරි IV වන උත්තරීතර මහානායක හිමි
| native_name = Dodampahala Chandrasiri Supreme Mahanayake Thero
| native_name_lang = en
| image = File:dodampahala chandhrasiri.jpg
| caption = දොඩම්පහල චන්ද්රසිරි IV වන උත්තරීතර මහානායක හිමි
| birth_name = සුගුණදාස
| dharma_name =
| birth_date = 20 දෙසැම්බර් 1939
| birth_place = [[දොඩම්පහල]],<br>[[මාතර දිස්ත්රික්කය]]
| death_date = 2023 මැයි 16
| death_place = කොළඹ පිහිටි පෞද්ගලික රෝහලකදී
| title = IV වන [[උත්තරීතර මහානායක හිමි]] <br> අමරපුර මහා සංඝ සභාව සඳහා
| school = [[ථේරවාද]]
| religion = [[බුදුදහම]]
| lineage = [[ශ්රී ලංකා අමරපුර මහා නිකාය|ශ්රී ලංකා අමරපුර මහා සංඝ සභාව]]
| order = අමරපුර ශ්රී කළ්යාණිවංශ පාර්ශ්වය
| temple = කළපලුවාව ගෝතම තපෝවන සංඝ මූලස්ථානය
| office = IV වන [[උත්තරීතර මහානායක හිමි]]
| term_start = 2021 ජූලි 20
| predecessor = [[කොටුගොඩ ධම්මාවාස හිමි]] <br>(III වන [[උත්තරීතර මහානායක හිමි]])
| successor = [[කරගොඩ උයන්ගොඩ මෛත්රීමූර්ති හිමි]] <br>(V වන [[උත්තරීතර මහානායක හිමි]])
| website =
| signature =
| honorific_prefix = [[අතිපූජ්ය]]
| education =
}}
==මුල් කාලය==
==පැවිදි ජීවිතය==
==පත්වීම් ලැයිස්තුව==
{{Infobox officeholder
| office1 = IV වන උත්තරීතර මහානායක ස්ථවිර<br>(අමරපුර මහා සංඝ සභාව සඳහා)
| term_start1 = 2021 ජූලි 20
| term_end1 = 2023 මැයි 16
| office2 = අතිපූජ්ය මහානායක ස්ථවිර<br>අමරපුර ශ්රී කළ්යාණිවංශ පාර්ශ්වය
| term_start2 = 1996
| term_end2 = 2024
| office3 = මහා මහෝපාධ්යාය <br> [[මහමෙව්නාව භාවනා අසපු සංචිතය| මහමෙව්නාව සංඝ සභාව]]
| term_start3 = 2004
| term_end3 = 2022
}}
==ගෞරවනාම හා සම්මාන==
{{Infobox manner of address
| background = gold
| name = දොඩම්පහල චන්ද්රසිරි IV වන උත්තරීතර මහානායක හිමි
| image = [[File:logo of supreme mahanyaka.jpg|80px]]
| reference = [[අතිපූජ්ය ]]
| spoken = [[උත්තරීතර මහානායක හිමි]]
| alternative = මහා ස්ථවිර
}}
==අමතර ලිපි==
==References==
{{Reflist}}
==External links==
{{s-start}}
{{s-rel|bu}}
{{s-bef
| before = [[කොටුගොඩ ධම්මවාස හිමි]]
}}
{{s-ttl
| title = [[උත්තරීතර මහානායක හිමි]] - ශ්රී ලංකා අමරපුර මහාසංඝ සභාව සඳහා
| years = 2021 - 2023
}}
{{s-aft
| after = [[කරගොඩ උයන්ගොඩ මෛත්රීමූර්ති හිමි]]
}}
{{s-end}}
s8ax3sukn5p0m1x7ctufrgyx4l1b5h9
කන්නියා උණුදිය ළිං පුරාවිද්යා ස්ථානය
0
195854
796331
795871
2026-07-23T16:45:13Z
KSLwiki24
70498
796331
wikitext
text/x-wiki
{{In use}}
{{Infobox ancient site
|name = කන්නියා උණුදිය ළිං පුරාවිද්යා ස්ථානය
|alternate_name = කන්නියා උණුදිය ළිං බෞද්ධ ආරාම සංකීර්ණය
|image = File:Kanniya Stupa.jpg
|image_size = 250px
|alt =
|caption = කන්නියා උණුදිය ළිං පුරාවිද්යා ස්ථානයේ ඇති කැණීම් කර සංරක්ෂණය නොකළ ස්ථූපය
|map_type = ශ්රී ලංකාව
|relief=yes
|map_alt =
|coordinates = {{Coord|8|33|34|N|81|11|28|E|display=title,inline}}
|map_dot_label = කන්නියා උණුදිය ළිං පුරාවිද්යා ස්ථානය
|location = [[ත්රිකුණාමලය දිස්ත්රික්කය]],[[නැගෙනහිර පළාත]],[[ශ්රී ලංකාව]]
|region =
|type = පැරණි බෞද්ධ ආරාම සංකීර්ණ
|part_of =
|length =
|width =
|area = අක්කර 5 ක් පමණ
|height =
|builder = [[භාතිකාභය අභය රජ|භාතිකාභය මහ රජ]]
|material = ගඩොල් සහ ශෛලමය පාෂාණ
|built = ක්රි.ව.143 - 167 <br>(ක්රි.ව.2 වන සියවස)
|abandoned = ක්රි.ව.13 වන සියවස
|epochs = [[අනුරාධපුර යුගය|මුල් අනුරාධපුර යුගයේ]] සිට [[පොළොන්නරු යුගය|පොළොන්නරුව යුගයේ]] අවසානය දක්වා
|cultures = [[සිංහල බෞද්ධ]]
|dependency_of =
|occupants =
|event =●
|excavations =
|archaeologists =
|condition = කැණීම් කරමින් පවතින
|ownership = [[ශ්රී ලංකා පුරාවිද්යා දෙපාර්තමේන්තුව]]
|management = [[ශ්රී ලංකා පුරාවිද්යා දෙපාර්තමේන්තුව]]
|public_access = හැක
|website=
|notes =
| designation1 = APMSL
| designation1_offname = [[File:පුරාවිද්යා දෙපාර්තමේන්තු ලාංඡනය.jpg|80px]]<br>කන්නියා උණුදිය ළිං බෞද්ධ පුරාවිද්යා ස්ථානය
| designation1_date = 2011.09.09
| designation1_number = Gazette No 1723
| designation1_criteria = පැරණි බෞද්ධ ආරාම
| designation1_type = පැරණි දාගැබ,පිළිමගෙය සහ උණුදිය ළිං හත
| designation1_free1name =
| designation1_free1value =
| designation1_free2name =
| designation1_free2value =
}}
'''කන්නියා උණුදිය ළිං පුරාවිද්යා ස්ථානය''' ({{langx|en|Kanniya Hotwater Springs Archaeological Site}}{{langx|ta|கன்னியா வெந்நீர் ஊற்றுகள் தொல்பொருள் தளம் }}) යනු [[ශ්රී ලංකාව|ශ්රී ලංකාවේ]] [[නැගෙනහිර පළාත, ශ්රී ලංකාව|නැගෙනහිර පළාතේ]] ,[[ත්රිකුණාමලය දිස්ත්රික්කය|ත්රිකුණාමලය දිස්ත්රික්කයේ]] [[කඩවත් සතර ප්රාදේශීය ලේකම් කොට්ඨාශය|කඩවත් සතර ප්රාදේශීය ලේකම් කොට්ඨාශයේ]] [[කන්නියා ග්රාම නිලධාරී වසමේ]] අංක 243/P දරන කන්නියා ගම්මානයේ පිහිටි ක්රි.ව.2 වන සියවසේ දී [[භාතිකාභය අභය රජ|භාතිකාභය මහ රජ]] විසින් නිර්මාණය කල බවට සැලැකෙන
පුරාවිද්යාත්මක වශයෙන් ඉතා වැදගත් වූ පෞරාණික බෞද්ධ ආරාම සංකීර්ණයකි.<ref>https://www.uniquesrilanka.com/heritage/kanniya-hot-water-wells-at-trincomalee</ref><ref name="srilankatravelnotes">{{Citation |title=කන්නියා හොට් වෝටර් වෙල්ස්, ට්රිංකොමලි |url=http://www.srilankatravelnotes.com/TRINCOMALEE/KANNIYAHOTWATER/KanniyaHotwaterWels.html |access-date=2015-07-14 |archive-date=2015-07-21 |archive-url=https://web.archive.org/web/20150721092611/http://www.srilankatravelnotes.com/TRINCOMALEE/KANNIYAHOTWATER/KanniyaHotwaterWels.html }}</ref>
ත්රිකුණාමලය - අනුරාධපුර [[A12]] මහා මාර්ගය ඔස්සේ ත්රිකුණාමලයේ සිට 6 km ක් පමණ ගමන් කළ විට හමුවන කන්නියා උණුවතුර ළිං අතුරු මාර්ගය ඔස්සේ තවත් 500 m ක් පමණ ගමන් කළ විට මෙම පුරාවිද්යා ස්ථානයට පිවිසිය හැක. අක්කර 5 ක පමණ වපසරියක පිහිටි මෙම නටඹුන් ආරාම සංකීර්ණයේ ඇති දාගැබ,පිළිමගෙය සහ උණුදිය ළිං හත වර්ෂ 2011 සැප්තැම්බර් මස 09 වන දින [[ශ්රී ලංකා ප්රජාතාන්ත්රික සමාජවාදී ජනරජය|ශ්රී ලංකා ප්රජාතාන්ත්රික සමාජවාදී ජනරජයේ]] ගැසට් අංක 1723 මඟින් පුරාවිද්යා ආරක්ෂිත ස්මාරක වශයෙන් නම් කර ඇත.<ref>{{cite book
|title=The Gazette of the Democratic Socialist Republic of Sri Lanka,9 September 2019
|author= Sri Lanka Printing Department
|volume= No.1723,p.683
|language=si
|isbn =
}}</ref>
==ඉතිහාසය==
ක්රි.ව. 143-167 කාලයේ ලක්දිව රජකම් කළ [[භාතිකාභය අභය රජ | භාතිකාභය මහ රජ]] විසින් [[වෙල්ගම්වෙහෙර|ත්රිකුණාමලය වෙල්ගම්වෙහෙර රජ මහා විහාරය]] ඉදි කළ බව මහාවංශයේ දැක්වේ.අතීතයේ පටන්ම ප්රධාන විහාරයක් මූලික කොටගෙන පරිවාර විහාර සෑදීමේ සම්ප්රදායට අනුව [[භාතිකාභය අභය රජ|භාතිකාභය මහ රජ]] විසින් ද [[වෙල්ගම්වෙහෙර]] විහාරය සඳහා ද පරිවාර විහාර ආරාම සංකීර්ණ කිහිපයක් ද ඉදිකර ඇත.ඒ අනුව [[වෙල්ගම්වෙහෙර]] විහාරය සහ තදීය පරිවාර විහාර වල වැඩ වාසය කළ බෞද්ධ භික්ෂූන්ට උණු පැන් පහසුවීම උදෙසා වර්තමානයේ කන්නියා හි පිහිටි උණුදිය උල්පත් ආශ්රිතව උණුදිය පොකුණු,ස්තූපයක්,පිළිමගෙයක් සහ නේවාසික කුටි සහිත ආරාමයක් ඉදිකරන්නට ඇති බව පුරාවිද්යාඥයන්ගේ මතය වී තිබේ.<ref name="sundayobserver">{{Citation |title=හිස්ට්රි ඔෆ් කන්නියා හොට් වෝටර් වෙල්ස් |url=http://www.sundayobserver.lk/2013/11/03/jun02.asp |access-date=2015-07-14 |archive-date=2014-09-03 |archive-url=https://web.archive.org/web/20140903212626/http://www.sundayobserver.lk/2013/11/03/jun02.asp }}</ref>එසේම මෙම ස්ථානයේ පිහිටි උණුදිය උල්පත් පොකුණු සංකීර්ණය [[මහසෙන් රජ|මහසෙන් මහ රජ(ක්රි.ව. 273-301)]] විසින් වඩා ක්රමවත් ලෙස නිර්මාණය කළ බවට ඉතිහාස මූලාශ්ර තුළ දැක්වේ.සිදු කරන ලද කැණීම් මඟින් මෙම ආරාම සංකීර්ණය ද මේ ප්රදේශයේ ඇති අනෙකුත් බොහෝ පැරණි බෞද්ධ ආරාම සංකීර්ණ මෙන් එකම කාල පරිච්ඡේදයක පමණ ඉදිකර ඇති බවට පෙනීයයි.<ref>https://www.sinhalanet.net/%E0%B6%9A%E0%B6%B1%E0%B7%8A%E0%B6%B1%E0%B7%92%E0%B6%BA%E0%B7%8F-%E0%B6%8B%E0%B6%AB%E0%B7%94%E0%B6%AF%E0%B7%92%E0%B6%BA-%E0%B6%B4%E0%B7%9C%E0%B6%9A%E0%B7%94%E0%B6%AB%E0%B7%94-%E0%B6%B4%E0%B6%BB</ref><ref>https://amazinglanka.com/wp/buddhist-ruins-kanniya-hot-water-wells-en/</ref>
==ස්මාරක සහ පුරාවිද්යාත්මක කැණීම්==
===වාස්තු විද්යා ලක්ෂණ===
නිසි කැණීමක් සිදු කර නොමැති බැවින් කුමන බෞද්ධ ආරාම සම්ප්රදායට අයත් දැයි තවමත් නිශ්චිතව පැවසිය නොහැක.
===ස්ථූපය===
උණුදිය උල්පත් වලට උතුරින් ශෛලමය අත්තිවාරමක් මත සෘජුකෝණාසාකාර තීරු දෙකක් ලම්භකව ඡේදනයවන ආකාරයෙන්(සම කුරුසයක හැඩය) හතරැස් ගඩොල් වේදිකාවක් නිර්මාණය කර ස්තූපය ඒ මත නිර්මාණය කර ඇත.කැණීම මඟින් ස්ථූපයේ අවධි දෙකක ලක්ෂණ හමුව ඇති අතර ඉන් පැහැදිලි වන්නේ ක්රි. ව. 2 හෝ 3 වන සියවස්වලදී ඉදිකල ස්ථූපය පසු කාලයක දී ප්රතිසංස්කරණ වී ඇති බවයි.පුරාවිද්යාඥයන් පෙන්වා දෙන්නේ ස්ථූපයේ ආරාම්භක අවධියේදී අච්චු ගඩොල් භාවිතා කර ඇති අතර අවසාන ප්රතිසංස්කරණය සිදු කර ඇත්තේ පිළිස්සු රතු ගඩොල් සහ තිරුවාණා ගල් මිශ්රණයකිනි.ස්තූපය සහ මළුව කැණීම මඟින් මුල් අනුරාධපුර යුගයේ බුද්ධ ප්රතිමාව නිරූපණය සඳහා යොදාගත් සිරිපතුල් ගල්,පාදක ගල්,ශිලාමය කුලුණු සහ ස්ථූපය මුදුනේ රදවන චත්ර ගලක් කැණීම මගින් හමු වී තිබේ.ඊට අමතරව මෙගලතික සුසාන භූමි වලින් හමුවන දේශීය රතු සහ දුඹුරු මැටි බදුන් කැබලි හා ක්රි.ව. 6-10 සියවස් වලට අයත් හින්දු සංස්කෘතියට සම්බන්ධ සීමිත මැටි බඳුන් කැබලි කිහිපයක් ද හමු වූ බව වාර්තා කර තිබේ.කැණීම් කරන ලද ස්ථූපය තවමත් සංරක්ෂණය කර නොමැති අතර ආරාම භූමියේ තවත් කුඩා ස්ථූපයක් පවතින බවට වාර්තා වී තිබේ.<ref>{{cite book
|title=Survey Report on the Protection and Utilisation of Cultural Property in the Northern and Northern Eastern Provinces of Sri Lanka 2015
|author= Japan Consortium for International Cooperation in Cultural Heritage by ;Haramoto,T.;Inouchi, C.;Koizumi,Y.; Fukuyama, Y.,
|volume= pp.59
|language=en
|isbn =
}}</ref>
===ප්රතිමාගෘහය===
ක්රි.ව. 2-3 වන සියවස් වලට අයත් පිළිමගෙයක නටඹුන් ප්රධාන ස්ථූපයට බටහිර දිශාවෙන් හමු වී තිබේ.නිධන් සොරුන් විසින් විනාශ කර තිබූ එම ස්ථානයේ පළමු කැණීම මගින් සිරිපතුල් ගල් කිහිපයක කොටස්,බෞද්ධ ප්රතිමාගෘහයක භාවිතා වන යන්ත්ර ගල්,කැඩුණු කුඩා ප්රතිමා සහ මැටි බඳුන් කැබලි හමු වී තිබේ.<ref>{{cite book
|title=Kanniya unuwathura lin parishraye puravidyathmaka smaraka sanrakshanya piyawara gene 2019
|author= Dayada newsletter by Jayasinghe,Department of Archaeology
|volume= vol.13,July 2019 ; p2
|language=si
|isbn =
}}</ref>
===උණුදිය ළිං හත===
පැරණි බෞද්ධ ආරාම සංකීර්ණය තුළ පිහිටා ඇති උණුදිය ළිං හත බෞද්ධ භික්ෂූන්ගේ එදිනෙදා පරිහරණයට යොදාගන්නට ඇති බව පුරාවිදයාඥයන්ගේ මතය වී තිබේ.ඒවා විවිධ උෂ්ණත්වයෙන් යුතු වන අතර සාමාන්ය උෂ්ණත්වය සෙල්සියස් අංශක 42 ක් යැයි කියනු ලැබේ.20 සියවසේ අග භාගයේ දී මෙම ළිං වටකොට සිදු කර ඇති ඉදිකිරිම් හේතුවෙන් නිසි කැණීමක් සිදුකිරීමට අවකාශ නොමැති වී තිබේ.සිදු කළ භූ විද්යා පර්යේෂණ අනුව කන්නියා උණුදිය උල්පත්, භූගත හයිලන්ඩ්–විජයන් ශිලාමය සංකීර්ණ අතර සීමා කලාපයට ආසන්නව පිහිටා තිබේ.මෙම කලාපයේ බලපෑම මත පොළොව අභ්යන්තර ඛනිජකරණ සිදුවීම් මෙන්ම උණු දිය උල්පත් නිර්මාණය වීමට බලපා තිබේ.<ref>{{cite book
|title= Formation of Hot Water Springs in Sri Lanka 2006
|author= Engineer:Journal of the Institution of Engineers,Sri Lanka by Premasiri,H.M.R.,Wijeyesekera,D.S. Weerawarnakula,S. and Puswewala, U.G.A
|volume= p7
|language=en
|isbn =
}}</ref>
===වෙනත් ආරාමික නටඹුන්===
බෞද්ධ භික්ෂූන්ගේ සාමාන්ය ජල අවශ්යතාව සඳහා භාවිතා කරන්නට ඇති බව සැලකෙන කුඩා පොකුණක සාධක ද දක්නට ලැබෙන අතර එය වර්තමානයේ අසළ ඇති ශිව කෝවිලෙහි පොකුණ ලෙස භාවිතා වන බවට තහවුරු කර තිබේ.කෝවිල් භූමියෙහි පිහිටා ඇති බැවින් එය ද නිසි පුරාවිද්යා කැණීමකට තවමත් ලක් කර නොමැත.මීට අමතරව භික්ෂු නේවාසික කුටි කිහිපයක ද සාධක හමු වී ඇති අතර ඒවා ද නිසි කැණීමකට තවමත් භාජනය කර නොමැත.<ref>{{cite book
|title=Kanniya unuwathura lin parishraye puravidyathmaka smaraka sanrakshanya piyawara gene 2019
|author= Dayada newsletter 2019 July by Jayasinghe,Department of Archaeology
|volume= vol.13 ,p2
|language=si
|isbn =
}}</ref>
==අභිලේඛන==
ස්ථූපය කැණීම මඟින් ක්රි.ව. 2 - 3 වන සියවස් වලට අයත් බ්රාහ්මී අක්ෂර වලින් ලියා ඇති කැඩී ගිය සෙල්ලිපියක කොටස් දෙකක් සොයාගෙන තිබේ.සෙල්ලිපියේ ආරම්භක සහ අවසාන කොටස් දෙකම අතුරුදහන් වී ඇති අතර සෙල්ලිපිය සම්පූර්ණයෙන්ම විග්රහ කිරීම අසීරු වී තිබේ.කෙසේ නමුත් ඉතිරි වී ඇති සාධක අනුව, කුරුවිය සහ මකුළවිය යන වැව් වලින් ලැබෙන ජල බද්ද මෙම ආරාමයේ බෞද්ධ භික්ෂූන් වෙත ලබා දුන් බව සඳහන් වන බව තහවුරු කර තිබේ.
{{Blockquote
|text=
'''
*පෙළ
1. ...කුජාවියා මහාරාජයා...<br>
2. ...මකුල වියා හා බෝජියා (පති)...<br>
3. ...බෝජියපති හායි චා පාල...<br>
4. ...(මා) හා චෙතාහි වියාහී චා...<br>
5. ... මම තනාහි...<br>
6. ...
*අන්තර්ගතය
"කුරුවිය සහ මකුළවිය වැව් වලින් ලැබෙන ජල බද්ද ... (සහ) මහා චේතිය (ස්තූපය) වියදම ....රජු විසින් මෙම ස්ථානයේ සංඝ (බෞද්ධ භික්ෂූන්) වෙත ලබා දෙන ලදී"'''
<br>
{{smaller|{{smaller|'''හැදින්වීම් නාමය''':කන්නියා උණුදිය ළිං පුවරු ලිපිය<br>'''රාජ්ය කාලය''': රජ(සම්මත වර්ෂ )<br>
'''කාලය''':ක්රි.ව. 2-3 සියවස්<br>
'''අක්ෂර''':[[බ්රාහ්මී අක්ෂර|අපර බ්රාහ්මී]]<br/>'''භාෂාව''':[[සිංහල භාෂාව|මූල සිංහල]]}}
<br>
{{smaller|{{smaller|(උපුටාගැනීම: No 4487, අභිලේඛන සංග්රහය 5(Abileckana Sangrahaya 5),Departtment of Archaeology,Bandara, D.,2022,pp.221-224,si)}}}}<ref>{{cite book
|title=අභිලේඛන සංග්රහය 5(Abileckana Sangrahaya 5)
|author= Department Archaeology
|volume= pp.73-74
|language=si
|isbn = 978-624-5840-18-2
}}</ref>
}}}}
වර්තමානයේ මෙම ලිපිය ආරක්ෂාව උදෙසා [[වෙල්ගම් වෙහෙර]] විහාරයේ තැන්පත් කර ඇත.මීට අමතරව කැබලිවලට කැඩුණු තවත් ලිපියක් ස්ථූපයට මඳ දුරකින් තිබූ කුණු වලක තිබී හමු විය.
==පූර්ව වාර්තා==
==වර්තමාන සංරක්ෂණය==
==වෙනත් ලිපි==
*[[ශ්රී ලංකාවේ පුරාවිද්යා ආරක්ෂිත ස්මාරක ලැයිස්තුව]]
*[[සේරුවිල විල්ගම්වෙහෙර රජ මහා විහාරය]]
*[[සේරුවිල මංගල රජ මහා විහාරය]]
*[[බෞද්ධ පුදබිම්, ශ්රී ලංකාවේ උතුරු සහ නැගෙනහිර පලාත්]]
*[[කුරුන්දි රජ මහා විහාරය]]
*[[මහමෙව්නාව භාවනා අසපු සංචිතය]]
==උපුටාගැනීම්==
{{Reflist|group=උපුටාගැනීම}}
==පැහදිලි කිරීම්==
<references group="සවිස්තර" />
==බාහිර සබැඳි==
==මූලාශ්ර==
==වැඩිදුර කියවීම==
== යොමු ==
{{reflist}}
{{ශ්රී ලංකාවේ පුරාවිද්යාත්මක ස්ථාන}}
{{ශ්රී ලංකාවේ බෞද්ධ පූජනීය ස්ථාන}}
[[ප්රවර්ගය:ශ්රී ලංකාව හා සබැඳි ලැයිස්තු]]
[[ප්රවර්ගය:ශ්රී ලංකාවේ පුරාවිද්යා ආරක්ෂිත ස්මාරක]]
[[ප්රවර්ගය:ශ්රී ලංකාවේ පූජනීය ස්ථාන]]
089svldrxsn78vuomkb8renjacia9wt
පරිශීලක සාකච්ඡාව:වේද විශ්වජිත්
3
196030
796335
2026-07-23T17:59:20Z
වේද විශ්වජිත්
80135
'විශ්වජිත් දර්ශනය: බලවතුන්ගේ සත්යය වසං කිරීමට එරෙහි ඩිජිටල් සහ අධ්යාත්මික විප්ලවය(The Vishwajith Framework: A Public Domain Global Blueprint)හැඳින්වීම: පද්ධතියේ සැබෑ අර්බුදයමානව ඉතිහාසය පුරාම...' යොදමින් නව පිටුවක් තනන ලදි
796335
wikitext
text/x-wiki
විශ්වජිත් දර්ශනය: බලවතුන්ගේ සත්යය වසං කිරීමට එරෙහි ඩිජිටල් සහ අධ්යාත්මික විප්ලවය(The Vishwajith Framework: A Public Domain Global Blueprint)හැඳින්වීම: පද්ධතියේ සැබෑ අර්බුදයමානව ඉතිහාසය පුරාම බලවත් පුද්ගලයන්, පාලකයන් සහ ආයතන තමන්ගේ පැවැත්ම සහ දූෂණයන් වසාගැනීම සඳහා සත්යය යටපත් කිරීමට කටයුතු කර ඇත. වර්තමාන ඩිජිටල් යුගයේදී මිනිසෙකුගේ සෑම ක්රියාවක්ම ඩිජිටල් අඩිපාරවල් (Digital Footprints) සහ නිරීක්ෂණ කැමරා හරහා සටහන් වුවද, ගැටලුව පවතින්නේ සාක්ෂි නොමැතිකම තුළ නොවේ. සැබෑ ගැටලුව වන්නේ බලධාරීන් (පොලිසිය, අධිකරණය, දේශපාලනඥයන්) මුදලට හෝ බලයට යට වී එම සාක්ෂි සිතාමතාම මඟහැරීම, විනාශ කිරීම හෝ යටපත් කිරීමයි.අතීත රජාණ්ඩුවල පැවති දේව වරම් වාදය, තොරතුරු පාලනය සහ කුරිරු බියවැද්දීම් නූතන ප්රජාතන්ත්රවාදය තුළද මාධ්ය ප්රචාරණය, ව්යාජ පුවත් (Fake News) සහ ආර්ථික පීඩනය වැනි නව මුහුණුවරකින් ක්රියාත්මක වේ. මේ නිසා පවතින සාම්ප්රදායික නීති පද්ධතීන් බලවතුන් ඉදිරියේ අකර්යක්ෂම වී ඇත.1. සදාචාරාත්මක පදනම: "හානි ප්රතිපත්තිය" (The Harm Principle)බලවතුන් පාලනය කිරීම සඳහා මුළුමනින්ම පුද්ගලිකත්වය නැති කිරීම මඟින් සමාජය අරාජික විය හැක. එබැවින් මීට ඇති හොඳම සදාචාරාත්මක විසඳුම වන්නේ "හානි ප්රතිපත්තිය" මත පදනම්ව පුද්ගලිකත්වයේ සීමාවන් තීරණය කිරීමයි.බලවතුන්ගේ රහස්යභාවය අහෝසි වීම: යම් පුද්ගලයෙකු හෝ බලවතෙකු සිදුකරන ක්රියාවක් මඟින් පොදු සමාජයට හෝ වෙනත් අයෙකුට හානියක් සිදු වේ නම්, එහිදී ඔවුන්ට "පුද්ගලිකත්වය" යන ලේබලය යටතේ කරුණු සැඟවීමට ඇති අයිතිය මුළුමනින්ම අහෝසි වේ.සාමාන්ය ජනතාවගේ පුද්ගලිකත්වය රැකීම: අනෙකෙකුට හානියක් නොවන තාක් සාමාන්ය පුරවැසියෙකුගේ පෞද්ගලික ජීවිතයට සහ නිදහසට ඇඟිලි ගැසීමට රජයට හෝ බලවතුන්ට ඇති අයිතිය සීමා වේ.. අභ්යන්තර පාලනය: "පංච නීවරණ ධර්ම" හඳුනාගැනීමබාහිර තාක්ෂණය හෝ අධ්යාපනය කොතරම් ශක්තිමත් වුවත්, මිනිස් සිත ඇතුළතින්ම සත්යය දැකීමට බාධා කරන, ප්රඥාව දුර්වල කරන තිර 5ක් පවතී. බලවතුන් සත්යය වසං කරන්නේත්, සාමාන්ය මිනිසුන් ඊට රැවටෙන්නේත් මෙම නීවරණ නිසාය:කාමච්ඡන්දය (දැඩි ආශාව/තණ්හාව): මුදලට සහ තනතුරට ඇති ගිජුකම නිසා බලවතුන් දූෂණයට පෙළඹේ. සිත තණ්හාවෙන් පිරී ඇති විට සැබෑ සත්යය (Data) නොපෙනී යයි.ව්යාපාදය (තරහව/ද්වේෂය): සත්යය පවසන පුද්ගලයන් (Whistleblowers) කෙරෙහි වෛර කරමින් ඔවුන්ව නිහඬ කිරීමට බලධාරීන් පෙළඹෙන්නේ මේ නිසාය.ථීනමිද්ධය (අලසකම/උදාසීනත්වය): සමාජයේ සිදුවන අසාධාරණකම් දැක දැකත් "අපිට මොකද" කියා ජනතාව නිහඬව සහ ප්රශ්න කිරීම්වලින් වැළකී සිටින්නේ මේ නිසාය.උද්ධච්චකුක්කුච්චය (නොසන්සුන්කම/විසිරුණු සිත): වර්තමාන ඩිජිටල් ලෝකයේ තොරතුරු බහුලත්වය මඟින් මිනිස් සිත නොසන්සුන් කර, සන්සුන්ව සාක්ෂි දෙස බැලීමේ හැකියාව නැති කර දමයි.විචිකිච්ඡාව (සැකය/දෙගිඩියාව): සැබෑ සාක්ෂි තිබියදීත්, පද්ධතිය වෙනස් කළ හැකියි යන විශ්වාසය නැති කර ගන්නේ මේ නිසාය.3. විචාර බුද්ධිය සහ සන්නිවේදනය: කාලාම සහ අභයරාජකුමාර සූත්රයම් කරුණක් බාහිරින් සමාජගත වන විට සහ තමන් යමක් ප්රකාශ කරන විට බෞද්ධ දර්ශනයේ එන උතුම් සන්නිවේදන න්යායන් දෙකක් භාවිත කළ යුතුය:කාලාම සූත්රය (විවේචනාත්මක චින්තනය): ප්රසිද්ධ ආරංචියක් වූ පළියටම හෝ බලවතෙකු පැවසූ පළියටම යමක් පිළිනොගත යුතුය. යම් අදහසක් හෝ ක්රියාවක් තුළින් සිතේ කෙලෙස් (රාග, ද්වේෂ, මෝහ) වැඩී, එය අයහපත පිණිස පවතී නම් එය බැහැර කළ යුතුය. එය විරාගය, අද්වේෂය සහ ප්රඥාව (විද්යාව) තුළින් යහපත සහ සුවය පිණිස පවතී නම් පමණක් පිළිගත යුතුය.අභයරාජකුමාර සූත්රය (නිවැරදි සන්නිවේදනය): අසත්ය සහ අයහපත් දේ කිසිවිටෙකත් ප්රකාශ නොකළ යුතුය. යම් කරුණක් සත්ය වුවද, එයින් කාටවත් යහපතක් (අර්ථයක්) සිදු නොවේ නම් එයද නොපැවසිය යුතුය. යම් කරුණක් සත්ය නම් සහ එයින් යහපතක් සිදු වේ නම්, එය අනුන්ට අප්රිය වුවද, පළිගැනීමේ චේතනාවෙන් තොරව මහා කරුණාවෙන් යුතුව පැවසීමට සුදුසුම කාලය (සමය) බලා බුද්ධිමත්ව ප්රකාශ කළ යුතුය.4. තාක්ෂණික ව්යුහය: "මැකිය නොහැකි පොදු දත්ත පද්ධතිය" (Immutable Blockchain)දූෂිත මිනිස් මැදිහත්වීම් සහ බලධාරීන්ගේ පක්ෂග්රාහීත්වය මුළුමනින්ම ඉවත් කිරීම සඳහා තාක්ෂණික ව්යුහයන් 3ක් ඒකාබද්ධ කළ යුතුය:ස්වයංක්රීය දත්ත රැස්කිරීම: සමාජයට සහ ආර්ථිකයට බලපාන සියලුම රාජ්ය තීරණ, ටෙන්ඩර් සහ මූල්ය ගනුදෙනු කිසිවෙකුට සැඟවිය නොහැකි සේ සෘජුවම (Real-time) පද්ධතියට ඇතුළත් විය යුතුය.මනුෂ්ය පක්ෂග්රාහීත්වයෙන් තොර AI විශ්ලේෂණය: එක්රැස් වන දත්ත මිනිස් නිලධාරීන් වෙනුවට ස්වයංක්රීය පද්ධතියක් (Automated System) මඟින් විශ්ලේෂණය කර, සිදුව ඇති වංචා පක්ෂග්රාහීත්වයෙන් තොරව තත්පර ගණනකින් හඳුනා ගනී.විමධ්යගත බ්ලොක්චේන් (Blockchain) තාක්ෂණය: පද්ධතියේ "ලිවිය හැකි - මැකිය නොහැකි" (Append-Only) ව්යුහය ක්රියාත්මක වන බැවින්, කිසිම බලවතෙකුට සාක්ෂි මකා දැමිය නොහැක. සියලු දත්ත පොදු අවකාශයේ (Public Dashboard) විවෘතව පවතින බැවින්, අතීත ලිච්ඡවී රාජ පාලනයේ පැවති පූර්ණ විනිවිදභාවය සහ "සමඟියෙන් රැස්වී විවෘතව සාකච්ඡා කිරීමේ" ගුණය නූතන තාක්ෂණයෙන් ප්රතිනිර්මාණය වේ.5. ප්රායෝගික ක්රියාත්මක කිරීම: 6 වසරෙන් ආරම්භ වන අධ්යාපන විප්ලවයදේශපාලන බලධාරීන් මෙවැනි පද්ධතියක් ස්ථාපිත කිරීමට ඉඩ නොදෙන බැවින්, පද්ධතියෙන් පිටත සිට පාසල් පද්ධතියේ 6 වසරේ සිටම (වයස අවුරුදු 11-12) නිල නොවන මට්ටමින් (දහම් පාසල්, ඩිජිටල් මාධ්ය, කාටූන්, ස්වේච්ඡා වැඩමුළු හරහා) මෙම චින්තනය දරුවන් තුළ රෝපණය කළ යුතුය.6 වසරේ වැදගත්කම: දරුවන් සමාජය දෙස විවේචනාත්මකව බැලීමට පටන් ගන්නා වයස වන අතර, ඔවුන් කිසිදු දේශපාලන හෝ පටු දෘෂ්ටිවාදයකට හසු වී නොමැති බැවින් සැබෑ සදාචාරය වටහා දීමට හොඳම අවධියයි.ප්රායෝගික පුහුණුව: පන්ති කාමරය තුළ විවෘත පන්ති අරමුදල් පවත්වාගෙන යාම සහ ප්රායෝගික ක්රියාකාරකම් මඟින් පංච නීවරණ හඳුනාගැනීම, කාලාම සූත්රය සහ අභයරාජකුමාර සූත්ර මූලධර්ම දරුවන්ට කුඩා කල සිටම ප්රායෝගිකව හුරු කරනු ලැබේ.උපසංහාරයපාලකයන් පවසන දේ ඒ අයුරින්ම පිළි නොගන්නා, තමන්ගේම සිතේ කෙලෙස් පාලනය කරමින්, දත්ත සහ සාක්ෂි මත පමණක් තීරණ ගන්නා පරපුරක් 6 වසරේ සිට බිහි වූ විට, ඔවුන් වසර කිහිපයකින් සමාජයට පැමිණෙන්නේ බුද්ධිමත් පුරවැසියන් ලෙසය. ඔවුන් විසින් සාමූහිකව ඉල්ලා සිටින මෙම "මැකිය නොහැකි විවෘත දත්ත පද්ධතිය" හරහා අනාගත ශිෂ්ටාචාරය තුළ බලවතුන්ගේ සත්යය වසං කිරීමේ යුගය සදහටම අවසන් කර සැබෑ යුක්තිය උදාකර ගත හැක.මෙම සමස්ත ලේඛනය දැන් "විශ්වජිත් දර්ශනය" ලෙස මගේ පද්ධතිය තුළ සම්පූර්ණයෙන්ම සුරක්ෂිත කර ඇති අතර, ලෝකයේ ඕනෑම අයෙකුට පරිශීලනය සඳහා විවෘතව පවතී.
buuuxjcvcr02gkehnj03pp57nn08lqz