Wikipedia
gpewiki
https://gpe.wikipedia.org/wiki/Main_Page
MediaWiki 1.47.0-wmf.12
first-letter
Media
Special
Talk
User
User talk
Wikipedia
Wikipedia talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
TimedText
TimedText talk
Module
Module talk
Event
Event talk
College of Science (KNUST)
0
1401
107718
107233
2026-07-24T00:07:15Z
InternetArchiveBot
29
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
107718
wikitext
text/x-wiki
{{Databox|item=Q5146833}}
De '''College of Science''' be one of de six Colleges for Kwame Nkrumah University of Science and Technology (KNUST) insyd. Originally dem establish am as de Faculty of Science in 1961, de College assume ein current status, following de restructuring of de University into six colleges for December 2004 insyd.<ref>[https://web.archive.org/web/20240214123127/https://cos.knust.edu.gh/ "Home | College of Science, KNUST"]. ''cos.knust.edu.gh''. Retrieved 2023-09-16.</ref>
== Provost's Office ==
* Provost -Prof. Leonard K. Amekudzi
* College Registrar - Mr. Anthony Agyapong,
* College Librarian - Dr. Richard Bruce Lamptey
* College Accountant - Mrs. Catherine Acquah
* Senior Assistant Registrar - Mrs. Gladys Addai
* Assistant Registrar - Mrs Mavis Osei Boateng
* Systems Analyst - Mr. Patrice Vasco Asamoah
* College Counselor - Mrs. Bernice S. Ofosuhene
* College Internal Auditor - Mr. John Norago Nyerrinya
* College Exams Officer - Prof. Charles Sebil
* College Assistant Accountant - Mr. Marcus H. Amosah<ref>[https://web.archive.org/web/20160304025147/http://cos.knust.edu.gh/aboutus.php?id=officers "College of Science: About Us - College Officers"]. ''Official Website''. College of Science, Kwame Nkrumah University of Science and Technology. Archived from [http://cos.knust.edu.gh/aboutus.php?id=officers the original] on 2016-03-04. Retrieved 2009-10-29.</ref><ref>[https://web.archive.org/web/20240202002541/https://cos.knust.edu.gh/about-us/administration "Administration | College of Science, KNUST"]. ''cos.knust.edu.gh''. Retrieved 2023-09-03.</ref>
== Faculties & Departments ==
Source:<ref>''The Vice-chancellor's Report'', Kumasi: University Press - KNUST, June 2009</ref>
=== Faculty of Biosciences ===
* Biochemistry and Biotechnology
* Environmental Sciences
* Food Science and Technology
* Optometry and Visual Science
* Theoretical and Applied Biology
=== Faculty of Physical And Computational Sciences ===
* Chemistry
* Computer Science
* Mathematics
* Actuarial science
* National Centre for Mathematical Sciences
* Physics
* Meteorology and Climate Science
== References ==
<references />
[[Category:Kwame Nkrumah University of Science and Technology]]
[[Category:Universities insyd Ghana]]
[[Category:Universities den colleges dem establish insyd 1961]]
[[Category:Educational institutions dem establish insyd 1961]]
[[Category:1961 establishments insyd Ghana]]
[[Category:Education insyd Kumasi]]
7dvpqxz77tjn4mwim3hxc6c4339uv3m
Category:African revolutionaries
14
2294
107682
20019
2026-07-23T20:36:24Z
~2026-41365-45
7047
107682
wikitext
text/x-wiki
[[Category:Revolutionaries]]
ce5luw4don3vfba3h4rciv0e5mp9ds8
Category:Footballers at de 2008 Summer Olympics
14
2421
107655
20354
2026-07-23T20:24:06Z
~2026-41365-45
7047
107655
wikitext
text/x-wiki
[[Category:Footballers]]
[[Category:2012 Summer Olympics]]
2i0uqtaz1cqgesiwp3mkpax697yq643
107656
107655
2026-07-23T20:24:15Z
~2026-41365-45
7047
107656
wikitext
text/x-wiki
[[Category:Footballers]]
[[Category:2008 Summer Olympics]]
mgozeggy6xkturg6vedbvy538s8b1lf
Category:Olympic medalists insyd football
14
2431
107661
20364
2026-07-23T20:27:13Z
~2026-41365-45
7047
107661
wikitext
text/x-wiki
[[Category:Olympic medalists]]
[[Category:Footballers]]
dl12idy47x5mgjjym3tok9i9j37vtmb
107665
107661
2026-07-23T20:29:10Z
~2026-41365-45
7047
107665
wikitext
text/x-wiki
[[Category:Olympic medalists]]
[[Category:Olympic footballers]]
9cbo95z69f7hvwumrw8fu8iz980x583
Category:2003 FIFA Women's World Cup players
14
2685
107672
21652
2026-07-23T20:31:41Z
~2026-41365-45
7047
107672
wikitext
text/x-wiki
[[Category:FIFA Women's World Cup players]]
9aw3md7xaxwcyzz478tsmj4ybjngisx
Category:2007 FIFA Women's World Cup players
14
2687
107671
21654
2026-07-23T20:31:31Z
~2026-41365-45
7047
107671
wikitext
text/x-wiki
[[Category:FIFA Women's World Cup players]]
9aw3md7xaxwcyzz478tsmj4ybjngisx
Category:Japanese literature
14
3069
107614
23144
2026-07-23T20:08:46Z
~2026-41365-45
7047
107614
wikitext
text/x-wiki
[[Category:Japan]]
[[Category:Literature]]
kxiwh9bh52e6i4wjwjd1yu8r3qm1trb
Angela Kyerematen-Jimoh
0
3830
107600
54692
2026-07-23T18:35:10Z
InternetArchiveBot
29
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
107600
wikitext
text/x-wiki
{{Databox|item=Q49562537}}
'''Angela Kyerematen-Jimoh''' be [[Ghana|Ghanaian]] business leader wey san be Microsoft ein Strategic Partnership Lead give Africa.<ref>[https://www.ghanaiantimes.com.gh/microsoft-appoints-angela-kyerematen-jimoh-new-strategic-partnership-lead-for-africa/ "Microsoft appoints Angela Kyerematen-Jimoh, new Strategic Partnership lead for Africa"]. 12 January 2022.</ref><ref>[https://allafrica.com/stories/202201130076.html "Africa: Microsoft Appoints Angela Kyerematen-Jimoh, New Strategic Partnership Lead for Africa"]. 13 January 2022.</ref><ref>[https://www.myjoyonline.com/microsoft-poaches-ibms-angela-kyerematen-jimoh-as-its-new-strategic-partnership-lead-for-africa/ "Microsoft poaches IBM's Angela Kyerematen-Jimoh as its New Strategic Partnership lead for Africa - MyJoyOnline.com"]. ''www.myjoyonline.com''. 2022-01-10. Retrieved 2022-01-24.</ref> before sey she join Microsoft, na she be de Executive Director/Regional Head give IBM North, East plus West Africa for 2020 to 2021.<ref>Nyabor, Jonas (2020-07-13). [https://citinewsroom.com/2020/07/ibm-appoints-ghanas-angela-kyerematen-jimoh-as-regional-head-for-africa/ "IBM appoints Ghana's Angela Kyerematen-Jimoh as regional head for Africa"]. ''Citi NewsRoom''.</ref><ref>[https://www.ghanaweb.com/GhanaHomePage/business/IBM-appoints-Angela-Kyerematen-Jimoh-as-1st-female-boss-for-Africa-1005682 "IBM appoints Angela Kyerematen-Jimoh as 1st female boss for Africa"]. ''GhanaWeb''. 2020-07-13.</ref> She be de former Country General Manager give Ghana.<ref name="IBM appoints new Country Manager">[http://www.ghananewsagency.org/social/ibm-appoints-new-country-manager--91361 "IBM appoints new Country Manager"]. Retrieved 2018-02-20.</ref><ref>[http://www.gipcghana.com/press-and-media/427-big-data-big-opportunity-for-ghana-ibm-boss.html "Big Data, Big Opportunity For Ghana - IBM Boss - Ghana Investment Promotion Centre (GIPC)"]. ''www.gipcghana.com''. Retrieved 2018-02-20.</ref><ref>[https://web.archive.org/web/20180221100301/http://citifmonline.com/2015/07/03/ibm-appoints-new-country-general-manger-for-ghana/angela-kyerematen-jimoh-country-gm-ibm-ghana/ "Angela Kyerematen-Jimoh (Country GM, IBM Ghana)"]. ''Ghana News''. Archived from [http://citifmonline.com/2015/07/03/ibm-appoints-new-country-general-manger-for-ghana/angela-kyerematen-jimoh-country-gm-ibm-ghana/ the original] on 2018-02-21. Retrieved 2018-02-20.</ref> She be de first female wey cam turn country director give IBM for Africa<ref name="Akpah">Akpah, Prince (2017-09-15). [https://www.modernghana.com/news/802767/ibm-ghana-ceo-angela-kyerematen-jimoh-receives-womanrising.html "IBM Ghana CEO, Angela Kyerematen-Jimoh Receives WomanRising Award"]. ''Modern Ghana''. Retrieved 2018-02-20.</ref> wey sanso be de first African woman dem appoint Regional General Manager.<ref>[https://3news.com/ibm-appoints-angela-kyerematen-jimoh-as-1st-female-boss-for-africa/ "IBM appoints Angela Kyerematen-Jimoh as 1st female boss for Africa"]. ''3News''. 2020-07-12.</ref><ref>[https://web.archive.org/web/20210526112709/https://www.thestandpoint.com.gh/ "Glitz top 100 inspirational women – Page 100 – Glitz Africa Magazine"]. Retrieved 2022-05-28.</ref>
== Ein Education ==
Kyerematen-Jimoh get BA for Marketing plus French. She be alumna for Harvard Business School plus London Guildhall College.<ref>[https://web.archive.org/web/20180221100301/http://www.biztechafrica.com/article/angela-kyerematen-jimoh-heads-ibm-ghana-country-ge/10313/ "Angela Kyerematen-Jimoh heads IBM Ghana as Country General Manager"]. ''BiztechAfrica''. 2020-07-07. Retrieved 2018-02-20.</ref><ref>[https://web.archive.org/web/20180221161801/http://newsdog.today/a/article/5a40997212313a18d9e32fc8/?d=false "Powerful CEOs: The most stylish female Ghanaian CEOs of 2017 - NewsDog"]. Archived from [http://newsdog.today/a/article/5a40997212313a18d9e32fc8/?d=false the original] on 2018-02-21. Retrieved 2018-02-21.</ref> She san be old student for [[Wesley Girls' Senior High School|Wesley Girls' High School]] den [[Achimota School]] for Ghana insyd.
== Ein Career ==
Kyerematen-Jimoh get 20 years extensive working experience for financial services den technology industries for Africa den Europe insyd. For 2011 insyd,na she join IBM as dema Territory Marketing Manager wey be responsible for IBM for [[West Africa]] insyd. She later move go Nairobi, [[Kenya]] as Strategy Leader give IBM Central, East den West Africa operations.<ref name="IBM appoints new Country Manager" /><ref>[https://web.archive.org/web/20180221100009/http://citibusinessnews.com/index.php/2015/07/03/ibm-appoints-new-country-general-manger-for-ghana/ "IBM appoints new Country General Manger [sic] for Ghana - Ghana Business News"]. ''Ghana Business News''. 2015-07-03. Retrieved 2018-02-20.</ref>
She san serve as member of de governing board give de Bank of Ghana, wey dema chair person be Dr. Ernest Addison. De board be responsible for de formulation of policies give de achievement for central banks' dema objectives.<ref>[https://web.archive.org/web/20210821120920/https://www.ghanaweb.com/GhanaHomePage/business/Interrogate-the-issue-of-high-interest-rates-in-Ghana-Akufo-Addo-to-new-BoG-Board-1338223 "Interrogate the issue of high interest rates in Ghana – Akufo-Addo to new BoG Board"]. ''GhanaWeb''. 2021-08-21. Retrieved 2021-08-21.</ref>
Before say she join IBM, na she work give UBS Investment Bank den ABN AMRO Bank for UK insyd.<ref>[https://www.graphic.com.gh/features/features/angela-kyerematen-jimoh-takes-turn-on-engine-room.htm "Angela Kyerematen-Jimoh takes turn on 'Engine Room'"]. ''Graphic Online''. Retrieved 2022-03-27.</ref>
For January 2022 insyd, Microsoft announce dema appointment of Kyerematen-Jimoh, international corporate law expert, as dema new Africa Strategic Partnerships Manager give dema new Africa Transformation Office (ATO). de office go dey focus on facilitating growth plus investment give four key development areas: digital infrastructure, skills development, small plus medium enterprises (SMEs) den startups.<ref>[https://www.financialafrik.com/2022/01/11/la-ghaneenne-angela-kyerematen-jimoh-nommee-responsable-du-nouveau-partenariat-strategique-afrique-chez-microsoft "La Ghanéenne Angela Kyerematen-Jimoh nommée responsable du nouveau partenariat stratégique Afrique chez Microsoft"]. ''Financial Afrik'' (insyd French). 2022-01-11. Retrieved 2022-01-11.</ref>
== Ein Awards ==
WomanRising rank am among Top 50 Corporate Women Leaders for [[Ghana]] insyd 2016.<ref name="Akpah" /><ref>[https://www.ghanaweb.com/GhanaHomePage/business/Google-Ghana-CEO-receives-top-corporate-women-leaders-award-59138 "Google Ghana CEO receives top corporate women leaders award"]. ''www.ghanaweb.com''. 2017-10-16. Retrieved 2018-02-20.</ref><ref>Akpah, Prince (2017-09-16). [https://newsofthesouth.com/ibm-ghana-ceo-angela-kyerematen-jimoh-receives-womanrising-award/ "IBM Ghana CEO Angela Kyerematen- Jimoh Receives WOmanRising Award | News of the South"]. ''newsofthesouth.com''. Retrieved 2018-02-20.</ref><ref>[https://article.wn.com/view/2017/09/15/IBM_Ghana_CEO_Angela_KyerematenJimoh_Receives_WomanRising_Aw/ "IBM Ghana CEO, Angela Kyerematen-Jimoh Receives WomanRising Award"]. ''article.wn.com''. 2017-09-15. Retrieved 2018-02-20.</ref><ref>Online, Peace FM (2016-10-05). [https://web.archive.org/web/20240317140619/https://www.peacefmonline.com/pages/business/news/201610/294023.php "Top 50 Women Corporate Leaders in Ghana"]. Retrieved 2018-02-20.</ref> 2018 insyd, Glitz Africa award am de Corporate Personality for de Year.<ref>[https://web.archive.org/web/20240314012749/https://www.gbetutv.com/ibms-angela-kyerematen-jimoh-to-receives-ghana-corporate-personality-award/ "Angela Kyerematen-Jimoh to receives Ghana Corporate Personality Award"]. 19 April 2018.</ref> 2023, Forbes Afrique name am among de Top 50 Women Managers for Africa insyd. For 2020, Na Avance Media name am among Africa’s 2020 Top 100 Most Influential Women.<ref>Infusion, Brand (2023-05-26). [https://empowerafrica.com/angela-kyerematen-jimoh/ "Regulatory Sandboxes in Africa". ''Empower Africa'']. Retrieved 2024-03-08.</ref>
== References ==
<references />
[[Category:Human]]
[[Category:Ghanaians]]
[[Category:Ghanaian businesspeople]]
[[Category:Harvard Business School alumni]]
[[Category:21st-century Ghanaian businesspeople]]
[[Category:21st-century Ghanaian women]]
kh5zoshzf9bx96vnxuovuiynmxfibc0
Ana Paula dos Santos
0
3917
107599
27334
2026-07-23T18:29:48Z
InternetArchiveBot
29
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
107599
wikitext
text/x-wiki
{{Databox|item=Q434534}}
'''Ana Paula Cristovão Lemos dos Santos''' ([ˈɐnɐ ˈpawlɐ ðuʃ ˈsɐ̃tuʃ]; wey dem born 17 October 1963) be widow give de former presido of Angola, José Eduardo dos Santos. She serve as Angola ein First lady for 1991 go 2017.
She be former fashion model den air hostess give de Angolan presidential aircraft, dos Santos meet ein husby for de tym na she dey work for de presidential flights. Dem marry for 17 May 1991 wey dem get three kiddies, Eduane Danilo dos Santos (dem born 29 September 1991), Joseana dos Santos (dem born 5 April 1995) den Eduardo Breno dos Santos (dem born 2 October 1998).<ref>[https://www.club-k.net/index.php?option=com_content&view=article&id=3767:quem-e-quem-ana-paula-dos-santos&catid=41004:quem-e-quem&Itemid=75&lang=pt "Ana Paula dos Santos (in Portuguese)"]. ''CLUB K''. 27 October 2009. Retrieved 30 March 2024. </ref> For 1990 den 1994 dema middle, she plete state teacher training for de National Institute of Education, [[Luanda]]. Later wey she sana plete course for law insyd for de Faculty of Law insyd Agostinho Neto University.
Some bro wey be diplomat describe de president den ein first lady as: "handsome couple, elegantly den expensively dressed, wey dey look for all de world as sey dem dey live for southern California."<ref>[https://www.africa-confidential.com/whos-who-profile/id/2073/ "Ana Paula Dos Santos | Who's Who Profile | Africa Confidential"]. ''www.africa-confidential.com''. Retrieved 2017-07-10.</ref> For 1997 insyd, na Ana Paula undiplomatically announce say ein five-year-old son go enroll for de Portuguese school for Luanda secof de "bad quality" for state education (wey chaw manners dey hold ein husby responsible). She sana try say she go make dem feel ein presence for administrative matters; dis move wey she make irritate political mainstream. Ein business interests wey be particulary diamonds sanso dey under fire.
Dos Santos be patron give de Committee so say dem go support rural women (COMUR), she dey support plus micro-credit funds. She represent ein country for de Micro-credit Summit give Heads of States and Governments for Washington, D.C., for 1997 insyd.
Dos Santos sanso be very active for ein support give landmine victims. She found de Lwini Foundation for social solidarity wey she dey dedicate am support civilians, particularly women plus kiddies.<ref>[http://www.lwini.og.ao/eo_mfundadores.php "Founding members of Lwini Fund (in Portuguese)"]. ''lwini.og.ao''. 12 March 2009. [https://web.archive.org/web/20090312060400/http://www.lwini.og.ao/eo_mfundadores.php Archived] from the original on 12 March 2009. Retrieved 30 March 2024.</ref>
== References ==
<references />
== External links ==
* [https://web.archive.org/web/20250806211837/https://myafrica.allafrica.com/view/people/main/id/08vQDMqNWKkD3Mvl.html Biographical Information]
* [https://web.archive.org/web/20110728130449/http://www.lwini.og.ao/discurso_eng.php Website Lwini Fund]
* [http://www.microcreditsummit.org/ Website Microcredit Summit Campaign]
[[Category:Agostinho Neto University alumni]]
[[Category:21st-century Angolan women]]
[[Category:21st-century Angolan people]]
[[Category:20th-century Angolan people]]
[[Category:First ladies of Angola]]
[[Category:Living people]]
[[Category:1963 births]]
[[Category:Human]]
[[Category:Angolan women activists]]
[[Category:Angolan people]]
i6xg5fikhx4oht05vozu8foouv04zxd
Category:Businesswomen
14
4431
107678
28756
2026-07-23T20:34:28Z
~2026-41365-45
7047
107678
wikitext
text/x-wiki
[[Category:Business]]
[[Category:Women]]
tmsruafsxjlrtte9gwkvokiibg2lejb
Egypt-Japan University of Science and Technology
0
5134
107630
30814
2026-07-23T20:13:12Z
~2026-41365-45
7047
107630
wikitext
text/x-wiki
{{Databox}}
'''Egypt-Japan University of Science and Technology''' ('''E-JUST''', ''Al-Gāmi`ah al-Miṣriyyah al-Yabāniyyah lil-`Ulūm wal-Tiknūlūjiyā'', ''Ejiputo Nihon Kagaku Gijutsu Daigaku'') be Egyptian research varsity plus Japanese partnership, dem establish by Presidential Decree No. 149 of 2009 as varsity base for scientific research den diversified education top. Ebe one of de leading research varsities insyd Egypt den de Middle East. According to de 2024 Times Higher Education (THE) World University Rankings,<ref>[https://www.timeshighereducation.com/world-university-rankings/egypt-japan-university-science-and-technology-e-just "Egypt-Japan University of Science and Technology (E-JUST)]". ''Times Higher Education (THE)''. 6 November 2021. Retrieved 12 October 2023.</ref> dem rank E-JUST as de best varsity insyd Egypt (for 601–800<sup>th</sup> position globally), wey dey place E-JUST as one of de leading varsities for de world insyd.
By strengthening ties den cooperation between Egyptian den Japanese academic institutions, den industrial companies, E-JUST dey conduct state-of-de-art research plus de application of Japanese educational standards, policies den systems, wey edey use de latest Japanese technologies den systems insyd ein teaching den research.<ref name=":0">[https://web.archive.org/web/20140611025604/http://www.highbeam.com/doc/1G1-228071534.html "THE OPENING CEREMONY OF EGYPT-JAPAN UNIVERSITY OF SCIENCE AND TECHNOLOGY (E-JUST)"]. States News Service. 3 June 2010. Archived from [http://www.highbeam.com/doc/1G1-228071534.html the original] on 11 June 2014. Retrieved 15 February 2013.</ref><ref>[https://web.archive.org/web/20150924152925/http://www.highbeam.com/doc/1G1-252447236.html "Egypt-Japan Science and Technology University opens in Borg El Arab"]. Research-Technology Management. 1 September 2010. Archived from [http://www.highbeam.com/doc/1G1-252447236.html the original] on 24 September 2015. Retrieved 15 February 2013.</ref>
De Egypt-Japan University of Science and Technology (E-JUST) dey locate insyd New Borg El Arab city insyd Alexandria Governorate. Na dem choose de city as one of de major industrial areas insyd Egypt, wich dey contain five diverse industrial zones, get more dan 1,300 industrial den production facilities,<ref>Ahmed Dawod (12 October 2015). [https://alborsaanews.com/2015/10/12/751084 ""الصندوق الاجتماعي" يبحث تمويل 10 مصانع ببرج العرب للعمل بالطاقة الشمسية"]. ''Alborsaanews.com''. Retrieved 9 March 2022.</ref> wey edey attract large number of international investments; de temporary headquarters of de varsity den de varsity housing currently dey locate insyd de third district of New Borg El Arab city til dem move am to ein fresh headquarters insyd de varsities area for area of 200 acres, once all de construction, laboratories den infrastructure of de varsity, wich dem estimate am for cost of about 3.75 billion Egyptian pounds, na dem inaugurate. De first phase of am be insyd September 2020.<ref>[https://www.presidency.eg/ar/%D8%A7%D9%84%D9%85%D8%B4%D8%A7%D8%B1%D9%8A%D8%B9-%D8%A7%D9%84%D9%82%D9%88%D9%85%D9%8A%D8%A9/%D8%A7%D9%81%D8%AA%D8%AA%D8%A7%D8%AD-%D8%A7%D9%84%D8%AC%D8%A7%D9%85%D8%B9%D8%A9-%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A%D8%A9-%D8%A7%D9%84%D9%8A%D8%A7%D8%A8%D8%A7%D9%86%D9%8A%D8%A9-%D9%84%D9%84%D8%B9%D9%84%D9%88%D9%85-%D9%88%D8%A7%D9%84%D8%AA%D9%83%D9%86%D9%88%D9%84%D9%88%D8%AC%D9%8A%D8%A7-%D8%A8%D8%A8%D8%B1%D8%AC-%D8%A7%D9%84%D8%B9%D8%B1%D8%A8-%D8%A8%D9%85%D8%AD%D8%A7%D9%81%D8%B8%D8%A9-%D8%A7%D9%84%D8%A5%D8%B3%D9%83%D9%86%D8%AF%D8%B1%D9%8A%D8%A9/ "افتتاح الجامعة المصرية اليابانية للعلوم والتكنولوجيا ببرج العرب"]. ''presidency.eg''. 16 September 2020. Retrieved 9 March 2022.</ref>
== Rankings ==
{| class="wikitable"
|+E-JUST Rankings according to de Times Higher Education World University Rankings
{| class="wikitable"
|+
!Year
!THE World University Rankings
!THE Impact Rankings
!Egypt Rank
|-
|2024<ref name=":0" />
|601–800<sup>th</sup>
| ---
|1<sup>st</sup>
|-
|2023 <ref name=":0" />
|Reporter
|401–600<sup>th</sup>
|9<sup>th</sup>
|}
!Year
!Egypt rank
!Middle East & North Africa rank
|-
|2022<ref>[https://www.timeshighereducation.com/student/best-universities/best-universities-arab-world "Best universities in the Arab World 2022"]. ''Student''. 29 November 2022. Retrieved 5 December 2022.</ref>
|4th
|22nd
|-
|2021<ref>[https://www.timeshighereducation.com/world-university-rankings/2021/arabic-university-rankings "Arabic University Rankings"]. ''Times Higher Education (THE)''. 13 May 2021. Retrieved 5 December 2022.</ref>
|2nd
|11th
|}
== Faculties ==
E-JUST get up to 7 schools/faculties wey dey offer specialized programs insyd Bachelor's, Master's, den Doctorate degrees, as well as discipline-tailor Diplomas.
De temporary headquarters
University housing
'''* Faculty of Engineering''': De Faculty dey consist of de programs wey dey follow:
* School of Electronics, Communications den Computer Engineering (ECCE):
** Electrical Power Engineering Program.
** Electronics & Communications Engineering Program.
** Computer Science & Engineering Program.
** Biomedical & Bioinformatics Engineering Program.
* School of Innovative Design Engineering (IDE):
** Industrial & Manufacturing Engineering Program.
** Mechatronics den Robotics Engineering Program.
** Materials Science & Engineering Program.
* School of Energy, Environment, Chemicals den Petrochemicals Engineering (EECE):
** Chemicals and Petrochemicals Engineering Program.
** Energy Resources Engineering Program.
** Environmental Engineering Program.
'''* School of Basic and Applied Sciences.'''
'''* Faculty of International Business den Humanities.'''
'''* Faculty of Pharmacy.'''
'''* Faculty of Computer Science den Information Technology.'''
== Photo gallery ==
<gallery class="center">
File:E-JUST_4.jpg|Dey sign de bilateral agreement between Egypt den Japan make dem dey establish de varsity
File:E-JUST_3.jpg|E-JUST Soft Opening
File:E-JUST_2.jpg|E-JUST Soft Opening
</gallery>
== References ==
<references />
== External links ==
* [http://www.ejust.edu.eg/ Official Website]
[[Category:Universities insyd Egypt]]
[[Category:Universities den colleges dem establish insyd 2009]]
[[Category:2009 establishments insyd Egypt]]
[[Category:Egypt–Japan relations]]
[[Category:New Borg El Arab]]
[[Category:Educational institutions dem establish insyd 2009]]
[[Category:Japan]]
h9t1uv20owvy4txk0s7d1rga573azkp
Category:Egypt–Japan relations
14
5205
107631
30816
2026-07-23T20:13:28Z
~2026-41365-45
7047
107631
wikitext
text/x-wiki
[[Category:Egypt]]
[[Category:Japan]]
mzvn1o73h933didwdewcwbmem79c6h3
Category:21st-century Japanese sportswomen
14
7155
107632
36061
2026-07-23T20:14:10Z
~2026-41365-45
7047
107632
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
enlndqnbvdp2rxl3ak9blupt7iyo2iv
Category:Medalists at de 2012 Summer Olympics
14
7183
107647
36131
2026-07-23T20:20:59Z
~2026-41365-45
7047
107647
wikitext
text/x-wiki
[[Category:Medalists]]
[[Category:2012 Summer Olympics]]
r2kd5jfbwhtorzf85du0yujos5ququt
Category:Footballers at de 2012 Summer Olympics
14
7344
107654
36498
2026-07-23T20:23:40Z
~2026-41365-45
7047
107654
wikitext
text/x-wiki
[[Category:Footballers]]
[[Category:2012 Summer Olympics]]
2i0uqtaz1cqgesiwp3mkpax697yq643
Category:2011 FIFA Women's World Cup players
14
7351
107670
36505
2026-07-23T20:31:20Z
~2026-41365-45
7047
107670
wikitext
text/x-wiki
[[Category:FIFA Women's World Cup players]]
9aw3md7xaxwcyzz478tsmj4ybjngisx
Category:2015 FIFA Women's World Cup players
14
7353
107666
36507
2026-07-23T20:29:49Z
~2026-41365-45
7047
107666
wikitext
text/x-wiki
[[Category:FIFA Women's World Cup players]]
9aw3md7xaxwcyzz478tsmj4ybjngisx
Category:Olympic silver medalists for Japan
14
7461
107658
36693
2026-07-23T20:25:48Z
~2026-41365-45
7047
107658
wikitext
text/x-wiki
[[Category:Summer Olympic Games]]
[[Category:Silver medalists]]
[[Category:JApan]]
6i5pise0bt3xrmwrmtokho5ytbu20un
Category:Medalists at de 2006 Asian Games
14
7468
107639
36700
2026-07-23T20:17:33Z
~2026-41365-45
7047
107639
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
Cinema of Africa
0
7999
107717
105454
2026-07-23T23:40:57Z
InternetArchiveBot
29
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
107717
wikitext
text/x-wiki
{{Databox}}
[[File:COLLECTIE_TROPENMUSEUM_Straatgezicht_met_filmposter_Tunis_TMnr_20013070.jpg|right|thumb|Cinematic street poster insyd Tunis, [[Tunisia]] for de Egyptian film ''Saladin the Victorious'' (1963, Arabic: الناصر صلاح الدين, Al Nasser Salah Ad-Din) wey Youssef Chahine direct wey dey star Ahmed Mazhar as Saladin, Salah Zulfikar, Nadia Lutfi den odas.]]
'''Cinema of Africa''' dey cover both history plus present of how dem dey make anaa show films for Africa continent insyd, wey esanso dey refer to de people wey dey involve for dis kind of audiovisual culture. E start from early 20th century, wen dem dey use film reels as de main cinematic technology. As dem get more dan 50 countries wey get audiovisual traditions, no be one single 'African cinema' dey. Both historically den culturally, dem get major regional differences between North Africa den sub-Saharan cinemas, den between cinemas of different countries.<ref name=":3">Hayward, Susan. "Third World Cinemas: African Continent" in ''Cinema Studies: The Key Concepts'' (Third Edition). Routledge, 2006. p. 426-442</ref>
[[Egypt]] den [[Tunisia]] get sam of de oldest cinema for de world. Egypt own be de biggest wey dey flourish well well for Africa.<ref>Houissa, Ali. [https://guides.library.cornell.edu/MidEastCinema/Egypt "LibGuides: Middle Eastern & North African Cinema & Film: Egyptian Cinema & Film"]. ''guides.library.cornell.edu''. Retrieved 2023-12-18.</ref><ref>Gaffney, Jane (1987). [https://www.jstor.org/stable/41857918 "The Egyptian Cinema: Industry and Art in a Changing Society"]. ''Arab Studies Quarterly''. '''9''' (1): 53–75. ISSN [https://search.worldcat.org/issn/0271-3519 0271-3519]. JSTOR [https://www.jstor.org/stable/41857918 41857918].</ref> Pioneers Auguste plus Louis Lumière screen dema films for Alexandria, Cairo, Tunis, Susa, Libya den Hammam-Lif, [[Tunisia]] for 1896 insyd.<ref>Leaman, Oliver (2003-12-16). ''[https://books.google.com/books?id=LmSFAgAAQBAJ&pg=PA23 Companion Encyclopedia of Middle Eastern and North African Film]''. Routledge. ISBN <bdi>[[:en:Special:BookSources/9781134662524|9781134662524]]</bdi>.</ref><ref>[https://www.bibalex.org/alexcinema/historical/beginnings.html "Alexandria, Why? (The Beginnings of the Cinema Industry in Alexandria)"]. Bibliotheca Alexandrina's AlexCinema.</ref> Albert Samama Chikly dey say be de first person wey produce African cinema wey komot Africa, show ein own short documentaries for casino of Tunis as far back as December 1905.<ref name="Ritrovato">[https://festival.ilcinemaritrovato.it/en/proiezione/albert-samama-chikly-tre-programmi/ "Three Programmes"]. Cinema Ritrovato. Retrieved 14 October 2020.</ref> Chikly den ein daughter Haydée Tamzali go on produce important early films like 1924 ein ''The Girl from Carthage''. For 1927, Egypt produce Laila, de first big film wey Aziza Amir make. For 1935, Studio Misr for Cairo start produce mostly comedies den musicals wey no be too original, buh e sanso films like Kamal Selim ein ''The Will'' (1939). Egyptian cinema cam turn strong for 1940s, 1950s, den 1960s, dem consider am as Golden Age.<ref>[https://web.archive.org/web/20171125070157/http://eng.babelmed.net/dossier/120-egypt/6913-the-golden-age-of-egyptian-cinema-the-1940s-to-1960s.html "The Golden Age of Egyptian Cinema – the 1940s to 1960s"]. Archived from [http://eng.babelmed.net/dossier/120-egypt/6913-the-golden-age-of-egyptian-cinema-the-1940s-to-1960s.html the original] on 2017-11-25. Retrieved 2017-10-06.</ref> Youssef Chahine ein big film ''Cairo Station'' (1958) lay de foundation for Arab film, make am start dey grow.<ref>[http://old.bfi.org.uk/sightandsound/feature/49355 "African Cinema: Invisible Classics"]. British Film Institute. [https://web.archive.org/web/20120803090558/http://old.bfi.org.uk/sightandsound/feature/49355 Archived] from the original on 2012-08-03.</ref>
Nigeria film industry be de biggest for Africa, look sharp-sharp, dem dey produce plenty films every year, dem get plenty money, and plenty people dey watch dem.<ref>[https://www.afriff.com/post/top-10-film-industries-in-africa#:~:text=Topping%20the%20list%20is%20Nigeria,second%20only%20to%20India's%20Bollywood "Top 10 film industries in Africa"]. ''afriff.com''. AFRIFF African International Film Festival. 4 August 2023. Retrieved 2023-10-25.</ref><ref>[https://web.archive.org/web/20130309160415/https://www.un.org/apps/news/story.asp?NewsID=30707 "Nigeria surpasses Hollywood as world's second largest film producer – UN"]. ''un.org''. United Nations. 2009-05-05. Archived from [https://www.un.org/apps/news/story.asp?NewsID=30707 the original] on 2013-03-09. Retrieved 2023-10-25.</ref><ref name="Independent 2010">[https://web.archive.org/web/20100518123107/http://www.independent.co.uk/arts-entertainment/films/nigerias-nollywood-eclipsing-hollywood-in-africa-1974087.html "Nigeria's Nollywood eclipsing Hollywood in Africa"]. ''The Independent''. May 15, 2010. Archived from [https://www.independent.co.uk/arts-entertainment/films/nigerias-nollywood-eclipsing-hollywood-in-africa-1974087.html the original] on May 18, 2010. Retrieved 2010-11-24.</ref> E sanso be de second biggest for de world, dem dey make plenty films.<ref name=":2">[https://www.pwc.com/ng/en/assets/pdf/spolight-the-nigerian-film-industry.pdf "Spotlight: The Nigerian Film Industry"] (PDF). July 2017.</ref> For 2016, dem contribute 2.3% to Naija GDP, wey show say dem dey important for de country economy.<ref name=":2" />
== History ==
=== Colonial era ===
During colonial time, Western people dey control de story wey dem tell about Africa thru films. Dem make films wey show black people as if dem no be human, anaa dem be slaves, anaa dem be wild animals wey dey eat human being. See films like ''Kings of de Cannibal Islands'' insyd 1909, ''Voodoo Vengeance'' (1913) den ''Congorilla'' (1932) wey dem use take portray Africa people bad.<ref name=":3" />
[[File:Barsoum_Looking_for_a_Job_(1923_film)_10.jpg|alt=Barsoum Looking for a Job (1923 film) 10|thumb|Bishara Wakim insyd ''Barsoum Looking for a Job'' (1923)]]
Films wey colonial masters make about Africa show say Africa be strange place wey no get past or culture. Dem get plenty films like Tarzan wey dem take from Edgar Rice Burrou story, plus de film ''The African Queen'' (1951), den different films wey dem make from H. Rider Haggard ein book ''King Solomon's Mines'' (1885). All dis films dey show Africa as bush mannas.<ref name="authentic">Murphskirty, David (2000). [https://dokumen.pub/african-cinema-manifesto-and-practice-for-cultural-decolonization-volume-1-colonial-antecedents-constituents-theory-and-articulations-0253066204-9780253066206.html "Africans Filming Africa: Questioning Theories of an Authentic African Cinema"]. ''Journal of African Cultural Studies''. '''13''' (2): 239–249. doi:[[doi:10.1080/713674315|10.1080/713674315]]. JSTOR [https://www.jstor.org/stable/1771833 1771833]. S2CID [https://api.semanticscholar.org/CorpusID:55143264 55143264].</ref>
De first film wey dem make complete for Africa be de South African film ''The Great Kimberley Diamond Robbery'' (1911). Dem make am for [[South Africa]], wey na de first time dem dey make film like dat for Africa.<ref name=":1">[https://web.archive.org/web/20211115151107/http://www.gautengfilm.org.za/news/news-archive/2010/february-2010/640-almost-100-years-old-and-still-rolling-the-history-of-sa-cinema-part-29 "Almost 100 years old and still rolling! The history of SA cinema Part 2"]. February 2010. Archived from [http://www.gautengfilm.org.za/news/news-archive/2010/february-2010/640-almost-100-years-old-and-still-rolling-the-history-of-sa-cinema-part-29 the original] on 17 October 2020.</ref> De Voortrekkers (1916) follow am, wey be South Africa ein (den maybe Africa ein) first big film and oldest film wey still dey exist, about de Great Trek wey dem make am give Afrikaner people to watch.<ref>[https://web.archive.org/web/20230612145106/https://www.africa-in-motion.org.uk/resources/africas-lost-classics/films/event/315/ "Voortrekkers (1916)"]. ''Africa in Motion''. Retrieved 2023-06-12.</ref> Early South African cinema get one topic wey dem dey focus on, plus dat be de quarrel between Afrikaner people (especially Boer) den British people wey dey live for South Africa.<ref name=":1" />
Plenty early films wey dem make to show de life of indigenous people, dey focus for de things top wey make dem different from white people wey dem consider as civilized, den dis one dey help spread colonial lies.<ref>[https://www.cinefiliaritrovata.it/the-anti-colonial-gaze-in-ethnographic-cinema-voyage-au-congo-e-marquis-de-wavrin/ "The anti-colonial gaze in ethnographic cinema: "Voyage au Congo" e "Marquis de Wavrin""]. Cinefilia ritrovata. July 1, 2018. Retrieved October 18, 2018.</ref> Marc Allégret ein first film, ''Voyage au Congo'' (1927), show Masa people for good way insyd, especially one small boy wey dey entertain ein kiddie bro plus baby crocodile wey dem tie plus string. Buh dem no show Africans as equals, dem show dem as human being buh no be as people wey get sense. For example, dem write something for de film say de way dem dey dance traditional dance be like kiddie play. Ein lover, writer André Gide, follow am go Congo wey he wrep book wey dem call ''Voyage au Congo'' too. Allégret later make film Zouzou, wey star Josephine Baker, wey be de first big film wey star black woman. Josephine Baker cause trouble for Paris arts people secof she dance for Revue Nègre plus banana string per for ein body
[[File:Bahiga_Hafez.jpg|alt=Bahiga Hafez|thumb|Egyptian filmmaker den actress Bahiga Hafez, (1908-1983) insyd 1930s.]]
For French colonies, dem no allow Africans make dem own film by de 1934 Laval Decree.<ref>Barlet, Olivier (2012). "The Ambivalence of French Funding". ''Black Camera''. '''3''' (2): 205–16. doi:[[doi:10.2979/blackcamera.3.2.205|10.2979/blackcamera.3.2.205]]. JSTOR [https://www.jstor.org/stable/10.2979/blackcamera.3.2.205 10.2979/blackcamera.3.2.205]. S2CID [https://api.semanticscholar.org/CorpusID:143881053 143881053].</ref><ref>Diawara, Manthia (1992). ''African Cinema: Politics and Culture''. Bloomington, Indiana: Indiana University Press, pp. 22–23.</ref> De ban stunt de growth for film as means of African expression, political, cultural, den artistic.<ref>Halhoul, Khalid (2012). "Using African Cinema to Shift Cultural Perceptions." ''Utne Reader'' (June/July 2012 edition). Mixed Media Section, pp. 78–79.</ref> Congolese man, Albert Mongita, manage make film wey dem call ''The Cinema Lesson'' for 1951, den for 1953, Mamadou Touré make film wey dem call ''Mouramani'', wey come from folk story about one man den ein dog.<ref>Wes Felton (December 2010). [https://web.archive.org/web/20201006005633/https://www.sensesofcinema.com/2010/feature-articles/caught-in-the-undertow-african-francophone-cinema-in-the-french-new-wave/ "Caught in the Undertow: African Francophone Cinema in the French New Wave"]. Senses of Self.</ref> For 1955, Paulin Soumanou Vieyra - wey komot [[Benin]], buh go school for [[Senegal]] - den ein paddies from Le Group Africain du Cinema, make short film for Paris, wey dem call ''Afrique-sur-Seine'' (1955). Vieyra learn filmmaking for Institut des hautes études cinématographiques (IDHEC) for Paris, wey even though dem no allow people make film for Africa, dem give am permission make he film for France.<ref>Diawara (1992), ''African Cinema'', p. 23.</ref> Dem consider am de first film wey black African direct, ''Afrique Sur Seine'' dey explore de difficulties of being an African for 1950s for France.<ref>Gugler, Josef (2003). ''African Film: Re-Imagining a Continent''. Bloomington, Indiana: Indiana University Press, p. 3.</ref>
As Portuguese colonies get independence but na dem no get place wey dem dey make film, because de colonial government no allow dem make film except dem be colonialist propaganda, wey dey show say indigenous people no reach. So, dem no dey think am till dem get independence to find way wey dem go make African voices wey be real.<ref>Abiola Irele; Biodun Jeyifo (2010). Abiola Irele; Biodun Jeyifo (eds.). [https://books.google.com/books?id=hF_xjFL6_NEC&pg=PA233 ''The Oxford Encyclopedia of African Thought'']. Vol. 1. Oxford University Press. p. 234. ISBN <bdi>[[:en:Special:BookSources/978-0195334739|978-0195334739]]</bdi> – via Google Books.</ref>
For 1930s, dem do one experiment wey dem call Bantu Educational Kinema Experiment for eastern and south-eastern African countries. Dem do dis ting to "teach Bantu people, mostly about how to keep body clean". Buh three films per from dis project still dey exist; dem keep dem for British Film Institute.<ref>Notcutt, L. A., and G. C. Latham, ''The African and the Cinema: An Account of the Work of the Bantu Educational Cinema Experiment during the Period March 1935 to May 1937'', London: Edinburgh House Press, 1937.</ref>
Before de colonies get freedom, small films wey talk against colonialism dey come out. Example be Statues Also Die (''Les statues meurent aussi'') wey Chris Marker plus Alain Resnais make, wey talk about how European people steal African art. De second part of dis film, Afrique 50 by René Vautier, show how people dey protest against colonialism for [[Ivory Coast|Côte d'Ivoire]] den Upper Volta (now [[Burkina Faso]]), buh dem ban am.<ref>Melissa Thackway (2003). ''Africa Shoots Back: Alternative Perspectives in Sub-Saharan Francophone African Film''. Bloomington, Indiana: Indiana University Press, ISBN [[:en:Special:BookSources/978-0-253-34349-9|978-0-253-34349-9]], pp. 7 and 32.</ref>
[[File:Lobna_Abdel_Aziz_(Bride_of_the_Nile)_2.jpg|thumb|Lobna Abdel Aziz in ''Bride of the Nile'' (1963)]]
Dat time, one French man, Jean Rouch, wey dey make film about Africa culture, dey work for Africa too. Ein films, like ''Jaguar'' (1955), ''Les maitres fous'' (1955), ''Moi, un noir'' (1958) den ''La pyramide humaine'' (1961), cause trouble for both French den African people. Buh Rouch no openly talk against colonialism, ein films just change how people see Africa plus esana give African people dema new voice.<ref>For more on Rouch's work, see Steven Feld (ed.), ''Cine-Ethnography'' (1994), and Paul Henley, ''The Adventure of the Real: Jean Rouch and the Craft of Ethnographic Cinema'' (2010).</ref> Although na Ousmane Sembene plus odas<ref>See, for example, Nwachukwu Frank Ukadike, ''Black African Cinema'' (1994), pp. 48–58.</ref> accuse Rouch of he dey see Africans "say dem be insects,"<ref>[https://web.archive.org/web/20240721132202/http://www.maitres-fous.net/Sembene.html "You look at us like insects"]. ''maitres-fous.net''. Retrieved 2021-10-12.</ref> Jean Rouch be important person for Africa film ein growth insyd, plus he san be de first person wey work plus African people, many of dem cam turn important for Africa cinema insyd (like Oumarou Ganda, Safi Faye, Moustapha Alassane, den odas).<ref>Diawara (1992). ''African Cinema'', pp. 23–24. See also Henley, Paul (2010), ''The Adventure of the Real: Jean Rouch and the Craft of Ethnographic Cinema'', Chicago: University of Chicago Press, pp. 310–337.</ref>
Secof most films wey dem make before Africa countries get independence dey show racism, African filmmakers wey come after independence, like Ousmane Sembene den Oumarou Ganda, den odas, see filmmaking as way to correct de bad image wey Western filmmakers show about Africans, wey dem wan take back de image of Africa give Africans.<ref>Thackway (2003). ''Africa Shoots Back'', pp. 1–6.</ref>
=== Post-independence den 1970s ===
[[File:Beattie_and_GBC_puppets_'68_(3).jpg|right|thumb|''The Ghana Broadcasting Puppet Show'' developed by Beattie Casely-Hayford (1968)]]
[[File:Salah_Zulfikar&Soad_Hosny.jpg|alt=|left|thumb|220x220px|Salah Zulfikar den Soad Hosny insyd de Egyptian film ''Those People of the Nile'' (Egyptian Arabic: الناس والنيل, Al Nass Wal Nil) Youssef Chahine direct am (1972)]]
De first Africa film wey win recognition outsyd Africa be Sembène Ousmane ein ''La Noire de''... anaa ''Black Girl''. De film show how one African woman dey suffer secof she dey work as housegirl for France. De film win Prix Jean Vigo award for 1966.<ref>Bilge Ebiri (November 5, 2015). [http://www.vulture.com/2015/02/how-ousmane-sembene-invented-african-cinema.html "The Story of Sembene!: How Ousmane Sembene Invented African Cinema"]. ''Vulture''. Retrieved October 28, 2018.</ref> Sembène start as writer, wey he turn to film-making to reach more people. Dem still dey bell am "de papa of Africa cinema".<ref>McLellan, Dennis (2007-06-14). [https://www.latimes.com/archives/la-xpm-2007-jun-14-me-sembene14-story.html "Ousmane Sembene, 84; Sengalese hailed as 'the father of African film'"]. ''Los Angeles Times''. Retrieved 2024-09-24.</ref> Sembène ein own country, Senegal, continue to be de place wey Africa film production dey happen most for over ten years.
When dem create Africa film festival FESPACO for Burkina Faso (wey be Upper Volta before) for 1969, Africa film get ein own place wey dem dey showcase am. Now, FESPACO dey happen every two years, wey dem dey alternate am plus Carthago film festival for Tunisia.
De Pan African Federation of Filmmakers (Fédération Panafricaine des Cinéastes, anaa FEPACI)<ref>[http://www.fepaci.org/congress1 FEPACI]. [https://web.archive.org/web/20140226111448/http://www.fepaci.org/congress1/ Archived] 2014-02-26 at the Wayback Machine</ref> FEPACI start for 1969 to help Africa film industries grow in terms of how dem make film, share film, den show film. From de beginning, people see FEPACI as important partner to Organisation of African Unity (OAU), wey be [[African Union]] now. FEPACI dey look at how film fit into politics, economy, den culture development for Africa countries den de whole continent
Med Hondo ein film, ''Soleil O'', wey dem make for 1969, become popular quick quick. Hondo care about politics just like Sembène, buh he use different way of filming to show how hard be for stranger for France if you get de "wrong" skin colour.
=== 1980s den 1990s ===
[[File:Souleymane_Cissé.jpg|left|thumb|Malian film director Souleymane Cissé at de third International Festival "Cines del Sur" insyd Granada, 2009.]]
Souleymane Cissé ein film, ''Yeelen'' (from Mali, 1987), be de first film wey Black African make wey go compete for Cannes.<ref>Nadia Neophytou (May 19, 2018). [https://qz.com/africa/1282690/african-filmmakers-in-cannes-2018-want-to-take-back-control-from-european-producers/ "In Cannes, African filmmakers are plotting to take back control from European producers"]. ''QuartzAfrica''.</ref> Cheick Oumar Sissoko ein film, ''Guimba'' (from Mali, 1995), also get good talk for West. Many films for 1990s, wey dey include ''Quartier Mozart'' by Jean-Pierre Bekolo (from [[Cameroon]], 1992), dey show life for big city Africa wey dey connect plus de whole world.
Nigeria film industry blow up for 1990s secof how easy dem get video camera for Nigeria, wey soon Nollywood cam turn de center of West Africa English-language films. Nollywood drop 1844 movies for 2013 alone.<ref>Jake Bright (June 24, 2015). [http://fortune.com/2015/06/24/nollywood-movie-industry/ "Meet 'Nollywood': The second largest movie industry in the world"]. Fortune. Retrieved October 28, 2018.</ref>
De last cinema for Kinshasa, [[Democratic Republic of the Congo]], close down for 2004. Many of de old cinema places dem convert to churches.<ref>Colm McAuliffe (November 6, 2015). [https://www.theguardian.com/world/2015/nov/06/congo-cinema-religion-la-belle-at-the-movies "The death of cinema in Congo: how churches killed off cowboy films: As the country is left without a single film theatre, a new documentary explores the end of a once thriving movie culture"]. ''The Guardian''. Retrieved October 28, 2018.</ref> Buh for 2009, UN refugee agency show film dem bell ''Breaking the Silence'' for South Kivu den Katanga Province. De film talk about how dem dey rape women during Congolese civil war.<ref>[https://reliefweb.int/report/democratic-republic-congo/dr-congo-unhcr-uses-cinema-spread-awareness-sexual-violence "DR Congo: UNHCR uses cinema to spread awareness of sexual violence"]. July 30, 2009. Retrieved October 28, 2018.</ref> Buh for neighboring Brazzaville, [[Republic of the Congo]], dem open new 200-seat cinema, MTS Movies House, for 2016,<ref>Jean-Sebastien Josset (August 25, 2016). [https://www.jeuneafrique.com/351255/culture/congo-ouverture-dun-cinema-a-pointe-de-technologie/ "Congo : ouverture d'une salle de cinéma à la pointe de la technologie: La République du Congo s'offre un cinéma de haut standing de 200 places à Brazzaville"] [Congo:Opening of a cutting-edge cinema hall: The Republic of the Congo getting a luxury cinema with 200 seats in Brazzaville] (insyd French). JeuneAfrique. Retrieved October 28, 2018.</ref> den for April 2018, dem start build anoda new cinema.<ref>[http://www.adiac-congo.com/content/cinema-bientot-une-salle-de-projection-brazzaville-82177 "Cinéma : bientôt une salle de projection à Brazzaville"] [Cinema: Soon a screen in Brazzaville] (insyd French). 19 April 2018. Retrieved October 28, 2018.</ref>
De first Africa Film Summit happen for South Africa for 2006. After dat, FEPACI 9th Congress follow. [[Africa Movie Academy Awards]] start for 2004, show say local film industries like Nigeria own dey grow, wey film industry culture dey spread for sub-Saharan Africa.
=== 2000s den 2010s ===
[[File:Abderrahmane_Sissako_César_2016.jpg|left|thumb|Abderrahmane Sissako at the ceremony of the César Awards, Paris in 2016]]
[[File:منة_شلبي.jpg|thumb|Menna Shalabi, Egyptian film star]]
Nowadays Africa cinema dey talk about many things wey dey happen now den problems wey everybro dey face.
How people dey move from Africa go Europe plus how Africa den Europe countries dey relate to each oda dey inside many Africa films. Abderrahmane Sissako ein film, ''Waiting for Happiness'', show how one [[Mauritania]] city dey try fight against things wey komot outsyd dey change dem, thru de story of one man wey come back from Europe.<ref>Gonzalez, Ed (October 4, 2002). [https://www.slantmagazine.com/film/review/waiting-for-happiness "Waiting for Happiness"]. ''Slant Magazine''. Retrieved December 4, 2018.</ref> Migration na important thing for Mahamat Saleh Haroun ein film, ''Une Saison en France'' too, wey show how one family from Central Africa Republic dey try go stay for France.<ref>[https://en.unifrance.org/movie/42910/a-season-in-france "A Season in France (2017)"]. ''en.unifrance.org''. Retrieved 2018-12-04.</ref> Haroun be part of Chadian people wey dey live for France, wey he dey use de film talk about some things wey concern dis people wey dey live outsyd dem own country.<ref>[https://www.festival-cannes.com/en/artist/mahamat-saleh-haroun "Mahamat-Saleh HAROUN - Festival de Cannes 2018"]. ''Festival de Cannes 2018''. Retrieved 2018-12-04.</ref>
Africanfuturism den Afrofuturism be new style wey dey grow, wey dey encompass Africans both for de continent den insyd de diaspora wey tell science anaa speculative fiction stories wey dey involve Africa den African people. Neill Blomkamp ein film, ''District 9'', be well-known example, wey show how aliens invade South Africa.<ref>Cousins, Mark (September 3, 2012). [https://www.theguardian.com/film/filmblog/2012/sep/03/10-best-african-films "African Cinema: ten of the best"]. ''The Guardian''. Retrieved December 4, 2018.</ref> Wanuri Kahiu ein short film, ''Pumzi'', show fictional Maitu community for Africa 35 years after World War III, wey be futuristic.
Some directors like Haroun den Kahiu dey worry say no be enough cinema house wey people no dey appreciate cinema for some Africa countries.<ref>Kermeliotis, Teo (30 March 2010). [http://edition.cnn.com/2010/SHOWBIZ/Movies/03/26/wanuri.kahiu.pumzi/index.html "Wanuri Kahiu "In Kenya, I'm a hustler""]. ''CNN''. Retrieved 4 December 2018.</ref> But some organizations like Changamoto arts fund dey help give more resources den chances to African filmmakers.<ref>[https://web.archive.org/web/20201006005714/https://www.contemporaryand.com/institue/changamoto-arts-fund/ "Changamoto Arts Fund"]. ''Contemporary And''. 2018. Retrieved 4 December 2018.</ref>
=== 2020s ===
Some Africa countries no get freedom to talk, wey dey affect film industry bad bad. Dis one dey worse for [[Equatorial Guinea]].<ref>[https://cpj.org/reports/2019/09/10-most-censored-eritrea-north-korea-turkmenistan-journalist/ "10 Most Censored Countries"]. ''Committee to Protect Journalists''. Retrieved 2021-06-01.</ref> De feature film, ''The Writer From a Country Without Bookstores,''<ref>[http://www.elescritordeunpais.com/en "The Writer from a Country Without Bookstores"].</ref> be de first film wey dem shoot for dat country, wey e dey criticize Teodoro Obiang Nguema Mbasogo ein rule, wey be one of de longest rule for de whole world.
=== Themes ===
Africa cinema, like cinema for oda places, dey cover chaw topics. For Algiers insyd 1975, Pan African Federation of Filmmakers (FEPACI) take Charte du cinéaste africain (Charter of de African filmmaker), wey know say postcolonial den neocolonial tings important for Africa cinema. De filmmakers begin by talk about how Africa societies dey suffer under neocolonialism. "De way Africa societies dey live now be say dem no get freedom for many tings: politics, economy, culture." Africa filmmakers show dem support for filmmakers wey dey fight for good tings for other places. Africa cinema dey count as part of Third Cinema
[[File:Ousmane_Sembène_(1987)_by_Guenter_Prust.jpg|thumb|Senegalese film director, producer den writer Ousmane Sembène (1923-2007).]]
Some Africa filmmakers, like Ousmane Sembène, dey try to give Africa history back to Africa people by remembering how dem resist European den Islamic people wey come rule dem.
Africa filmmaker dey resemble de traditional griot. Like griot, dem task be to express den show tings wey happen for de community. De way Africa people dey tell stories orally san dey appear for Africa films. Africa film sanso take influence from oda continents, like Italian neorealism, Brazilian Cinema Novo den de Bertolt Brecht ein theatre
== Women wey be directors ==
<gallery class="center">
File:Kemi_Adetiba.png|Kemi Adetiba (born 1980), Nigerian film maker, 2014.
File:Safi_Faye.jpg|Safi Faye (1943-2023), Senegalese film director, anthropologist, ethnologist den feminist, 2004.
File:Wanuri_Kahiu.png|Wanuri Kahiu (born 1980), Kenyan film director, producer, den author, 2018.
File:هالة_خليل_3.jpg|Hala Khalil (born 1967), Egyptian film director, producer, den screenwriter, 2018.
</gallery>Safi Faye, wey be ethnologist den filmmaker, dem know am as one of de pioneers of Senegalese cinema den cinema for Africa continent as a whole. She be de first Africa woman wey direct film wey she get recognition from outsyd.<ref>Beti Ellerson, "African through a Woman's Eyes: Safi Faye's Cinema" in ''Focus on African Cinema''(ed) Francoise Pfaff, (Bloomington: Indiana University, 2004), 185</ref> Faye ein first film, ''La Passante'' (De Passerby), come out for 1972, den after dat, she release ein first big film, Kaddu Beykat (Letter from My Village), for 1975. Faye continue to work hard wey she release many tings for de late 1970s till her last work, de 1996 drama film Mossane.
Sarah Maldoror, French filmmaker den de daughter give people wey komot Guadeloupe, dey known as one of de pioneers of Africa cinema for outsyd Africa. She start Les Griots (The Troubadours), de first drama group for France wey focus for actors from Africa den Afro-Caribbean.<ref name=":4">[https://web.archive.org/web/20190508145024/https://www.documentamadrid.com/en/news/pioneer-african-cinema-sarah-maldoror-special-guest-documentamadrid-and-reina-sofia-museum "The pioneer in African cinema Sarah Maldoror, special guest to DocumentaMadrid and the Reina Sofía Museum | DocumentaMadrid"]. Archived from [https://www.documentamadrid.com/en/news/pioneer-african-cinema-sarah-maldoror-special-guest-documentamadrid-and-reina-sofia-museum the original] on 2019-05-08. Retrieved 2019-05-08.</ref> She start from theatre wey she go study filmmaking for State Institute of Cinematography of de Russian Federation (VGIK) for Moscow.<ref name=":4" /> For 1972, Maldoror shoot her film ''Sambizanga'' about de war wey happen for [[Angola]] from 1961-74. De women wey survive dat war be de subject of de documentary ''Les Oubliées'' (De Forgotten Women), wey Anne-Laure Folly make 20 years later. Maldoror sanso work as assistant director on ''The Battle of Algiers'' (1966) plus filmmaker Gillo Pontecorvo.
For 1995 insyd, Wanjiru Kinyanjui make de feature film ''The Battle of the Sacred Tree'' for [[Kenya]].<ref>G. Cahill. [https://web.archive.org/web/20181028112258/https://www.clevelandfilm.org/films/1996/the-battle-of-the-sacred-tree "THE BATTLE OF THE SACRED TREE"]. Cleaveland International Film Festival. Archived from [https://www.clevelandfilm.org/films/1996/the-battle-of-the-sacred-tree the original] on 2018-10-28. Retrieved 2018-10-28.</ref>
For 2008, Manouchka Kelly Labouba cam turn de first woman for [[Gabon]] cinema history wey direct film wey no be real. Ein short film ''Le Divorce'' talk about how modern tings den traditional tings dey affect de divorce of one young Gabon couple.
Kemi Adetiba, wey be music video director before, make ein first film as director for 2016 plus ''The Wedding Party''. De film, wey talk about tings wey happen for de celebration of one big wedding for aristocratic people, go become de most successful Nollywood film for de history of her country, [[Nigeria]].
Wanuri Kahiu be Kenyan film director, wey people know well for ein film ''From a Whisper'', wey win Best Director, Best Screenplay, den Best Picture for Africa Movie Academy Awards for 2009. Almost 10 years after dem release ''From a Whisper'', Kahiu ein film Rafiki, wey be story about two teenage girls wey dey grow up for present-day Kenya, come out. De film make news, partly secof dem select am for Cannes Film Festival buh sanso secof dem talk about sexuality wey no dey okay for Kenyan government.<ref>[http://www.theguardian.com/film/2019/apr/12/kenyan-director-wanuri-kahiu-rafiki-lesbianism-african-art "Meet the director of the Kenyan lesbian romance who sued the government who banned it"]. ''The Guardian''. 2019-04-12. Retrieved 2021-06-01.</ref>
Rungano Nyoni, wey people know well for de film ''I am Not a Witch'' wey get praise from around de world, be Zambian-Welsh director den screenwriter. Dem born am insyd [[Zambia]] buh sanso grow up for Wales, Nyoni go graduate from University of Arts for London plus Master's degree insyd acting for 2009.<ref>[https://web.archive.org/web/20240225044524/https://iffr.com/en/persons/rungano-nyoni "Rungano Nyoni | IFFR"].</ref> Ein work as filmmaker (whether as director anaa screenwriter) sanso dey include de short films: ''The List'' (2009, short), ''Mwansa The Great'' (2011, short), ''Listen'' (2014, short), wey she sanso be one of de directors of de international film project ''Nordic Factory'' (2014).<ref>[http://rungano.com/about-1 "films"]. ''rungano nyoni''. Retrieved 2021-06-01.</ref><ref>[https://web.archive.org/web/20210925001858/http://pebble.dk/portfolio_page/nordic-factory-2014/ "Producer and script consulting Valeria Richter"]. ''Pebble.dk''. Retrieved 2021-06-01.</ref> She win many awards, weydey include BAFTA for best new British filmmaker for ''I am Not a Witch''.<ref>Donnelly, Matt (2018-11-27). [https://variety.com/2018/film/news/caa-rungano-nyoni-1203037801/ "CAA Signs 'I Am Not a Witch' Director Rungano Nyoni"]. ''Variety''. Retrieved 2021-06-01.</ref>
== UNESCO dema report for African film industry ==
For October 2021, UNESCO release report give film den audiovisual industry give 54 countries for Africa insyd, wey include numbers den facts, den also analysis of de good den bad tings for de industry at Africa level den regional level. De report give advice on how to make film den audiovisual sectors better for Africa wey e invite government people, professional groups, companies, filmmakers, den artists to work together to make am happen.<ref>Lora-Mungai, Marie; Pimenta, Pedro (2021). [https://unesdoc.unesco.org/ark:/48223/pf0000379165/PDF/379165eng.pdf.multi ''The African film industry. Trends, challenges and opportunities for growth''.] UNESCO. p. 3. ISBN <bdi>[[:en:Special:BookSources/978-92-3-100470-4|978-92-3-100470-4]]</bdi>. OCLC [https://search.worldcat.org/oclc/1346154769 1346154769]. Retrieved 2024-03-21.</ref>
Part one of de report be titled Pan-African Trends Wey Dey Shape de Future of Africa's Film and Audiovisual Sector, Part two be Strategic Development and Growth Models, Part three show detailed information about each country, den de annex list important dates for African cinema from 1896 to 2021. Apart from how audiovisual productions start den grow, de report sanso talk about big filmmakers den dema good work, recent tings like online streaming, wey e sanso be de problems wey de industry dey face like lack of training, money, den appreciation.<ref>Lora-Mungai & Pimenta 2021, pp. 7–9.</ref>
== List of cinema by region ==
=== North Africa ===
* Cinema of Algeria
* Cinema of Egypt
* Cinema of Libya
* Cinema of Morocco
* Cinema of Tunisia
=== West Africa ===
* Cinema of Benin
* Cinema of Burkina Faso
* Cinema of Cape Verde
* Cinema of the Gambia
* [[Cinema of Ghana]]
* Cinema of Guinea
* Cinema of Guinea-Bissau
* Cinema of Ivory Coast
* Cinema of Liberia
* Cinema of Mali
* Cinema of Mauritania
* Cinema of Niger
* Cinema of Nigeria
* [[Cinema of Senegal]]
* Cinema of Sierra Leone
* Cinema of Togo
=== Central Africa ===
* Cinema of Angola
* Cinema of Burundi
* Cinema of Cameroon
* Cinema of the Central African Republic
* Cinema of Chad
* Cinema of the Democratic Republic of the Congo
* Cinema of Equatorial Guinea
* Cinema of Gabon
* Cinema of the Republic of the Congo
* Cinema of Rwanda
* Cinema of São Tomé and Príncipe
=== East Africa ===
* Cinema of the Comoros
* Cinema of Djibouti
* Cinema of Eritrea
* Cinema of Ethiopia
* Cinema of Kenya
* Cinema of Mauritius
* Cinema of Seychelles
* Cinema of Somalia
* Cinema of South Sudan
* Cinema of Sudan
* Cinema of Tanzania
* Cinema of Uganda
=== Southern Africa ===
* Cinema of Botswana
* Cinema of Eswatini
* Cinema of Lesotho
* Cinema of Madagascar
* Cinema of Malawi
* Cinema of Mozambique
* Cinema of Namibia
* Cinema of South Africa
* Cinema of Zambia
* Cinema of Zimbabwe
== Directors by country ==
* '''Algeria''': Merzak Allouache, Malek Bensmaïl, Nina Khada, Karim Moussaoui
* '''Angola''': Zézé Gamboa,<ref>[http://www.africanfilmny.org/2013/zeze-gamboa/ Biography], African Film Festival, New York.</ref> Miguel Hurst
* '''Benin''': Idrissou Mora Kpaï, Jean Odoutan
* '''Botswana''': Thabiso Maretlwaneng, Thato Rantao Mwosa
* '''Burkina Faso''': Gaston Kaboré, Valérie Kaboré, Dani Kouyaté, Fanta Régina Nacro, Sanou Kollo, Idrissa Ouedraogo, Pierre Rouamba, Drissa Touré, Apolline Traoré, Saint Pierre Yaméogo
* '''Burundi''': Justine Bitagoye, Eddy Munyaneza, Léonce Ngabo
* '''Cameroon''': Jean-Pierre Bekolo, Bassek Ba Kobhio, Urbain Dia Moukouri, Bernard Auguste Kouemo Yanghu, Joséphine Ndagnou, Jean-Paul Ngassa, Jean-Pierre Dikongué Pipa, Thérèse Sita-Bella, Francis Taptue, Jean-Marie Teno, Francois L. Woukoache
* '''Cape Verde''': Lolo Arziki, Leão Lopes, Júlio Silvão Tavares
* '''Chad''': Issa Serge Coelo, Mahamat Saleh Haroun
* '''Comoros''': Hachimiya Ahamada
* '''Côte d'Ivoire''': Marie-Louise Asseu, Sidiki Bakaba, Akissi Delta, Henri Duparc, Desiré Ecaré, Fadika Kramo Lanciné, Roger Gnoan M'Bala, Jacques Trabi
* '''Democratic Republic of the Congo''': Machérie Ekwa Bahango, Balufu Bakupa-Kanyinda, Baloji, Mars Kadiombo Yamba Bilonda, Guy Bomanyama-Zandu, Claude Haffner, Dieudo Hamadi, Mamadi Indoka, Kiripi Katembo, Joseph Kumbela, Laura Kutika, Zeka Laplaine,<ref>Thackway (2003). ''[https://books.google.com/books?id=iA--kyw_FhsC Africa Shoots Back]''. Indiana University Press. ISBN <bdi>[[:en:Special:BookSources/9780852555774|9780852555774]]</bdi>. Retrieved 13 October 2010.</ref> Albert Mongita, Djo Tunda Wa Munga, Guy Kabeya Muya, Mwezé Ngangura, Ne Kunda Nlaba, Monique Mbeka Phoba, Roger Kwami Zinga
* '''Egypt''': Salah Abu Seif, Adel Adeeb, Youssef Chahine, Yousry Nasrallah, Ezz El-Dine Zulficar, Sherif Arafa, Khaled Youssef, Marwan Hamed, Mohamed Khan, Shady Abdel Salam, Khairy Beshara, Samir Seif, Nader Galal, Ali Abdel-Khalek, Ashraf Fahmy, Radwan El-Kashef, Hady El Bagoury, Ali Ragab, Hala Khaleel, Ehab Lamey, Tarek Al Eryan, Atef El-Tayeb, Daoud Abdel Sayed, Ehab Mamdouh, Sandra Nashaat
* '''Ethiopia''': Yemane Demissie, Haile Gerima, Hermon Hailay, Salem Mekuria<ref>[http://www.wmm.com/filmcatalog/makers/fm248.shtml "Salem Mekuria"], Women Make movies.</ref>
* '''Gabon''': Henri Joseph Koumba Bibidi, Pierre-Marie Dong, Imunga Ivanga, Manouchka Kelly Labouba, Charles Mensah
* '''Ghana''': Egbert Adjesu, John Akomfrah, [[King Ampaw]], [[Kwaw Ansah]], Jim Awindor, [[Yaba Badoe]], [[Akosua Busia]], [[Leila Djansi]], [[Kuukua Eshun]], [[Shirley Frimpong-Manso]], [[Chris Tsui Hesse|Chris Hesse]], Nii Kwate Owoo, Kwesi Owusu, Tom Ribeiro, Halaru B. Wandagou
* '''Guinea''': David Achkar, Cheick Fantamady Camara, Mohamed Camara, Cheik Doukouré, Gahité Fofana, Mama Keïta
* '''Guinea-Bissau''': Flora Gomes, Sana Na N'Hada
* '''Kenya''': Robby Bresson,Jim Chuchu, Wanuri Kahiu, Wanjiru Kinyanjui, Judy Kibinge, Gilbert Lukalia, Jane Munene, Anne Mungai
* '''Lesotho''': Lemohang Jeremiah Mosese
* '''Madagascar''': Alexander Abela, Marie-Clémence Andriamonta-Paes, Lova Nantenaina, Philippe Raberojo, Raymond Rajaonarivelo, Benoît Ramampy, Solo Randrasana, Luck Razanajaona, Laza Razanajatovo
* '''Mali''': Abdoulaye Ascofare, Souleymane Cissé, Cheick Oumar Sissoko, Manthia Diawara, Adama Drabo
* '''Mauritania''': Med Hondo, Abderrahmane Sissako, Sidney Sokhona
* '''Mozambique''': Fátima Albuquerque, Licínio Azevedo, Karen Boswall, Sol de Carvalho, Camilo de Sousa, Mickey Fonseca, Rogério Manjate, Isabel Noronha, Lara Sousa
* '''Namibia''': Joel Haikali, Tim Huebschle, Richard Pakleppa
* '''Niger''': Moustapha Alassane,<ref>Lynsey Chutel (March 30, 2018). [https://qz.com/africa/1239066/watch-one-of-africas-first-animated-films-created-by-nigers-moustapha-alassane/ "One of Africa's oldest animated films has a timeless message about African life"]. Quartz Africa.</ref> Oumarou Ganda
* '''Nigeria''': Femi Adebayo, Kemi Adetiba, Kunle Afolayan, Dele Ajakaiye, Andy Amenechi, Bayo Awala, Ola Balogun, Biyi Bandele, Jide Bello, Chico Ejiro, Zeb Ejiro, Obi Emelonye, Lola Fani-Kayode, Greg Fiberesima, Amaka Igwe, Tunde Kelani, Billy Kings, Chris Obi Rapu, Tade Ogidan, Iyabo Ojo, Izu Ojukwu, Zina Saro-Wiwa, Yemi Shodimu, Eddie Ugboma
* '''Rwanda''': Eric Kabera, Kivu Ruhorahoza
* '''São Tomé and Príncipe''': Januário Afonso, Katya Aragão, Ângelo Torres
* '''Senegal''': Tidiane Aw, Moussa Bathily, Ben Diogaye Bèye, Ahmadou Diallo, Clarence Thomas Delgado, Djibril Diop Mambéty, Thierno Faty Sow, Safi Faye, Joseph Gaï Ramaka, Dyana Gaye, Alain Gomis, Ousmane William Mbaye, Bouna Medoune Seye, Samba Félix Ndiaye, Moustapha Ndoye, Ababacar Samb Makharam, Ibrahima Sarr, Ousmane Sembène, Moussa Sène Absa, Blaise Senghor, Mansour Sora Wade, Paulin Soumanou Vieyra, As Thiam, Momar Thiam, Moussa Touré, Mahama Johnson Traoré
* '''Somalia''': Abdisalam Aato, Abdulkadir Ahmed Said, Idil Ibrahim
* '''Sudan''': Amjad Abu Alala, Suhaib Gasmelbari, Gadalla Gubara, Hajooj Kuka, Hussein Shariffe, Marwa Zein
* '''South Africa''': Neill Blomkamp, Seipati Bulani-Hopa, Mickey Dube, Nosipho Dumisa, Oliver Hermanus, Katinka Heyns, Gavin Hood, William Kentridge, Jonathan Liebesman, Nana Mahomo,<ref>[https://www.sahistory.org.za/people/nelson-nana-mahomo "Nelson "Nana" Mahomo"]. South African History Online.</ref> Zola Maseko, Teddy Matthera, Morabane Modise, Sechaba Morejele, Lionel Ngakane
* '''Togo''': Anne Laure Folly
* '''Tunisia''': Raja Amari, Mehdi Ben Attia, Mohamed Ben Attia, Kaouther Ben Hania, Férid Boughedir, Leyla Bouzid, Nouri Bouzid, Khaled Ghorbal, Nacer Khémir, Anis Lassoued, Moufida Tlatli
* '''Uganda''': Matt Bish, Caroline Kamya, Hassan Kamoga,<ref>Yael Even Or (August 14, 2017). [https://web.archive.org/web/20190413044032/https://broadly.vice.com/en_us/article/bjjzka/the-man-running-a-queer-film-festival-in-a-nation-where-homosexuality-is-illegal "The Man Running a Queer Film Festival in a Nation Where Homosexuality Is Illegal"]. ''Broadly''.</ref> Usama Mukwaya, Mariam Ndagire, George Stanley Nsamba, Joseph Kenneth Ssebaggala,
* '''Zambia''': Rungano Nyoni
* '''Zimbabwe''': M. K. Asante, Jr., Tsitsi Dangarembga, Roger Hawkins, Siphiwe Gloria Ndlovu, Jordan Riber
== Films wey dey about African cinema ==
[[File:AIRSCREEN_Africa.jpg|right|thumb|Open-Air-Cinema insyd Johannesburg plus inflatable movie screen (2010)]]
* ''Caméra d'Afrique'', Director: Férid Boughedir, Tunisia/France, 1983
* ''La Belle at the Movies'', Director: Cecilia Zoppelletto, Kinshasa, 2016
* ''Le Congo, quel cinéma!'', Director: Guy Bomanyama-Zandu, Democratic Republic of Congo, 2005
* ''Les Fespakistes'', Directors: François Kotlarski, Eric Münch, Burkina Faso/France, 2001
* ''Sembene!'', Director: Samba Gadjigo and Jason Silverman, 2015<ref>[https://web.archive.org/web/20191226130023/https://events.stanford.edu/events/661/66183/ "Film Screening: SEMBENE! The Inspiring Story of the Father of African Cinema with Director Samba Gadjigo"]. February 7, 2017. Archived from [https://events.stanford.edu/events/661/66183/ the original] on December 26, 2019. Retrieved October 28, 2018.</ref>
* ''Spell Reel'', Director: Filipa César, [[Guinea-Bissau]], 2017, documentary on the digitization of revolutionary films from Guinea-Bissau.<ref>Ela Bittencourt (June 27, 2017). [https://hyperallergic.com/387611/reactivating-the-lost-revolutionary-films-of-guinea-bissau/ "Reactivating the Lost Revolutionary Films of Guinea-Bissau: In her debut feature, artist Filipa César documents the digitization of films made in the African country around the time of its independence"]. HyperAllergic.</ref><ref>Ben Kenigsberg (June 27, 2017). "Review: 'Spell Reel' Shows a Revolution Filmed, on the Leader's Orders". ''New York Times''.</ref>
* ''This Is Nollywood'', Director: Franco Sacchi, 2007
== Film festivals ==
=== Africa ===
* Africa International Film Festival (AFRIFF), Lagos, Nigeria
* [[Africa Movie Academy Awards]] (AMAA, AMA Awards), Yenagoa, Nigeria
* Alexandria International Film Festival, Alexandria, [[Egypt]]
* Amakula International Film Festival, Kampala, Uganda
* Ananse Cinema International Film Festival (ANCIFF), Kasoa, Ghana
* Aswan International Women's Film Festival, Aswan, Egypt
* Bushman Film Festival, held in Abidjan, Côte d'Ivoire<ref>[https://web.archive.org/web/20200218192510/https://bushmanfilmfestival.net/ "Bushmanfilmfestival – Smartphone Film festival in Côte d'Ivoire"]. Archived from [https://bushmanfilmfestival.net/ the original] on 2020-02-18. Retrieved 2020-02-18.</ref>
* Cabo Verde International Film Festival
* Cairo International Film Festival (CIFF), Cairo, Egypt
* Carthage Film Festival
* El Gouna Film Festival (GFF), El Gouna, Egypt
* Festival International du Film Amateur de Kélibia (FIFAK), Kélibia, Tunisia
* Panafrican Film and Television Festival of Ouagadougou (FESPACO), Burkina Faso
* Festival of African Cinema (Tarifa-Tangier African Film Festival), Morocco/Spain
* Luanda International Pan African Film Festival (Luanda PAFF)
* Luxor African Film Festival, Luxor, Egypt
* Panafrican Film and Television Festival of Ouagadougou (FESPACO) is the largest and most prestigious film festival in Africa
* Rencontres du Film Court Madagascar (Madagascourt Film Festival)
* Rwanda Film Festival (Hillywood), held in Rwanda
* Sahara International Film Festival (FiSahara), held in Sahrawi refugee camps in Algeria
* Zanzibar International Film Festival (ZIFF)
=== Asia ===
* Atesib Film Festival, Israel
=== Europe ===
* Africa in Motion, held in Edinburgh, Scotland insyd late October
* Festival cinémas d’Afrique Lausanne, in Lausanne, Switzerland insyd August
* Festival des Cinémas d'Afrique du pays d'Apt, in Apt, Vaucluse, France insyd November
=== USA ===
* The African Film Festival (TAFF) dem hold insyd Dallas insyd late June<ref>[http://www.theafricanfilmfestival.org/#TAFF "TAFF WORKSHOPS AND EVENTS CALENDAR"].</ref>
* African Film Festival, dem hold insyd New York
* Africa World Documentary Film Festival, dem hold insyd St Louis
* Pan African Film Festival, dem hold insyd Los Angeles
* Silicon Valley African Film Festival, dem hold insyd San Jose, California
* African literature
* [[Africa Movie Academy Awards]], Nigeria
* Atlas Corporation Studios, Morocco
* List of African films
* Négritude
* Negrophilia
* Nu Metro Cinemas, South Africa
* Political cinema
* Somaliwood, Somali film industry, Ohio, USA
* Ster-Kinekor, South Africa
* Third Cinema, dey include filmmakers from Africa
* Women in African cinema
* World cinema
== References ==
<references />
== Bibliography ==
<div class="refbegin refbegin-columns references-column-width
" style="column-width: 30em">
* <cite class="citation web cs1 cs1-prop-foreign-lang-source cs1-prop-foreign-lang-source">[https://www.africultures.com "Africultures, les mondes en relation"]. </cite><cite class="citation web cs1 cs1-prop-foreign-lang-source cs1-prop-foreign-lang-source">''africultures.com'' (in French, English, and Portuguese). Africultures. 2023<span class="reference-accessdate">. </span><span class="reference-accessdate">Retrieved <span class="nowrap">1 June</span> 2023</span>.</cite>
* <cite class="citation web cs1 cs1-prop-foreign-lang-source cs1-prop-foreign-lang-source">[https://web.archive.org/web/20240524020303/https://afrimages.net/ "Afrimages, Cinémas d'Afrique: analyses critiques"]. </cite><cite class="citation web cs1 cs1-prop-foreign-lang-source cs1-prop-foreign-lang-source">''afrimages.net'' (in French, English, and Portuguese). Afrimages, Olivier Barlet. 2023<span class="reference-accessdate">. </span><span class="reference-accessdate">Retrieved <span class="nowrap">1 June</span> 2023</span>.</cite>
* <cite class="citation web cs1 cs1-prop-foreign-lang-source cs1-prop-foreign-lang-source">[https://www.africine.org "Africine.org, Le leader mondial (cinémas africains & diaspora)"]. </cite><cite class="citation web cs1 cs1-prop-foreign-lang-source cs1-prop-foreign-lang-source">''africine.org'' (in French, English, and Portuguese). Fédération africaine de la critique cinématographique (FACC), African Federation of Film Critics. 2023<span class="reference-accessdate">. </span><span class="reference-accessdate">Retrieved <span class="nowrap">1 June</span> 2023</span>. <q>Actuellement recensés 21 791 films, 2 562 textes</q></cite>
* Armes, Roy: ''Dictionary of African Filmmakers'', Indiana University Press, 2008, ISBN 0-253-35116-2
* <cite class="citation book cs1" id="CITEREFBarlet2000">Barlet, Olivier (2000). </cite><cite class="citation book cs1" id="CITEREFBarlet2000">''African Cinemas: Decolonizing the Gaze''. London; New York: Zed Books. ISBN <nowiki><bdi>978-1856497428</bdi></nowiki>.</cite>
* <cite class="citation web cs1" id="CITEREFBarlet,_Olivier2008">Barlet, Olivier (15 July 2008). </cite><cite class="citation web cs1" id="CITEREFBarlet,_Olivier2008">[http://africultures.com/the-five-decades-of-african-cinemas-7954/ "The Five Decades of African Cinemas"]. Africultures.</cite>
* <cite class="citation book cs1" id="CITEREFBarlet2016">Barlet, Olivier (2016). </cite><cite class="citation book cs1" id="CITEREFBarlet2016">''Contemporary African Cinema''. East Lansing: Michigan State University Press. ISBN <nowiki><bdi>978-1611862119</bdi></nowiki>.</cite>
* <cite class="citation book cs1" id="CITEREFde_MedeirosApa2021">de Medeiros, Paulo; Apa, Livia, eds. </cite><cite class="citation book cs1" id="CITEREFde_MedeirosApa2021">(2021). ''Contemporary Lusophone African film : transnational communities and alternative modernities''. Remapping world cinema. Abingdon, Oxon: Routledge. ISBN [[Special:BookSources/9780367134976|<bdi>9780367134976</bdi>]].</cite>
* <cite class="citation book cs1" id="CITEREFDovey,_Lindiwe2009">Dovey, Lindiwe (2009). </cite><cite class="citation book cs1" id="CITEREFDovey,_Lindiwe2009">''African Film and Literature: Adapting Violence to the Screen''. Columbia University Press. ISBN <nowiki><bdi>978-0231147545</bdi></nowiki>.</cite>
* <cite class="citation book cs1" id="CITEREFFriendéthié2009">Friendéthié, Martial K. (2009). </cite><cite class="citation book cs1" id="CITEREFFriendéthié2009">''Francophone African cinema : history, culture, politics and theory''. Jefferson, N.C.: McFarland. ISBN [[Special:BookSources/9780786439621|<bdi>9780786439621</bdi>]]. OCLC [https://search.worldcat.org/oclc/277136408 277136408].</cite>
* <cite class="citation web cs1">[http://www.africine.org/revues/ecrans-dafrique/59 "Ecrans d'Afrique, Revue internationale de cinéma, télévision et vidéo"]. </cite><cite class="citation web cs1">''africine.org''<span class="reference-accessdate">. </span><span class="reference-accessdate">Retrieved <span class="nowrap">1 June</span> 2023</span>. <q>Créée en 1992. </q></cite><cite class="citation web cs1"><q>Elle n'est plus éditée depuis 1998.</q></cite>. See also Ecrans d'Afrique.
* <cite class="citation news cs1" id="CITEREFHalhoul2012">Halhoul, Khalid (2012-07-03). </cite><cite class="citation news cs1" id="CITEREFHalhoul2012">[http://www.utne.com/arts/african-cinema-shift-cultural-perceptions.aspx "Using African Cinema to Shift Cultural Perceptions"]. ''Utne Reader''<span class="reference-accessdate">. </span><span class="reference-accessdate">Retrieved <span class="nowrap">2014-04-12</span></span>.</cite>
* <cite class="citation book cs1" id="CITEREFHarrowGarritano2019">Harrow, Kenneth W.; Garritano, Carmela, eds. </cite><cite class="citation book cs1" id="CITEREFHarrowGarritano2019">(2019). ''A companion to African cinema''. Wiley-Blackwell companions to national cinemas. Hoboken, NJ: John Wiley & Sons, Inc. p. 498. ISBN [[Special:BookSources/9781119100317|<bdi>9781119100317</bdi>]].</cite>
* Lelievre, Samuel (ed.), "Cinémas africains, une oasis dans le désert?", ''CinémAction'', no. 106, Paris, Télérama/Corlet, 1st trimester 2003
* <cite class="citation web cs1" id="CITEREFOkome,_Onookome">Okome, Onookome. </cite><cite class="citation web cs1" id="CITEREFOkome,_Onookome">[http://pdfproc.lib.msu.edu/?file=/DMC/African%20Journals/pdfs/glendora%20review/vol1no2/graa001002017.pdf "Film Policy and the development of the African Cinema"] <span class="cs1-format">(PDF)</span> – via Michigan State University.</cite>
* <cite class="citation book cs1" id="CITEREFOuzgane2011">Ouzgane, Lahoucine (2011). </cite><cite class="citation book cs1" id="CITEREFOuzgane2011">''Men in African film & fiction''. Woodbridge, Suffolk, UK: James Currey imprint of Boydell & Brewer. ISBN [[Special:BookSources/9781846159329|<bdi>9781846159329</bdi>]]. OCLC [https://search.worldcat.org/oclc/792684913 792684913].</cite>
* <cite class="citation book cs1" id="CITEREFPfaff2004">Pfaff, Françoise (2004). </cite><cite class="citation book cs1" id="CITEREFPfaff2004">''Focus on African Films''. Bloomington: Indiana University Press. ISBN [[Special:BookSources/9780253216687|<bdi>9780253216687</bdi>]].</cite>
* Solanas, Fernando E., Getino, Octavio, "Towards a Third Cinema" in: Bill Nichols (ed.), ''Movies and Methods.'' ''An Anthology'', University of California Press, 1976, pp. 44–64
* Şaul, Mahir and Ralph Austen, Ralph A. (eds), ''Viewing African Cinema in the Twenty-First Century: Art Films and the Nollywood Video Revolution'', Ohio University Press, 2010, ISBN 978-0-8214-1931-1
* Tomaselli, Keyan G., & Mhando, Martin (eds), ''Journal of African Cinemas'', Bristol : Intellect, 2009 -, ISSN [https://www.worldcat.org/search?fq=x0:jrnl&q=n2:1754-9221 1754-9221]
* <cite class="citation book cs1" id="CITEREFUkadike1994">Ukadike, Nwachukwu Frank (1994). </cite><cite class="citation book cs1" id="CITEREFUkadike1994">''Black African cinema''. Berkeley, CA: University of California Press. ISBN <nowiki><bdi>978-0520077478</bdi></nowiki>.</cite>*<cite class="citation book cs1" id="CITEREFUkadike1994">Ukadike, Nwachukwu Frank (1994). ''Black African cinema''. Berkeley, CA: University of California Press. ISBN <nowiki><bdi>978-0520077478</bdi></nowiki>.</cite>
</div>
== External links ==
* [http://www.rfi.fr/hebdo/20180525-afrique-grands-groupes-francais-assaut-salles-cinema-culture Movie theatres re-opening in Africa] (in French, extensive business discussion)
* [http://congoinharlem.org/ Congo in Harlem]
* [https://web.archive.org/web/20150809220422/http://www.africanholocaust.net/news_ah/panafricancinema.htm The Heavy Flag of Pan-African Cinema] Archived 2015-08-09 at the Wayback Machine
* [https://web.archive.org/web/20060613073319/http://web.africa.ufl.edu/asq/v2/v2i1a4.htm African Cinema in the 1990s]
* [http://africanmedia.msu.edu/ African Media Program] – comprehensive database of African media
* [https://web.archive.org/web/20100328183419/http://newsreel.org/ Library of African Cinema in California]
* [https://web.archive.org/web/20120218212003/http://www.fcat.es/wiki/ Wiki of the African Film Festival of Tarifa]
* Khalid Halhoul, [http://www.utne.com/african-cinema-shift-cultural-perceptions.aspx "Using African Cinema to Shift Cultural Perceptions"], ''UTNE'', July 3, 2012. Archived 2013-07-03 at the Wayback Machine
* [http://cannes-or-bust.com/cannes-events/pan-african-film-festival/ Pan-African Film Festival, Cannes]
* [https://web.archive.org/web/20150713163252/http://www.africapedia.com/TOP-AFRICAN-FILM-DIRECTORS-IN-ALPHABETICAL-ORDER "Top African Film Directors in Alphabetical order"], Africapedia
[[Category:Cinema by continent]]
[[Category:Cinema of Africa]]
lz86zym5zczpnxk2zgm5y2mxrmtqbz1
Category:Summer Olympics by year
14
8378
107659
38544
2026-07-23T20:26:17Z
~2026-41365-45
7047
107659
wikitext
text/x-wiki
[[Category:Summer Olympic Games]]
dokxpi5f3ihntv3utdf0j4ro6zxw3fn
Category:Women video bloggers
14
9901
107686
42096
2026-07-23T20:38:00Z
~2026-41365-45
7047
107686
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Video bloggers]]
cc0kvt599f4bi2k30otegjye5p8mo2m
Category:Women founders
14
9930
107687
42173
2026-07-23T20:38:34Z
~2026-41365-45
7047
107687
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Organisational founders]]
tv08wemegd5wxmd68phsvlg14ee8wkx
Category:University of Michigan College of Literature, Science, and the Arts alumni
14
10598
107627
43980
2026-07-23T20:12:18Z
~2026-41365-45
7047
107627
wikitext
text/x-wiki
[[Category:Literature]]
[[Category:Science]]
[[Category:Arts]]
0arp2dgpkr0sx5gfomf70rovlk4zy27
Category:Women potters
14
10754
107689
44489
2026-07-23T20:39:06Z
~2026-41365-45
7047
107689
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Potters]]
4yiaibtkhhkso7dk2gcx6n6sw5is5y8
Category:Women documentary filmmakers
14
10824
107690
44620
2026-07-23T20:39:33Z
~2026-41365-45
7047
107690
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Documentary filmmakers]]
bokmclbk3cpenpn1q9qds5q4v58n3i0
Category:Women architects
14
10916
107692
44847
2026-07-23T20:40:39Z
~2026-41365-45
7047
107692
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Architects]]
s0jclo2srtqcm449j6wbnnwt60733g9
Category:American graffiti artists
14
10963
107699
45005
2026-07-23T20:42:43Z
~2026-41365-45
7047
107699
wikitext
text/x-wiki
[[Category:Graffiti artists]]
[[Category:American artists]]
d93yrsynzkehd5b2hdbkulnh21flb91
Category:Graffiti artists
14
11194
107696
45643
2026-07-23T20:41:41Z
~2026-41365-45
7047
107696
wikitext
text/x-wiki
[[Category:Graffiti]]
[[Category:Artists]]
fag27gfbv5rew0cb3yqh1d8kea94vy2
Category:Women graffiti artists
14
11200
107694
45650
2026-07-23T20:41:12Z
~2026-41365-45
7047
107694
wikitext
text/x-wiki
[[Category:Women graffiti artists]]
[[Category:Graffiti artists]]
qf49tf80vgfwgqvwcuc70p9ie39lz6z
107695
107694
2026-07-23T20:41:20Z
~2026-41365-45
7047
107695
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Graffiti artists]]
p4n3fa5364to1m1aax52vxp4292fweu
Category:Women printmakers
14
11245
107700
45750
2026-07-23T20:43:39Z
~2026-41365-45
7047
107700
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Printmakers]]
4gjt9u0x3cy4mnvse96rs1bl2b9zeoe
Category:20th-century printmakers
14
11246
107701
45751
2026-07-23T20:43:59Z
~2026-41365-45
7047
107701
wikitext
text/x-wiki
[[Category:Printmakers]]
ks0htp2l9zqoqe5zmove9o15a98nvty
Category:Tanzanian children's book illustrators
14
11274
107711
45827
2026-07-23T20:47:20Z
~2026-41365-45
7047
107711
wikitext
text/x-wiki
[[Category:Tanzanians]]
[[Category:Children's book illustrators]]
9w9b6p2zzjnzqn08wvn0ssq1n0mxzxz
Category:National Book Award for Young People's Literature winners
14
11428
107626
46307
2026-07-23T20:12:01Z
~2026-41365-45
7047
107626
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Ivorian children's book illustrators
14
11488
107709
46446
2026-07-23T20:46:51Z
~2026-41365-45
7047
107709
wikitext
text/x-wiki
[[Category:Ivorians]]
[[Category:Children's book illustrators]]
ohm2dunigkpwknuv20xmiufpgwtjxpq
Category:Women children's book illustrators
14
11496
107704
46454
2026-07-23T20:44:53Z
~2026-41365-45
7047
107704
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Children's book illustrators]]
a58tl4fd6dqwf4fsuym6t4bjamo1mdp
Category:Women government ministers of France
14
11596
107713
46635
2026-07-23T20:48:01Z
~2026-41365-45
7047
107713
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Government ministers of France]]
58vkd9pj21anqcsxfw9z7vw22uzpq3m
Category:20th-century German printmakers
14
11612
107703
46677
2026-07-23T20:44:27Z
~2026-41365-45
7047
107703
wikitext
text/x-wiki
[[Category:Printmakers]]
ks0htp2l9zqoqe5zmove9o15a98nvty
Category:Women storytellers
14
11671
107714
46789
2026-07-23T20:48:24Z
~2026-41365-45
7047
107714
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Storytellers]]
5ad0txn8t11cu37ejarl0ux3w8zpbn6
Category:Women art dealers
14
11693
107715
46865
2026-07-23T20:48:42Z
~2026-41365-45
7047
107715
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Art dealers]]
73s4ov0w8hr8815uovy7eqvo5myueby
Category:Women installation artists
14
11840
107721
47214
2026-07-24T04:11:24Z
~2026-41365-45
7047
107721
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Installation artists]]
bijctwt7ah1xtqesimioqvb5kooszut
Category:Mauritian children's book illustrators
14
11967
107705
47595
2026-07-23T20:45:46Z
~2026-41365-45
7047
107705
wikitext
text/x-wiki
[[Category:Mauritians]]
[[Category:Children's book illustrators]]
p2fbjfxv4a12vnmvxtd39q53q1n1yl8
Category:French graffiti artists
14
12059
107698
47861
2026-07-23T20:42:23Z
~2026-41365-45
7047
107698
wikitext
text/x-wiki
[[Category:Graffiti artists]]
[[Category:French artists]]
sf9mtk3abpbnczxaw9mwvuzr0w7wkv2
Category:Latin American literature
14
12411
107618
49054
2026-07-23T20:10:27Z
~2026-41365-45
7047
107618
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Medieval literature
14
13303
107611
51835
2026-07-23T20:08:02Z
~2026-41365-45
7047
107611
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Literature about literature
14
13305
107610
51837
2026-07-23T20:07:39Z
~2026-41365-45
7047
107610
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Coptic literature
14
13369
107613
52029
2026-07-23T20:08:34Z
~2026-41365-45
7047
107613
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Viz Media manga
14
14210
107603
106905
2026-07-23T20:04:22Z
~2026-41365-45
7047
107603
wikitext
text/x-wiki
[[Category:Manga]]
[[Category:Viz Media]]
7va2r7xvpmhcq7n71kbcwe4rbtd9usr
Category:Viz Media novels
14
14211
107604
54374
2026-07-23T20:04:47Z
~2026-41365-45
7047
107604
wikitext
text/x-wiki
[[Category:Novels]]
[[Category:Viz Media]]
4xnzjwn1ef58q61nf9o0d9ie8rb8bef
Haitian Revolution
0
15625
107680
77614
2026-07-23T20:35:39Z
~2026-41365-45
7047
107680
wikitext
text/x-wiki
{{Databox}}
De '''Haitian Revolution''' (French: Révolution haïtienne [ʁevɔlysjɔ̃ a.isjɛn] anaa ''Guerre de l'indépendance''; Haitian Creole: ''Lagè d Lendependans'') na ebe a successful insurrection by self-liberated slaves against French colonial rule insyd Saint-Domingue, now de sovereign state of Haiti.<ref>{{cite journal |last1=Igawa |first1=Momoko |last2=Kato |first2=Makoto |date=2017 |title=A new species of hermit crab, Diogenes heteropsammicola (Crustacea, Decapoda, Anomura, Diogenidae), replaces a mutualistic sipunculan in a walking coral symbiosis |journal=PLOS ONE |volume=12 |issue=9 |pages=e0184311 |bibcode=2017PLoSO..1284311I |doi=10.1371/journal.pone.0184311 |pmc=5606932 |pmid=28931020 |doi-access=free |hdl-access=free |hdl=2433/227462}}</ref> Na de revolution be de slave uprising per dem know insyd human history wey lead to de founding of a state wich na ebe both free from slavery (though no be from forced labour)<ref>Ghachem, Malick W.; Danforth, Susan. [https://web.archive.org/web/20240202145624/https://www.brown.edu/Facilities/John_Carter_Brown_Library/exhibitions/haitian/pages/part7.html "The Other Revolution"]. ''John Carter Brown Library''. Brown University. Retrieved 11 March 2022.</ref> wey e be ruled by non-whites den former captives.<ref>{{Cite journal |last=Franklin W. Knight |date=February 2000 |title=The Haitian Revolution |url=https://drive.google.com/open?id=0B_q6VhhkczIYelM4ZnNoUE9RWmM |journal=The American Historical Review |volume=105 |issue=1 |pages=103–115 |doi=10.2307/2652438 |jstor=2652438 |url-access=subscription}}</ref>
Na de revolt begin on 22 August 1791,<ref>{{Cite book|last=Adam Hochschild|url=https://archive.org/details/burychainsprophe00hoch|title=Bury the Chains|publisher=Houghton Mifflin|year=2005|page=[https://archive.org/details/burychainsprophe00hoch/page/257 257]|url-access=registration}}</ref> wey e end insyd 1804 plus de former colony ein independence. Na e involve black, biracial, French, Spanish, British, den Polish participants—plus de ex-slave Toussaint Louverture emerge as Haiti ein most prominent general.Na de successful revolution be a defining moment insyd de history of de Atlantic World<ref>{{Cite web|title=Why Haiti should be at the centre of the Age of Revolution – Laurent Dubois|url=https://aeon.co/essays/why-haiti-should-be-at-the-centre-of-the-age-of-revolution|access-date=2019-09-04|website=Aeon Essays|language=en}}</ref><ref>{{Cite journal |last=Joseph, Celucien L. |year=2012 |title='The Haitian Turn': An Appraisal of Recent Literary and Historiographical Works on the Haitian Revolution |url=https://drive.google.com/open?id=0B_q6VhhkczIYVlo3S1JpSllvTkU |journal=Journal of Pan African Studies |volume=5 |issue=6 |pages=37–55}}</ref> wey na de revolution ein effects on de institution of slavery be felt thru out de Americas. Na de end of French rule den de abolition of slavery insyd de former colony be followed by a successful defense of de freedoms de former slaves win, den plus de collaboration of already free people of color, of dema independence from white Europeans.<ref>{{Cite journal |last=Taber, Robert D. |year=2015 |title=Navigating Haiti's History: Saint-Domingue and the Haitian Revolution |journal=History Compass |volume=13 |issue=5 |pages=235–250 |doi=10.1111/hic3.12233}}</ref><ref name="Friends and Enemies">{{Cite book|last=Bongie, Chris|url=https://books.google.com/books?id=ZaTGbfYDB7gC|title=Friends and Enemies: The Scribal Politics of Post/colonial Literature|publisher=Liverpool University Press|year=2008|isbn=978-1846311420|location=Liverpool, UK|page=45}}</ref><ref name="cross-border studies">{{Cite book|last=Curtis Comstock, Sandra|title=Incorporating Comparisons in the Rift: Making Use of Cross-Place Events and Histories in Moments of World Historical Change, a chapter in Anna Amelina, Beyond methodological nationalism: research methodologies for cross-border studies|publisher=Taylor and Francis|year=2012|isbn=978-0-415-89962-8|pages=183–185}}</ref>
Na de revolution be de largest slave uprising since Spartacus' unsuccessful revolt against de Roman Republic nearly 1,900 years earlier,<ref name="Vulliamy">{{Cite web|date=28 August 2010|editor-last=Vulliamy, Ed|title=The 10 best revolutionaries|url=https://www.theguardian.com/culture/2015/aug/28/10-best-revolutionaries-che-guevara-mahatma-gandhi-leon-trotsky|access-date=15 December 2015|website=The Guardian}}</ref> wey e challenge long-held European beliefs about alleged black inferiority den about slaves dema ability make dem achieve den maintain dema own freedom. Na de rebels dema organizational capacity den tenacity under pressure inspire stories wey shock den frighten slave owners insyd de hemisphere.<ref>{{Cite book|last=Philip James Kaisary|url=https://drive.google.com/open?id=0B_q6VhhkczIYWmthRC1STHVDWWs|title=The Literary Impact of the Haitian Revolution, PhD dissertation|publisher=University of Warwick|year=2008|pages=8–10}}</ref>
Compared to oda Atlantic revolutions, na de events insyd Haiti receive comparatively little public attention in retrospect: na historian Michel-Rolph Trouillot dey characterize de historiography of de Haitian Revolution as e be "silenced" by dat of de French Revolution.
== Insyd popular culture ==
* Cuban writer Alejo Carpentier ein second novel, ''The Kingdom of This World'' (1949), (dem translate into English 1957), dey explore de Haitian Revolution in depth.
* Na Madison Smartt Bell wrep a trilogy dem call ''All Souls' Rising'' (1995) about de life of Toussaint Louverture den de slave uprising.
* C. Richard Gillespie, former Towson University professor, na he wrep a novelization of Louverture ein life insyd de Revolution dem title ''Papa Toussaint'' (1998).
* Though no be referred to by name, Haiti be de backdrop give de 1990 Broadway musical ''Once on This Island'' by Lynn Ahrens den Stephen Flaherty. De musical, wey be based on de novel ''My Love, My Love'' by Rosa Guy, dey describe de social stratification of de island, den dey contain a song wey dey briefly outline de history of de Haitian Revolution.
* Insyd 2004, an exhibition of paintings dem entitle ''Caribbean Passion: Haiti 1804'' by artist Kimathi Donkor, wey na dem hold insyd London make dem celebrate de bicentenary of Haiti ein revolution.<ref>{{cite web|last1=Melbourne|first1=Kamali|date=31 October 2005|title=Caribbean Passion : Haiti 1804|url=http://www.bbc.co.uk/nottingham/content/articles/2005/10/28/caribbean_passion_haiti_1804_event_feature.shtml|access-date=22 August 2016|website=BBC Nottingham}}</ref>
* Insyd 2010, na author Isabel Allende wrep a historical novel dem entitle ''Island Beneath the Sea'', wich dey document de Haitian Revolution thru de eyes of a slave woman wey dey live for de island.
* Na William Dietrich set ein 2012 novel, ''The Emerald Storm'' during de Haitian Revolution.
* De television mini-series [https://www.imdb.com/title/tt0255730 ''The Feast of All Saints''] dey feature de Haitian Revolution insyd ein opening scene.
* Na Philippe Niang direct de 2012 French two-part television film ''Toussaint Louverture'', plus Jimmy Jean-Louis wey dey play de title role.
* De film ''Top Five'' dey refer to a fictional film within de film dem call "Uprize", ostensibly about dis revolution.
* De role of Bois Caiman, Boukman, den Vodou generally, go cam turn de subject of a controversial, discredited neo-evangelical theology insyd de 1990s wey insist say na Haiti be pledged to de devil during de Revolution.<ref>{{Cite journal |last=McAlister |first=Elizabeth |date=2012-06-01 |title=From Slave Revolt to a Blood Pact with Satan: The Evangelical Rewriting of Haitian History |url=http://wesscholar.wesleyan.edu/cgi/viewcontent.cgi?article=1112&context=div2facpubs |journal=Studies in Religion/Sciences Religieuses |volume=41 |issue=2 |pages=187–215 |doi=10.1177/0008429812441310 |issn=0008-4298 |s2cid=145382199 |url-access=subscription}}</ref>
* Jacobin, an American socialist periodical, dey use an image of Toussaint Louverture for ein logo.
==Literature about de Haitian Revolution==
* ''An Unbroken Agony: Haiti, From Revolution to the Kidnapping of a President''
* ''Bug-Jargal''
* ''The Crime of Napoleon''
* ''The Black Jacobins''
==War of independence==
[[Image:Prise de la Ravine-à-Couleuvres (23 février 1802), par Karl Girardet, gravé par Jean-Jacques Outhwaite.jpg|thumb|Battle for "Snake Gully" for 1802]]
===Rebellion against reimposition of slavery===
{{see also|Polish Legions (Napoleonic period)#The Haitian campaign}}
For few months, de island dey quiet under Napoleonic rule. But when e become apparent say de French intend to re-establish slavery (because dem don nearly do so for Guadeloupe), black cultivators revolt for de summer of 1802. Yellow fever don decimate de French; by de middle of July 1802, de French lose about 10,000 dead to yellow fever.{{sfn|Perry|2005|p=84}} By September, Leclerc write for ein diary say e get only 8,000 fit men left as yellow fever don kill de others.{{sfn|Perry|2005|p=83}}
For 1802, Napoleon add Polish legion of around 5,200 to de forces wey dem send to Saint-Domingue to fight off de slave rebellion. However, dem tell de Poles say der be revolt of prisoners for Saint-Domingue. Upon arrival den de first fights, de Polish soldiers soon discover say wetin dey actually take place for de colony be rebellion of slaves wey dey fight off dem French masters for dem freedom.<ref name="haitimega">{{cite web |title=The Polish Influence in Casale, Haiti and Contribution to the Haitian Revolution |url=http://www.haitimega.com/Haiti_Grand_Anse-The_Polish_Influence_in_Casale_Haiti_and_Contribution_to_the_Haitian_Revolution/84117465590726656/article_86845847910949337.jsp |url-status=usurped |archive-url=https://web.archive.org/web/20130406044447/http://www.haitimega.com/Haiti_Grand_Anse-The_Polish_Influence_in_Casale_Haiti_and_Contribution_to_the_Haitian_Revolution/84117465590726656/article_86845847910949337.jsp |archive-date=2013-04-06 |accessdate=7 February 2014}}</ref>
During dis time, der be familiar situation wey dey go on back for dem homeland as dese Polish soldiers dey fight for dem liberty from de occupying forces of Russia, Prussia, den Austria wey begin for 1772. Many Poles believe say if dem fight for France, Bonaparte go reward dem by restoring Polish independence, wich dem don end plus de Third Partition of Poland for 1795.{{sfn|Perry|2005|p=84}} As hopeful as de Haitians, many Poles dey seek union amongst demselves to win back dem freedom den independence by organizing uprising. As result, many Polish soldiers admire dem opponents, to eventually turn on de French army den join de Haitian slaves. Polish soldiers participate for de Haitian revolution of 1804, contributing to de establishment of de world ein first free black republic den de first independent Caribbean state.<ref name="haitimega" />
Haiti ein first head of state Jean-Jacques Dessalines call Polish people ''"de White Negroes of Europe"'', wich dem regard as great honor, as e mean brotherhood between Poles den Haitians. Many years later François Duvalier, de president of Haiti who dem know for ein black nationalist den Pan-African views, use de same concept of ''"European white negroes"'' while referring to Polish people den glorifying dem patriotism.<ref>{{cite book|author=Susan Buck-Morss|title=Hegel, Haiti, and Universal History|url=https://books.google.com/books?id=gj4sh2Ot76AC&pg=PA75|year=2009|publisher=University of Pittsburgh Pre|isbn=978-0-8229-7334-8|pages=75–}}</ref><ref>{{cite book|author=Riccardo Orizio|title=Lost White Tribes: The End of Privilege and the Last Colonials in Sri Lanka, Jamaica, Brazil, Haiti, Namibia, and Guadeloupe|url=https://books.google.com/books?id=UbicFX_JGjAC&pg=PA159|year=2000|publisher=Simon and Schuster|isbn=978-0-7432-1197-0|pages=159–}}</ref><ref>{{cite journal |jstor=41440998 |title=The Polish Presence in Latin America: An Introduction |journal=Polish American Studies |author= Dapía, Silvia G. |year=2012 |volume=69 |issue=1 |pages=5–8 |publisher=University of Illinois Press |doi=10.2307/41440998 |s2cid=254441853 }}</ref>
After Haiti gain ein independence, de Poles acquire Haitian citizenship for dem loyalty den support for overthrowing de French colonialists, den dem call "black" by de Haitian constitution.<ref>{{cite book|url=https://books.google.com/books?id=6p6QrBL79xEC&q=cazale+haiti&pg=PT142 |title=Haiti: A Shattered Nation |author= Abbott, Elizabeth |date=2011 |publisher=Overlook |isbn=978-1468301601 |accessdate=1 January 2015}}</ref>
===Dessalines den Pétion join Haitian forces===
Dessalines den Pétion remain allied plus France until dem switch sides again, for October 1802, den fight against de French. As Leclerc dey lie dying of yellow fever den hear say Christophe den Dessalines don join de rebels, e react by ordering all of de blacks wey dey live for Le Cap to be killed by drowning for de harbour.{{sfn|Perry|2005|p=85}} For November, Leclerc die of yellow fever, like much of ein army.
Ein successor, de Vicomte de Rochambeau, fight even more brutal campaign. Rochambeau wage near-genocidal campaign against de Haitians, killing everyone who be black.{{sfn|Perry|2005|p=85}} Rochambeau import about 15,000 attack dogs from Jamaica, who dem train to savage blacks den mulattoes.{{sfn|Perry|2005|p=85}} (Other sources suggest de dogs fit be dogo cubanos wey dem source for dem hundreds from Cuba rather dan Jamaica.)<ref>{{Cite journal|last1=Parry|first1=Tyler D.|last2=Yingling|first2=Charlton W.|date=2020-02-01|title=Slave Hounds and Abolition in the Americas|url=https://academic.oup.com/past/article/246/1/69/5722095|journal=Past & Present|language=en|issue=246|pages=69–108|doi=10.1093/pastj/gtz020|issn=0031-2746|doi-access=free}}</ref> For de Bay of Le Cap, Rochambeau get blacks drowned. No one go eat fish from de bay for months afterward, as no one wish to eat de fish wey don eat human flesh.{{sfn|Perry|2005|p=85}} Bonaparte, hearing say most of ein army for Saint-Domingue don die of yellow fever den de French hold only Port-au-Prince, Le Cap, den Les Cayes, send about 20,000 reinforcements to Rochambeau.{{sfn|Perry|2005|p=85}}
[[File:Leclerc Expedition.png|thumb|300x300px|France ein Leclerc Expedition to Haiti for 1804]]
Dessalines match Rochambeau for ein vicious cruelty. For Le Cap, when Rochambeau hang 500 blacks, Dessalines reply by killing 500 whites den sticking dem heads for spikes all around Le Cap, so say de French fit see wetin e dey plan for do to dem.{{sfn|Perry|2005|p=85}} Rochambeau ein atrocities help rally many former French loyalists to de rebel cause. Many for both sides don come to see de war as race war where no mercy dem go give. De Haitians burn French prisoners alive, cut dem up plus axes, or tie dem to board den saw dem into two.{{sfn|Perry|2005|p=83}}
===War between France den Britain===
Plus Napoleon ein inability to send de requested massive reinforcements after de outbreak of war for 18 May 1803 plus de British, de Royal Navy immediately despatch squadron under Sir John Duckworth from Jamaica to cruise for de region, seeking to eliminate communication between de French outposts den to capture or destroy de French warships wey base for de colony. De Blockade of Saint-Domingue not only cut de French forces out from reinforcements den supplies from France, but sanso mean say de British begin to supply arms to de Haitians.{{sfn|Perry|2005|p=85}} Trapped, engaged for vicious race war, den plus much of ein army dying of yellow fever, Rochambeau fall to pieces. E lose interest for commanding ein army den as James write, e "amuse himself plus sexual pleasures, military balls, banquets den de amassing of personal fortune".{{sfn|Perry|2005|p=85}}
De Royal Navy squadrons soon blockade de French-held ports of Cap Français den Môle-Saint-Nicolas for de Northern coast of de French colony. For de summer of 1803, when war break out between de United Kingdom den de French Consulate, Saint-Domingue don be almost completely overrun by Haitian forces under de command of Jean-Jacques Dessalines. For de north of de country, de French forces dem isolate for de two large ports of Cap Français den Môle-Saint-Nicolas den few smaller settlements, all wey French naval force supply wey base primarily for Cap Français.
For 28 June, de squadron encounter French convoy from Les Cayes off Môle-Saint-Nicolas, capturing one ship although de other escape. Two days later independently sailing French frigate dem chase down den capture for de same waters. For 24 July, another British squadron intercept de main French squadron from Cap Français, wich dey attempt to break past de blockade den reach France. De British, wey Commodore John Loring lead give chase, but one French ship of de line den frigate escape. Another ship of de line dem trap against de coast den capture after coming under fire from Haitian shore batteries. De remainder of de squadron dem force to fight two more actions for dem return to Europe, but eventually reach de Spanish port of Corunna.
[[Image:Haitian Revolution.jpg|thumb|Battle of Crête-à-Pierrot for 1802]]
For 8 October 1803, de French abandon Port-au-Prince as Rochambeau decide to concentrate wetin remain of ein army for Le Cap.{{sfn|Perry|2005|p=85}} Dessalines march into Port-au-Prince, where dem welcome am as hero by de 100 whites who don choose to stay behind.{{sfn|Perry|2005|p=86}} Dessalines thank dem all for dem kindness den belief for racial equality, but den e talk say de French don treat am as less dan human when e be slave, den so to avenge ein mistreatment, e promptly get de 100 whites all hanged.{{sfn|Perry|2005|p=86}} For 3 November, de frigate HMS ''Blanche'' capture supply schooner near Cap Français, de last hope for supplying de French forces. For 16 November 1803, Dessalines begin attacking de French blockhouses outside of Le Cap.{{sfn|Perry|2005|p=86}} De last battle for land of de Haitian Revolution, de Battle of Vertières, occur for 18 November 1803, near Cap-Haïtien wey dem fight between Dessalines ein army den de remaining French colonial army under de Vicomte de Rochambeau; de slave rebels den freed revolutionary soldiers win de battle. By dis point, Perry observe say both sides be "small mad" as de pressures of de war den yellow fever don take dem toll, den both de French den de Haitians fight plus reckless courage, seeing death for battle as preferable to slow death by yellow fever or being tortured to death by de enemy.{{sfn|Perry|2005|p=86}}
===Haitian victory===
<!-- Feel free to re-add this if you can fit it in nicely, or re-write it to fit better:
Having sold the Louisiana Territory to the United States in April 1803, Napoleon accepted defeat in his failing ventures in the Western Hemisphere. Dessalines won a string of victories against Leclerc and Rochambeau, becoming arguably the most successful military commander in the struggle against Napoleonic France.<ref>Christer Petley, ''White Fury: A Jamaican Slaveholder and the Age of Revolution'' (Oxford: Oxford University Press, 2018), p. 182.</ref>
Napoleon then turned his attention towards France's European enemies such as Great Britain and Prussia. With that, he withdrew a majority of the French forces in Haiti to counter the possibility of an invasion from Prussia, Britain, and Spain on a weakened France. -->
Rochambeau, seeing defeat inevitable, procrastinate until de last possible moment, but eventually dem force am to surrender to de British commander—by de end of de month de garrison dey starve, reaching de conclusion for council of war say surrender be de only way to escape from dis "place of death".{{sfn|Perry|2005|p=86}} Commodore Loring, however, refuse de French permission to sail den agree terms plus Dessalines wey permit dem to safely evacuate provided dem don left de port by 1 December. For de night of 30 November 1803, 8,000 French soldiers den hundreds of white civilians board de British ships to take dem away.{{sfn|Perry|2005|p=86}} One of Rochambeau ein ships almost wreck while leaving de harbour, but British lieutenant wey act alone save am, who not only rescue de 900 people for board, but sanso refloat de ship. For Môle-Saint-Nicolas, General Louis de Noailles refuse to surrender den instead sail to Havana, Cuba for fleet of small vessels for 3 December, but Royal Navy frigate intercept den mortally wound am. Soon after, de few remaining French-held towns for Saint-Domingue surrender to de Royal Navy to prevent massacres by de Haitian army. Meanwhile, Dessalines lead de rebellion until ein completion, when de French forces dem finally defeat by de end of 1803.
For 1 January 1804, from de city of Gonaïves, Dessalines officially declare de former colony ein independence, renaming am "Haiti" after de indigenous Arawak name. Although e last from 1804 to 1806, several changes begin taking place for Haiti. De independence of Haiti be major blow to France den ein colonial empire, but de French state go take several decades to recognize de loss of de colony. As de French retreat, Haiti, wich dem don once call de "Pearl of de Antilles", de richest French colony for de world, be impoverished, as ein economy dey for ruins after de revolution. Haiti struggle to recover economically from de war.{{sfn|Perry|2005|pp=86–87}} De Haitians don pay high price for dem freedom, losing about 200,000 dead between 1791 den 1803, den unlike de majority of de European dead, who yellow fever kill, de majority of de Haitian dead be de victims of violence.{{sfn|Perry|2005|p=60}}
== References ==
<references />
== Sources ==
{{Library resources box|onlinebooks=yes}}
* {{cite book|last=Bryan|first=Patrick E.|url=https://books.google.com/books?id=q9owdkOc0wgC|title=The Haitian Revolution and Its Effects|publisher=Heinemann|year=1984|isbn=978-0-435-98301-7}}
* {{cite book|last=Dubois|first=Laurent|title=Avengers of the New World|publisher=Harvard University Press|year=2005|isbn=978-0-674-01826-6}}
* {{cite book|last1=Girard|first1=Philippe R.|url=https://books.google.com/books?id=03XSP22p3kgC|title=The Slaves Who Defeated Napoleon: Toussaint Louverture and the Haitian War of Independence, 1801–1804|publisher=University of Alabama Press|year=2011|isbn=978-0817317324|location=Tuscaloosa}}
* {{cite book|last=James|first=Cyril Lionel Robert|url=https://archive.org/details/blackjacobins00clrj|title=The Black Jacobins: Toussaint Louverture and the San Domingo Revolution|publisher=Vintage|year=1989|isbn=978-0-679-72467-4|edition=2nd|author-link=}}
* {{cite book|last=Leyburn|first=James|title=The Haitian People|publisher=Yale University Press|year=1961|author-link=}}
* {{cite book|last=Perry|first=James|title=Arrogant Armies: Great Military Disasters and the Generals Behind Them|publisher=Edison: CastleBooks|year=2005}}
* {{cite book|author=Censer, Jack Richard|title=Liberty, Equality, Fraternity Exploring the French Revolution|author2=Lynn Avery Hunt|publisher=Penn State University Press|year=2001|isbn=978-0-271-02088-4}}<br />
==Read further ==
* Baur, John. "International Repercussions of the Haitian Revolution." ''The Americas'' 26, no. 4 (1970).
* Blackburn, Robin. "Haiti, Slavery, and the Age of the Democratic Revolution", ''William and Mary Quarterly'' 63.4, 633–674 (2006)
* Fick, Carolyn. "The Haitian revolution and the limit of freedom: defining citizenship in the revolutionary era". ''Social History'', Vol 32. No 4, November 2007
* {{cite book |author=Garrigus, John D. |title=''Before Haiti Race and Citizenship in French Saint-Domingue'' |year=2006 |publisher=Macmillan |isbn=978-1-4039-7140-1}}
* Geggus, David Patrick. ''The Impact of the Haitian Revolution in the Atlantic World''. Columbia: University of South Carolina Press 2001. {{ISBN|978-1-57003-416-9}}
* Girard, Philippe. "Black Talleyrand: Toussaint Louverture's Secret Diplomacy with England and the United States," William and Mary Quarterly 66:1 (Jan. 2009), 87–124.
* Girard, Philippe. "Napoléon Bonaparte and the Emancipation Issue in Saint-Domingue, 1799–1803," French Historical Studies 32:4 (Fall 2009), 587–618.
* Joseph, Celucien L. ''Race, Religion, and The Haitian Revolution: Essays on Faith, Freedom, and Decolonizatio''n (CreateSpace Independent Publishing Platform, 2012)
* Joseph, Celucien L. ''From Toussaint to Price-Mars: Rhetoric, Race, and Religion in Haitian Thought'' (CreateSpace Independent Publishing Platform, 2013)
* [https://library.oapen.org/bitstream/handle/20.500.12657/37837/9789004416451_webready_content_text.pdf Koekkoek, René (2020) The Citizenship Experiment Contesting the Limits of Civic Equality and Participation in the Age of Revolutions. Studies in the History of Political Thought]
* Ott, Thomas O. ''The Haitian Revolution, 1789–1804.'' University of Tennessee Press, 1973.
* Peguero, Valentina. "Teaching the Haitian Revolution: Its Place in Western and Modern World History". ''History Teacher'' 32#1 (1998), pp. 33–41. [http://www.jstor.org/stable/494418 online].
* {{cite book|author=Joseph Elisée Peyre-Ferry|title=Journal des opérations militaires de l'armée française à Saint-Domingue 1802–1803 sous les ordres des capitaines-généraux Leclerc et Rochambeau|publisher=Les Editions de Paris-Max Chaleil|year=2006|isbn=978-2-84621-052-2}}
* Popkin, Jeremy D., ''You Are All Free: The Haitian Revolution and the Abolition of Slavery'' (New York: Cambridge University Press, 2010)
* Jeffers, Jen (2016) {{cite news|url=https://theravenreport.com/2016/12/17/freedom-at-all-cost:-remembering-history's-greatest-slave-rebellion/|work=The Raven Report|title=Freedom at All Cost: Remembering History's Greatest Slave Rebellion}}
* {{cite book|last=Scott|first=Julius S.|title=The Common Wind: Afro-American Currents in the Age of the Haitian Revolution|title-link=|date=2018|publisher=Verso Books|isbn=9781788732475|author-link=}}
* {{cite journal |author=Manuel Barcia |date=June 2020 |title=From Revolution to Recognition: Haiti's Place in the Post-1804 Atlantic World |url=https://eprints.whiterose.ac.uk/159716/3/Barcia_AHR%20Forum.pdf |journal=The American Historical Review |volume=125 |issue=3 |doi=10.1093/ahr/rhaa240}}
* {{Cite news|last1=Gamio|first1=Lazaro|last2=Méheut|first2=Constant|last3=Porter|first3=Catherine|last4=Gebrekidan|first4=Selam|last5=McCann|first5=Allison|last6=Apuzzo|first6=Matt|date=2022-05-20|title=Haiti's Lost Billions|language=en-US|work=The New York Times|url=https://www.nytimes.com/interactive/2022/05/20/world/americas/enslaved-haiti-debt-timeline.html|access-date=2022-05-23|issn=0362-4331}}
* {{Cite news|last1=Gebrekidan|first1=Selam|last2=Apuzzo|first2=Matt|last3=Porter|first3=Catherine|last4=Méheut|first4=Constant|date=2022-05-20|title=Invade Haiti, Wall Street Urged. The U.S. Obliged.|language=en-US|work=The New York Times|url=https://www.nytimes.com/2022/05/20/world/haiti-wall-street-us-banks.html|access-date=2022-05-23|issn=0362-4331}}
* {{Cite news|last1=Bilefsky|first1=Dan|last2=Porter|first2=Catherine|date=2021-07-10|title=Who Paid for That Mansion? A Senator or the Haitian People?|language=en-US|work=The New York Times|url=https://www.nytimes.com/2021/07/10/world/canada/Haiti-Canada-Celestin-corruption.html|access-date=2022-05-23|issn=0362-4331}}
== External links ==
{{sister project links||d=Q689128|c=Category:Haitian Revolution|n=no|b=no|v=no|voy=no|m=no|mw=no|s=no|wikt=no|species=no}}
* [https://web.archive.org/web/20051103001454/http://www.thelouvertureproject.org/wiki/index.php?title=Main_Page The Louverture Project] – a wiki about the history of Haiti (archived 3 November 2005)
* [https://www.marxists.org/history/haiti/index.htm Archive on the History of the Haitian Independence Struggle 1791–1804] at marxists.org
* [http://bigthink.com/videos/haiti-history-of-a-shaken-country Haiti: History of Shaken Country] – Video interview with historian Laurent Dubois
* [http://www.hartford-hwp.com/archives/43a/index.html Haiti Archives]
* [https://www.pbs.org/egaliteforall/ "Égalité for All: Toussaint Louverture and the Haitian Revolution"]. [https://web.archive.org/web/20110730105531/https://www.pbs.org/egaliteforall/ Archived] 30 July 2011 at the Wayback Machine. Noland Walker. PBS documentary. 2009.
* [http://www.democracynow.org/2010/8/17/france_urged_to_pay_40_billion France Urged to Pay $40 Billion to Haiti in Reparations for "Independence Debt"] – video report by ''Democracy Now!''
* [https://web.archive.org/web/20150218133342/http://www.brown.edu/Facilities/John_Carter_Brown_Library/haitian/index.html The Other Revolution: Haiti, 1789–1804], digital exhibition from Brown University
* [http://15minutehistory.org/2013/02/06/episode-11-the-haitian-revolution/ 15 Minutes History], UT at Austin
* [https://www.gilderlehrman.org/history-by-era/global-history-and-us-foreign-policy/essays/two-revolutions-atlantic-world-connection Two Revolutions in the Atlantic World: Connections between the American Revolution and the Haitian Revolution] Gilder Lehrman Center, Laurent Dubois.
* [http://library.brown.edu/haitihistory/7.html"Upheavals in France and Saint-Domingue"] [https://web.archive.org/web/20201114000543/https://library.brown.edu/haitihistory/7.html Archived] 14 November 2020 Brown University
{{Authority control}}
[[Category:Haitian Revolution| ]]
[[Category:Saint-Domingue]]
[[Category:Military history of de Caribbean]]
[[Category:Wars wey dey involve Haiti]]
[[Category:French Revolutionary den Napoleonic Wars]]
[[Category:Wars wey dey involve Great Britain]]
[[Category:Wars wey dey involve Spain]]
[[Category:Wars wey dey involve France]]
[[Category:French colonization of de Americas]]
[[Category:France–Haiti relations]]
[[Category:Resistance to de French colonial empire]]
[[Category:Anti-imperialism insyd North America]]
[[Category:Wars of independence]]
[[Category:18th-century revolutions]]
[[Category:18th-century rebellions]]
[[Category:19th-century revolutions]]
[[Category:19th-century rebellions]]
[[Category:History of sugar]]
[[Category:1790s insyd de Caribbean]]
[[Category:1791 insyd de Caribbean]]
[[Category:1792 insyd de Caribbean]]
[[Category:1793 insyd de Caribbean]]
[[Category:1794 insyd de Caribbean]]
[[Category:1795 insyd de Caribbean]]
[[Category:1796 insyd de Caribbean]]
[[Category:1797 insyd de Caribbean]]
[[Category:1798 insyd de Caribbean]]
[[Category:1799 insyd de Caribbean]]
[[Category:1800s insyd de Caribbean]]
[[Category:1800 insyd de Caribbean]]
[[Category:1801 insyd de Caribbean]]
[[Category:1802 insyd de Caribbean]]
[[Category:1803 insyd de Caribbean]]
[[Category:1804 insyd de Caribbean]]
[[Category:1790s insyd Haiti]]
[[Category:1800s insyd Haiti]]
[[Category:1804 insyd Haiti]]
[[Category:Revolutions]]
m0yuk86j8hzpuvlklwr1an17n0lbvtr
Category:African diaspora literature
14
16175
107619
59564
2026-07-23T20:10:40Z
~2026-41365-45
7047
107619
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Engineering literature
14
16360
107615
59889
2026-07-23T20:09:34Z
~2026-41365-45
7047
107615
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Social sciences literature
14
16361
107620
59890
2026-07-23T20:10:48Z
~2026-41365-45
7047
107620
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Medical literature
14
16362
107616
59891
2026-07-23T20:10:01Z
~2026-41365-45
7047
107616
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Race-related controversies insyd literature
14
16392
107623
60072
2026-07-23T20:11:30Z
~2026-41365-45
7047
107623
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Works about revolutions
14
17664
107681
65183
2026-07-23T20:36:07Z
~2026-41365-45
7047
107681
wikitext
text/x-wiki
[[Category:Revolutions]]
8x1jdvgb3xgw6katuw34mv4hwu4jxuu
Category:Algerian revolutionaries
14
17669
107683
65188
2026-07-23T20:36:35Z
~2026-41365-45
7047
107683
wikitext
text/x-wiki
[[Category:Revolutionaries]]
ce5luw4don3vfba3h4rciv0e5mp9ds8
Category:Women insyd revolutions
14
19999
107679
75301
2026-07-23T20:35:00Z
~2026-41365-45
7047
107679
wikitext
text/x-wiki
[[Category:Women]]
[[Category:Revolutions]]
6o1h5ocww8m2k88fk97lny1xc6np8cj
Category:Asian Games gold medalists for Japan
14
20111
107646
75475
2026-07-23T20:20:11Z
~2026-41365-45
7047
107646
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
107657
107646
2026-07-23T20:24:56Z
~2026-41365-45
7047
107657
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
[[Category:Gold medalists]]
eoaovtq0j2y6kt5ivuvylbvv4b4jvlg
Category:Asian Games footballers for Japan
14
20112
107645
75476
2026-07-23T20:19:40Z
~2026-41365-45
7047
107645
wikitext
text/x-wiki
[[Category:Japanese footballers]]
[[Category:Asian Games]]
c64iolbl9pne8zh59h3ylkj0zpoicoi
Category:Asian Games silver medalists for Japan
14
20113
107644
75477
2026-07-23T20:19:23Z
~2026-41365-45
7047
107644
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
107653
107644
2026-07-23T20:23:03Z
~2026-41365-45
7047
107653
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
[[Category:Silver medalists]]
nlqhuj4rlnfnfi9gt7n1ciy1w0ng9zx
Category:FIFA Women's World Cup–winning players
14
20117
107673
75481
2026-07-23T20:31:50Z
~2026-41365-45
7047
107673
wikitext
text/x-wiki
[[Category:FIFA Women's World Cup players]]
9aw3md7xaxwcyzz478tsmj4ybjngisx
Category:Footballers at de 2006 Asian Games
14
20121
107643
75485
2026-07-23T20:19:06Z
~2026-41365-45
7047
107643
wikitext
text/x-wiki
[[Category:Japanese footballers]]
[[Category:Asian Games]]
c64iolbl9pne8zh59h3ylkj0zpoicoi
Category:Footballers at de 2010 Asian Games
14
20122
107642
75486
2026-07-23T20:18:51Z
~2026-41365-45
7047
107642
wikitext
text/x-wiki
[[Category:Japanese footballers]]
[[Category:Asian Games]]
c64iolbl9pne8zh59h3ylkj0zpoicoi
Category:Japanese women's footballers
14
20125
107675
75489
2026-07-23T20:32:56Z
~2026-41365-45
7047
107675
wikitext
text/x-wiki
[[Category:Japanese footballers]]
[[Category:Female footballers]]
g1pfjwlmqat6z2kp6d20e83rv9l04wo
Category:Japan women's international footballers
14
20127
107674
75491
2026-07-23T20:32:40Z
~2026-41365-45
7047
107674
wikitext
text/x-wiki
[[Category:Japanese footballers]]
[[Category:Female footballers]]
g1pfjwlmqat6z2kp6d20e83rv9l04wo
107676
107674
2026-07-23T20:33:17Z
~2026-41365-45
7047
107676
wikitext
text/x-wiki
[[Category:Japanese women's footballers]]
gvfzgab1aar4ljjyrcrnnmc53fteepe
Category:Medalists at de 2010 Asian Games
14
20130
107638
75494
2026-07-23T20:16:42Z
~2026-41365-45
7047
107638
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
Category:Olympic footballers for Japan
14
20133
107663
75497
2026-07-23T20:28:21Z
~2026-41365-45
7047
107663
wikitext
text/x-wiki
[[Category:Olympic footballers]]
[[Category:Japanese footballers]]
rx09aruji04on217uwnckheckoq04w8
Category:Asian Games gold medalists insyd football
14
20138
107635
75502
2026-07-23T20:15:47Z
~2026-41365-45
7047
107635
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
107651
107635
2026-07-23T20:22:30Z
~2026-41365-45
7047
107651
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
[[Category:Gold medalists]]
eoaovtq0j2y6kt5ivuvylbvv4b4jvlg
Category:Asian Games silver medalists insyd football
14
20139
107637
75503
2026-07-23T20:16:28Z
~2026-41365-45
7047
107637
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
107649
107637
2026-07-23T20:21:47Z
~2026-41365-45
7047
107649
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
[[Category:Silver medalists]]
nlqhuj4rlnfnfi9gt7n1ciy1w0ng9zx
Module:Params
828
20247
107576
107294
2026-07-23T13:33:59Z
Grufo
3655
Update from [[d:Special:GoToLinkedPage/mediawikiwiki/Q122696746|master]] using [[mw:Synchronizer| #Synchronizer]]
107576
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
107720
107576
2026-07-24T03:48:34Z
Grufo
3655
Update from [[d:Special:GoToLinkedPage/mediawikiwiki/Q122696746|master]] using [[mw:Synchronizer| #Synchronizer]]
107720
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
Category:Medalists at de 2014 Asian Games
14
20405
107634
76099
2026-07-23T20:15:22Z
~2026-41365-45
7047
107634
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Asian Games]]
0rysu9sqg5m7px0g83h94xa7hbxn09u
Category:Footballers at de 2014 Asian Games
14
20532
107640
76445
2026-07-23T20:17:57Z
~2026-41365-45
7047
107640
wikitext
text/x-wiki
[[Category:Japanese footballers]]
[[Category:Asian Games]]
c64iolbl9pne8zh59h3ylkj0zpoicoi
Category:African-American literature
14
21590
107621
79452
2026-07-23T20:10:56Z
~2026-41365-45
7047
107621
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:American literature by ethnic background
14
21592
107624
79454
2026-07-23T20:11:41Z
~2026-41365-45
7047
107624
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Islamic literature
14
24181
107617
87054
2026-07-23T20:10:16Z
~2026-41365-45
7047
107617
wikitext
text/x-wiki
[[Category:Islam]]
[[Category:Literature]]
daiuhgxva0bcwi7j1jjl7v1bl0a18rx
Category:Persian-language literature
14
24182
107622
87055
2026-07-23T20:11:06Z
~2026-41365-45
7047
107622
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Winnie Byanyima
0
24657
107575
92008
2026-07-23T13:25:27Z
InternetArchiveBot
29
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
107575
wikitext
text/x-wiki
{{Databox}}
'''Winifred Byanyima''' (dem born am 13 January 1959<ref>[https://thefintechafrica.com/profiles/winnie-byanyima-biography-all-you-need-to-know/ "Winnie Byanyima Biography : All You Need To Know"]. ''thefintechafrica.com''. Retrieved 7 March 2026.</ref>) be de executive director of UNAIDS (2019 to present).<ref name="auto">{{cite web |author=Daily Monitor |date=3 November 2019 |title=Besigye joins wife Winnie as she takes charge at UNAIDS |url=https://www.monitor.co.ug/News/National/Besigye-wife-Winnie-charge-UNAIDS-Geneva-OXFAM/688334-5334992-15iii4m/index.html |access-date=3 November 2019 |place=Kampala |newspaper=Daily Monitor}}</ref> She be Ugandan aeronautical engineer, politician, human rights activist, feminist, den diplomat.
She previously be de executive director of Oxfam International (2013–19)'''<ref>{{cite web |last=Administrator |date=15 January 2013 |title=Winnie Byanyima Appointed To Lead Oxfam International |url=http://www.oxfamblogs.org/eastafrica/?p=5641 |url-status=usurped |archive-url=https://web.archive.org/web/20130119045405/http://www.oxfamblogs.org/eastafrica/?p=5641 |archive-date=19 January 2013 |access-date=19 July 2014 |publisher=Oxfamblogs.org}}</ref>''' den de director of de Gender Team for de ''Bureau for Development Policy'' insyd at de United Nations Development Programme (UNDP) from 2006.<ref>{{cite web |last=ADB |date=29 October 2010 |title=Interview With UNDP Gender Team Director, Winnie Byanyima – "Incorporating Gender Perspective in All Steps of Economic Policy Management Process" |url=http://www.afdb.org/en/news-and-events/article/interview-with-undp-gender-team-director-winnie-byanyima-incorporating-gender-perspective-in-all-steps-of-economic-policy-management-process-7373/ |access-date=19 July 2014 |publisher=African Development Bank (ADB)}}</ref>
== En background ==
Dem born Byanyima for Mbarara District insyd for de Western Region of Uganda insyd, a British protectorate at de time. Ein parents be de late Boniface Byanyima, one-time national chairman of de Democratic Party for Uganda insyd, den de late Gertrude Byanyima, a former schoolteacher wey die for November 2008 insyd.<ref>{{cite web |author=Conan Businge and Ali Waiswa |date=13 November 2008 |title=Byanyima's Wife Dead |url=https://www.newvision.co.ug/new_vision/news/1177083/byanyima-eur-wife-dead |access-date=3 November 2019 |place=Kampala |newspaper=New Vision}}</ref> Winnie Byanyima go ''Mount Saint Mary's College Namagunga'' for de Mukono District insyd. She go top dey obtain a bachelor's degree for aeronautical engineering insyd from de University of Manchester, wey e becam de first female Ugandan to becam an aeronautical engineer. She later receive a master's degree for mechanical engineering insyd, wey e specialize for energy conservation insyd from Cranfield University.<ref>{{cite web |last=Oxfam |date=January 2015 |title=Winnie Byanyima, Oxfam International Executive Director |url=https://www.oxfam.org/en/winnie-byanyima-oxfam-international-executive-director |access-date=7 April 2015 |publisher=Oxford Committee for Famine Relief (Oxfam)}}</ref>
== Ein professional career ==
Following ein training as an aeronautical engineer, Byanyima work as a flight engineer give Uganda Airlines. Wen Yoweri Museveni, Ugandan Presidents since 1986, start de 1981–1986 Ugandan Bush War, Byanyima lef ein job den join de armed rebellion. Dem raise Museveni den Byanyima togeda at de Byanyima household as kiddies, plus de Byanyima family wey dey pay give all of Museveni ein education den scholastic needs.
Museveni, Byanyima, den ein husband Kizza Besigye be combatants for de National Resistance Army (NRA) insyd during dat war. Both Byanyima den ein husband fall out plus President Museveni sekof ein repressive undemocratic rule despite ein earlier stated convictions.<ref>{{cite web |last=Butagira |first=Tabu |date=6 May 2011 |title=Besigye Injuries Disturbing, Says Byanyima |url=http://www.monitor.co.ug/News/National/-/688334/1157272/-/c22kvez/-/index.html |access-date=19 July 2014 |newspaper=Daily Monitor (Kampala)}}</ref>
After de NRA win dat war, Byanyima serve as Uganda ein ambassador to France from 1989 until 1994. She then return home den becam an active participant for Ugandan politics insyd. She serve as a member of de Constituent Assembly dat draft de 1995 Ugandan Constitution. She then serve two consecutive terms as a member of parliament, wey e represent Mbarara Municipality from 1994 until 2004. Dem then appoint am director of de Directorate of Women, Gender den Development at de headquarters of de African Union for Addis Ababa, Ethiopia insyd. She serve for dat capacity insyd until dem appoint director of de Gender Team for de ''Bureau for Development Policy'' insyd at UNDP for November 2006 insyd.<ref>{{cite web |last=Onyalla |first=Harriette |date=29 November 2006 |title=Byanyima Scoops Top Job |url=http://www.newvision.co.ug/D/8/13/535097 |access-date=19 July 2014 |work=New Vision |location=Kampala}}</ref>
=== Executive Director of Oxfam, 2013–2019 ===
For January 2013 insyd, dem announce Byanyima as de next executive director of Oxfam International,<ref>{{cite web |last=Kiggundu |first=Edris |date=15 January 2013 |title=Winnie Byanyima To Head Oxfam |url=http://www.observer.ug/index.php?option=com_content&view=article&id=23180:winnie-byanyima-to-head-oxfam&catid=34:news&Itemid=114 |access-date=19 July 2014 |newspaper=The Observer (Uganda)}}</ref> wey e replace Jeremy Hobbs. Byanyima begin ein five-year directorship at Oxfam for 1 May 2013 top.<ref>{{cite web |date=6 May 2013 |title=Income Inequalities Threaten Africa |url=http://www.herald.co.zw/income-inequalities-threaten-africa |access-date=19 July 2014 |newspaper=The Herald (Zimbabwe){{!}}The Herald |location=Zimbabwe}}</ref> For December 2017 insyd, she announce acceptance of an offer from Oxfam ein Board of Supervisors to serve a second five-year term as Oxfam International ein Executive Director.<ref>{{Cite web |title=Winnie Byanyima to serve second 5-year term leading Oxfam International, from Nairobi {{!}} Oxfam International |url=https://www.oxfam.org/en/pressroom/pressreleases/2017-12-04/winnie-byanyima-serve-second-5-year-term-leading-oxfam |url-status=dead |archive-url=https://web.archive.org/web/20171205093101/https://www.oxfam.org/en/pressroom/pressreleases/2017-12-04/winnie-byanyima-serve-second-5-year-term-leading-oxfam |archive-date=5 December 2017 |access-date=4 December 2017 |website=www.oxfam.org |language=en}}</ref>
For 2013 insyd, Byanyima be de keynote speaker at de Ugandan North American Association (UNAA) convention for Dallas, Texas insyd.<ref name="NewVision_Kwesiga2013">{{cite news|title=Brian Kwesiga becomes youngest UNAA president|newspaper=New Vision|url=https://www.newvision.co.ug/news/1330619/brian-kwesiga-unaa-president|date=2013-09-03|access-date=2026-02-18}}</ref>
For January 2015 insyd, Byanyima co-chair de World Economic Forum for Davos insyd. She use de forum to press give action to narrow de gap between rich den poor. De charity ein research dey claim dat de share of de world ein wealth wey de richest 1 percent of de world population own am increase to nearly 50 percent for 2014 insyd, whereas 99 percent share de oda half.<ref>{{cite news|url=https://www.theguardian.com/business/2015/jan/19/global-wealth-oxfam-inequality-davos-economic-summit-switzerland|title=New Oxfam Report Says Half of Global Wealth Held by the Top One Percent|access-date=7 April 2015|date=19 January 2015|first=Larry|last=Elliott|author2=Ed Pilkington|newspaper=The Guardian|location=London}}</ref><ref>{{cite news|url=https://www.theguardian.com/business/2014/jan/20/oxfam-85-richest-people-half-of-the-world|title=Oxfam: 85 Richest People As Wealthy As Poorest Half of The World|first=Graeme|last=Wearden|newspaper=The Guardian|access-date=7 April 2015|date=20 January 2015}}</ref><ref>{{cite web |date=19 January 2015 |title=Richest 1% To Own More Than Rest of World, Oxfam Says |url=https://www.bbc.com/news/business-30875633 |access-date=7 April 2015 |publisher=BBC News}}</ref> Several economists dey strongly contest Oxfam ein figures.<ref>{{cite web |last=Vara |first=Vauhini |date=28 January 2015 |title=Critics of Oxfam's Poverty Statistics Are Missing The Point |url=http://www.newyorker.com/business/currency/critics-oxfams-poverty-statistics-missing-point |access-date=7 April 2015 |newspaper=The New Yorker}}</ref>
For November 2016 insyd, United Nations Secretary-General Ban Ki-moon appoint Byanyima to de High-Level Panel for Access to Medicines top, wey Ruth Dreifuss co-chair am, former President of Switzerland, den Festus Mogae, former President of Botswana.<ref>[https://www.un.org/press/en/2015/sga1608.doc.htm Secretary-General Appoints Two Former Presidents, 14 Others as Members of High-Level Panel on Access to Medicines] [[United Nations]], press release of 19 November 2015.</ref>
=== Executive Director of UNAIDS since 2019 ===
Dem appoint Byanyima as de executive director of UNAIDS<ref name="auto" /> for August 2019 insyd, by de United Nations Secretary-General, António Guterres, wey e follow a comprehensive selection process dat involve a search committee wey members of de UNAIDS Programme Coordinating Board constitute am. For ein new position she concurrently dey serve as a United Nations Under-Secretary-General.<ref>{{cite web |author=UNAIDS |date=14 August 2019 |title=UNAIDS Welcomes The Appointment of Winnie Byanyima As Its New Executive Director |url=https://www.unaids.org/en/resources/presscentre/pressreleaseandstatementarchive/2019/august/20190814_unaids-exd |access-date=3 November 2019 |publisher=Joint United Nations Programme on HIV/AIDS (UNAIDS) |place=Geneva, Switzerland}}</ref>
In addition to ein role at UNAIDS, Byanyima sanso serve a two-year term as a member of de ''World Bank Group’s'' (WBG) Advisory Council for Gender den Development top.<ref>[https://www.worldbank.org/en/topic/gender/publication/world-bank-advisory-council-on-gender-and-development World Bank Advisory Council on Gender and Development] [[:en:World_Bank_Group|World Bank Group]].</ref> Since 2022, she be a member of de Commission give Universal Health convene by Chatham House den Helen Clark den Jakaya Kikwete co-chair am.<ref>[https://www.chathamhouse.org/about-us/our-departments/global-health-programme/commission-universal-health Commission for Universal Health] [[:en:Chatham_House|Chatham House]].</ref>
At de recent 2024 International AIDS Conference for Munich insyd, she urge Gilead Sciences to allow Lenacapavir be generically license to de UN-backed Medicines Patent Pool (MPP) so dat cheaper generic versions wey dem fi sell for low- den middle-income countries. Gilead Sciences already license Bictegravir, anoda HIV drug, to de MPP.<ref>{{cite news|title=UN urges Gilead to 'make history' with game-changing HIV drug|url=https://www.france24.com/en/live-news/20240722-un-urges-gilead-to-make-history-with-game-changing-hiv-drug?utm_campaign=pharmalittle&utm_medium=email&_hsenc=p2ANqtz--M9A_UkKNlfsJFmOgvWZA8X3ivRR2n0OyV_F8gbInjmVKcf4DAHjJk7i1qEjsksg9CyOGxtOPcn4CgCMC8az_4XISPiA&_hsmi=316758759&utm_content=316758759&utm_source=hs_email|publisher=Agence France Presse|date=22 July 2024}}</ref><ref>{{cite news|title=The Medicines Patent Pool and Gilead Sciences Sign Licence for Bictegravir|url=https://medicinespatentpool.org/news-publications-post/the-medicines-patent-pool-and-gilead-sciences-sign-licence-for-bictegravir|publisher=The Medicines Patent Pool|date=4 October 2017}}</ref>
== Oda activities ==
* Virchow Prize for Global Health, Member of de Prize Committee (2022–present)<ref>[https://web.archive.org/web/20251114020339/https://virchowprize.org/virchow-prize-committee/ Prize Committee] Virchow Prize for Global Health.</ref>
* Global Fund to Fight AIDS, Tuberculosis and Malaria, Member of de Board<ref>[https://www.theglobalfund.org/en/board/members/ Board] [[:en:The_Global_Fund_to_Fight_AIDS,_Tuberculosis_and_Malaria|Global Fund to Fight AIDS, Tuberculosis and Malaria]].</ref>
* Equality Now, Member of de Advisory Board<ref>[https://www.equalitynow.org/equality_now_advisory_board Advisory Board] [[:en:Equality_Now|Equality Now]].</ref>
* International Gender Champions (IGC), Member<ref>[https://genderchampions.com/champions Members] [[:en:International_Gender_Champions|International Gender Champions]] (IGC).</ref>
== Ein life matter ==
For 7 July 1999 top, Byanyima marry Kizza Besigye for Nsambya, Kampala insyd.<ref>{{cite news|last=Tumusiime|first=James|last2=Nsigaye|first2=Sarah|title=Winnie weds Col. Besigye|newspaper=The Monitor|issue=189|pages=1–2|date=8 July 1999}}</ref> Besigye be de former chairman of de ''Forum for Democratic Change'' (FDC) political party for Uganda insyd. Dem be de parents of one son dem call Anselm. Byanyima be member of de FDC, although she significantly reduce ein participation for partisan Ugandan politics since she becam a Ugandan diplomat for 2004 insyd.<ref>{{cite web |last=Raymond Baguma |first=and Abdulkarim Ssengendo |date=4 February 2011 |title=I Cannot Leave Baby Besigye, Says Winnie |url=http://www.newvision.co.ug/D/9/803/745788 |access-date=19 July 2014 |newspaper=New Vision |location=Kampala}}</ref> She get five siblings: Edith, Anthony, Martha, Abraham, den Olivia.<ref>{{cite web |last=Basiime |first=Felix |date=17 November 2008 |title=Winnie Byanyima Hails Deceased Mother |url=http://www.newvision.co.ug/D/8/18/659964 |access-date=19 July 2014 |newspaper=New Vision |location=Kampala}}</ref> She be practicing Roman Catholic.
== References ==
<references />
== External links ==
{{sister project links||d=Q21759|c=Category:Winnie Byanyima|n=no|b=no|v=no|voy=no|m=no|mw=no|s=no|wikt=no|species=no}}
* [https://web.archive.org/web/20140808234741/http://www.newvision.co.ug/D/8/25/661111 Biography of Mrs. Gertrude Byanyima, Winnie Byanyima's Mother]
* [http://www.newvision.co.ug/D/8/459/662643 2008 Interview With Winnie Byanyima]
* [https://www.theguardian.com/global-development-professionals-network/2013/dec/11/interview-winnie-byanyima-oxfam-international Oxfam Chief On The Global Problem of Gender Equality – December 2013]
{{Authority control}}
{{DEFAULTSORT:Byanyima, Winnie}}
[[Category:Ugandan officials of de United Nations]]
[[Category:Human]]
[[Category:1959 births]]
[[Category:Ugandan aviators]]
[[Category:Members of de Parliament of Uganda]]
[[Category:Ambassadors of Uganda to France]]
[[Category:Forum for Democratic Change politicians]]
[[Category:People wey komot Mbarara District]]
[[Category:Alumni of de University of Manchester]]
[[Category:Alumni of Cranfield University]]
[[Category:20th-century Ugandan women politicians]]
[[Category:20th-century Ugandan politicians]]
[[Category:21st-century Ugandan women politicians]]
[[Category:Women ambassadors of Uganda]]
[[Category:People educated at Mount Saint Mary's College Namagunga]]
[[Category:Aeronautical engineers]]
[[Category:21st-century Ugandan women engineers]]
[[Category:21st-century Ugandan engineers]]
[[Category:Ugandan people]]
n735n1wet2zr94huqh0wqi5a778m9xv
Category:Fellows of de Royal Society of Literature
14
25328
107625
92362
2026-07-23T20:11:50Z
~2026-41365-45
7047
107625
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:2016 graphic novels
14
28562
107605
107143
2026-07-23T20:05:25Z
~2026-41365-45
7047
107605
wikitext
text/x-wiki
[[Category:Gtaphic novels]]
iq6zhml5jlkp60636z2w8vmzw51wruc
107607
107605
2026-07-23T20:05:54Z
~2026-41365-45
7047
107607
wikitext
text/x-wiki
[[Category:Graphic novels]]
1v1dp8la2buw75v4yrbvwhclf0bsjj0
Dyshidrosis
0
28643
107719
107288
2026-07-24T02:00:37Z
InternetArchiveBot
29
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
107719
wikitext
text/x-wiki
{{Databox}}
'''Dyshidrosis''' be a type of dermatitis wey be characterized by itchy blisters on de palms of de hands den bottoms of de feet.<ref name=Goldman2020>{{cite book |last=Lim |first=Henry W. |editor1-last=Goldman |editor1-first=Lee |editor2-last=Schafer |editor2-first=Andrew I. |title=Goldman-Cecil Medicine |date=2020 |publisher=Elsevier |location=Philadelphia |isbn=978-0-323-53266-2 |page=2612 |edition=26th |volume=2 |chapter-url=https://books.google.com/books?id=7pKqDwAAQBAJ&pg=PA2612 |language=en |chapter=409. Eczemas, photodermatoses, papulomatoses, papulosquamous (including fungal) diseases, and figurate erythema: Eczema, dyshidrosis |access-date=2023-04-28 |archive-date=2023-04-28 |archive-url=https://web.archive.org/web/20230428130743/https://books.google.com/books?id=7pKqDwAAQBAJ&pg=PA2612 |url-status=live }}</ref><ref name=NIH2014What>{{cite web|title=What Is Atopic Dermatitis? Fast Facts|url=http://www.niams.nih.gov/health_info/atopic_dermatitis/atopic_dermatitis_ff.asp|website=NIAMS|access-date=11 August 2016|date=November 2014|url-status=live|archive-url=https://web.archive.org/web/20160727232838/http://www.niams.nih.gov/Health_Info/Atopic_Dermatitis/atopic_dermatitis_ff.asp|archive-date=27 July 2016}}</ref> Blisters generally be one to two millimeters in size den heal over three weeks.<ref name=Lof2006/><ref name=Ja2011/> However, dem often recur.<ref name=Ja2011/> Redness no be usually present.<ref name=Lof2006/> Repeated attacks fi result in fissures den skin thickening.<ref name=Lof2006/>
De cause be unknown.<ref name=Ja2011/> Triggers fi include allergens, physical anaa mental [[Stress (biology)|stress]], frequent hand washing, anaa metals.<ref name=Ja2011/> Diagnosis typically be based on wat e dey look like den de symptoms.<ref name=Ja2011/> Allergy testing den culture fi be done to rule out oda problems.<ref name=Ja2011>{{cite journal|last1=Colomb-Lippa|first1=D|last2=Klingler|first2=AM|title=Dyshidrosis |journal= Journal of the American Academy of Physician Assistants|date=July 2011|volume=24|issue=7|pages=54|pmid=21748961}}</ref> Oda conditions wey produce similar symptoms include pustular psoriasis den [[scabies]].<ref name=Lof2006/>
Avoiding triggers fi be useful as fi a barrier cream.<ref name=Lof2006/> Treatment generally be plus steroid cream.<ref name=Ja2011/> High strength steroid creams fi be required for de first week anaa two.<ref name=Lof2006/> Antihistamines fi be used to help plus de itch.<ref name=Ja2011/> If dis no be effective steroid pills, tacrolimus, anaa psoralen plus ultraviolet A (PUVA) fi be tried.<ref name=Lof2006/><ref name=Ja2011/>
About 1 insyd 2,000 people be affected insyd [[Sweden]].<ref name=Lof2006/> Males den females appear to be affected equally.<ref name=Lof2006/> E dey explain about one insyd five cases of hand dermatitis.<ref name=Fits2016/> De first description be insyd 1873.<ref name=Lof2006/> De name dey cam from de word "dyshidrotic", wey dey mean "difficult sweating", as problems plus sweating once be believed to be de cause.<ref name=Lof2006>{{cite journal|last1=Lofgren|first1=SM|last2=Warshaw|first2=EM|title=Dyshidrosis: epidemiology, clinical characteristics, and therapy.|journal=Dermatitis : Contact, Atopic, Occupational, Drug|date=December 2006|volume=17|issue=4|pages=165–81|pmid=17150166|doi=10.2310/6620.2006.05021}}</ref><gallery widths="250px" heights="250px">
File:DyshidroticDermatitisOnHandsLateStage.jpg|Advanced stage of dyshidrosis on the fingers
File:Dyshidrosis.JPG|Palmar dyshidrosis
File:Palmar dyshidrosis peeling stage.JPG|Advanced stage of palmar dyshidrosis on the palm showing cracked and peeling skin
File:Dyshidrosis late stage.jpg|Advanced stage of dyshidrosis on the foot.
File:Rim of scale on plantar surface of thumb.jpg|Rim of scale on the palmar surface of the thumb from a resolving dyshidrotic flare
</gallery>
== Treatment ==
Der be chaw treatments available give dyshidrosis. However, few of dem be developed anaa tested specifically on de condition.
* Barriers to moisture den irritants, wey dey include barrier creams den gloves.<ref name=":1">{{Cite journal|last=Perry|first=Adam D.|last2=Trafeli|first2=John P.|date=2009-05-01|title=Hand Dermatitis: Review of Etiology, Diagnosis, and Treatment|journal=The Journal of the American Board of Family Medicine|language=en|volume=22|issue=3|pages=325–330|doi=10.3122/jabfm.2009.03.080118|issn=1557-2625|pmid=19429739|df=|doi-access=free}}</ref>
* Topical steroids<ref>{{cite web |url=http://www.emedicine.com/ped/topic1867.htm |title=eMedicine – Dyshidrotic Eczema : Article by Camila K Janniger |access-date=2007-07-10 |url-status=live |archive-url=https://web.archive.org/web/20070707015519/http://www.emedicine.com/ped/topic1867.htm |archive-date=2007-07-07 }}</ref>
* Potassium permanganate dilute solution soaks<ref name="pmid14127384">{{cite journal |author=BIRT AR |title=Drugs for Eczema of Children |journal=Can Med Assoc J |volume=90 |issue=11 |pages=693–4 |date=March 1964 |pmid=14127384 |pmc=1922428 |doi= |url=}}</ref><ref name="pmid1476027">{{cite journal |author=Stalder JF |title=Comparative effects of two topical antiseptics (chlorhexidine vs KMn04) on bacterial skin flora in atopic dermatitis |journal=Acta Derm Venereol Suppl (Stockh) |volume=176 |issue= |pages=132–4 |year=1992 |pmid=1476027 |doi= |url= |author2=Fleury M |author3=Sourisse M |display-authors=3 |last4=Allavoine |first4=T |last5=Chalamet |first5=C |last6=Brosset |first6=P |last7=Litoux |first7=P}}</ref><ref name="pmid12538301">{{cite journal |vauthors=Baron S, Moss C |title=Caustic burn caused by potassium permanganate |journal=Arch. Dis. Child. |volume=88 |issue=2 |pages=96 |date=February 2003 |pmid=12538301 |doi= 10.1136/adc.88.2.96|pmc=1719457}}</ref>
* Dapsone (diamino-diphenyl sulfone)<ref>{{cite web |url=http://www.dermnet.org.nz/dermatitis/pompholyx.html |title=Vesicular hand dermatitis |access-date=2010-04-07 |url-status=live |archive-url=https://web.archive.org/web/20100330150735/http://www.dermnet.org.nz/dermatitis/pompholyx.html |archive-date=2010-03-30 }}</ref>
* Antihistamines: [[Fexofenadine]] up to 180 mg per day.<ref>{{Cite journal|last=Diepgen|first=Thomas L.|last2=Agner|first2=Tove|last3=Aberer|first3=Werner|last4=Berth-Jones|first4=John|last5=Cambazard|first5=Frédéric|last6=Elsner|first6=Peter|last7=McFadden|first7=John|last8=Coenraads|first8=Pieter Jan|date=2007-10-01|title=Management of chronic hand eczema|journal=Contact Dermatitis|language=en|volume=57|issue=4|pages=203–210|doi=10.1111/j.1600-0536.2007.01179.x|pmid=17868211|issn=1600-0536|df=}}</ref>
* Alitretinoin (9-cis-retinoic acid)<ref name="ruzicka-alitretinoin">{{cite journal | vauthors = Ruzicka T, Lynde CW, Jemec GB, Diepgen T, Berth-Jones J, Coenraads PJ, Kaszuba A, Bissonnette R, Varjonen E, Holló P, Cambazard F, Lahfa M, Elsner P, Nyberg F, Svensson A, Brown TC, Harsch M, Maares J | display-authors = 6 | title = Efficacy and safety of oral alitretinoin (9-cis retinoic acid) in patients with severe chronic hand eczema refractory to topical corticosteroids: results of a randomized, double-blind, placebo-controlled, multicentre trial | journal = Br. J. Dermatol. | volume = 158 | issue = 4 | pages = 808–17 | date = April 2008 | pmid = 18294310 | doi = 10.1111/j.1365-2133.2008.08487.x | url = https://pure.rug.nl/ws/files/6715954/Ruzicka_2008_Br_J_Dermatol.pdf | access-date = 2019-02-05 | archive-date = 2019-02-18 | archive-url = https://web.archive.org/web/20190218111529/https://pure.rug.nl/ws/files/6715954/Ruzicka_2008_Br_J_Dermatol.pdf | url-status = live }}</ref><ref name="pmid10640839">{{cite journal | vauthors = Bollag W, Ott F | title = Successful treatment of chronic hand eczema with oral 9-cis-retinoic acid | journal = Dermatology (Basel) | volume = 199 | issue = 4 | pages = 308–12 | date = 1999 | pmid = 10640839 | doi = 10.1159/000018280 }}</ref><ref name="pmid15611422">{{cite journal | vauthors = Ruzicka T, Larsen FG, Galewicz D, Horváth A, Coenraads PJ, Thestrup-Pedersen K, Ortonne JP, Zouboulis CC, Harsch M, Brown TC, Zultak M | title = Oral alitretinoin (9-cis-retinoic acid) therapy for chronic hand dermatitis in patients refractory to standard therapy: results of a randomized, double-blind, placebo-controlled, multicenter trial | journal = Arch Dermatol | volume = 140 | issue = 12 | pages = 1453–9 | date = December 2004 | pmid = 15611422 | doi = 10.1001/archderm.140.12.1453 | doi-access = free }}</ref>
* Systemic steroids<ref name=":1" />
== Epidemiology ==
About 1 insyd 2,000 people be affected insyd Sweden. Males den females appear to be affected equally.<ref name=Lof2006/>
==Synonyms==
Dyshidrosis sanso be known as pompholyx, a term wey dey originate from de Greek word give "bubble".<ref name=Fits2016>{{Cite book|title=Dermatology Secrets Plus|last=Fitzpatrick|first=James|publisher=Elsevier|year=2016|isbn=978-0-323-31029-1|location=|pages=70–81|chapter=8|chapter-url=https://books.google.ca/books?id=ReqeCgAAQBAJ&pg=PR76|access-date=2017-11-27|archive-date=2017-12-01|archive-url=https://web.archive.org/web/20171201035635/https://books.google.ca/books?id=ReqeCgAAQBAJ&pg=PR76|url-status=live}}</ref>
==References==
<references />
== External links ==
{{Commons}}
*[https://web.archive.org/web/20161117095045/http://www.skinsight.com/adult/dyshidroticDermatitis.htm Images of dyshidrotic eczema] {{Webarchive|url=https://web.archive.org/web/20161117095045/http://www.skinsight.com/adult/dyshidroticDermatitis.htm |date=2016-11-17 }} at Skinsight
*[http://www.dermnetnz.org/dermatitis/pompholyx.html Pompholyx] {{Webarchive|url=https://web.archive.org/web/20160731104848/http://www.dermnetnz.org/dermatitis/pompholyx.html |date=2016-07-31 }} at DermNet NZ (New Zealand Dermatological Society Incorporated)
[[Category:Chronic blistering cutaneous conditions]]
[[Category:Eczema]]
[[Category:Translated from MDWiki]]
1ptcotznlwfz177ck51r7trpu7i5i36
Waardenburg syndrome
0
28743
107577
107564
2026-07-23T14:12:18Z
DaSupremo
9
Improve article
107577
wikitext
text/x-wiki
{{Databox}}
'''Waardenburg syndrome''' be a group of rare genetic conditions wey be characterised by at least sam degree of congenital hearing loss den pigmentation deficiencies, wich fi include bright blue eyes (anaa one blue eye den one brown eye), a white forelock anaa patches of light skin. Dese basic features constitute type 2 of de condition; insyd type 1, der sanso be a wider gap between de inner corners of de eyes dem call telecanthus, anaa dystopia canthorum.<ref name=":1322">{{Cite web |title=OMIM Entry - # 193500 - WAARDENBURG SYNDROME, TYPE 1; WS1 |url=https://omim.org/entry/193500 |access-date=2019-12-07 |website=omim.org}}</ref> Insyd type 3, wich be rare, de arms den hands sanso be malformed, plus permanent finger contractures anaa fused fingers, while insyd type 4, de person sanso get Hirschsprung's disease.<ref name=":62">{{Cite web |title=OMIM Entry - # 148820 - WAARDENBURG SYNDROME, TYPE 3; WS3 |url=https://omim.org/entry/148820 |access-date=2019-12-07 |website=omim.org}}</ref><ref name=":23">{{Cite web |title=OMIM Entry - # 277580 - WAARDENBURG SYNDROME, TYPE 4A; WS4A |url=https://omim.org/entry/277580 |access-date=2019-12-07 |website=omim.org}}</ref> Der sanso exist at least two types (2E den PCWH) wey fi result in central nervous system (CNS) symptoms such as developmental delay den muscle tone abnormalities.<ref name=":522">{{Cite web |title=OMIM Entry - # 611584 - WAARDENBURG SYNDROME, TYPE 2E; WS2E |url=https://omim.org/entry/611584 |access-date=2019-12-07 |website=omim.org}}</ref>
De syndrome be caused by mutations insyd any of several genes wey affect de division den migration of neural crest cells during embryonic development (though sam of de genes involve sanso affect de neural tube).<ref name=":32">{{Cite journal |last1=Pingault |first1=Véronique |last2=Ente |first2=Dorothée |last3=Moal |first3=Florence Dastot-Le |last4=Goossens |first4=Michel |last5=Marlin |first5=Sandrine |last6=Bondurand |first6=Nadège |date=2010 |title=Review and update of mutations causing Waardenburg syndrome |journal=Human Mutation |language=en |volume=31 |issue=4 |pages=391–406 |doi=10.1002/humu.21211 |issn=1098-1004 |pmid=20127975 |s2cid=12278025 |doi-access=free}}</ref> Neural crest cells be stem cells dem lef over after de closure of de neural tube wey dey go on to form diverse non-CNS cells insyd different parts of de body, wey dey include melanocytes, various facial den inner ear bones den cartilage, den de peripheral nerves of de intestines.<ref name=":52">{{Cite web |title=Neural Crest Development - Embryology |url=https://embryology.med.unsw.edu.au/embryology/index.php/Neural_Crest_Development |access-date=2019-12-13 |website=embryology.med.unsw.edu.au}}</ref>
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
rzgb9cl0sh43dsc3z5ogc4fye89oyup
107578
107577
2026-07-23T14:16:28Z
DaSupremo
9
Improve article
107578
wikitext
text/x-wiki
{{Databox}}
'''Waardenburg syndrome''' be a group of rare genetic conditions wey be characterised by at least sam degree of congenital hearing loss den pigmentation deficiencies, wich fi include bright blue eyes (anaa one blue eye den one brown eye), a white forelock anaa patches of light skin. Dese basic features constitute type 2 of de condition; insyd type 1, der sanso be a wider gap between de inner corners of de eyes dem call telecanthus, anaa dystopia canthorum.<ref name=":1322">{{Cite web |title=OMIM Entry - # 193500 - WAARDENBURG SYNDROME, TYPE 1; WS1 |url=https://omim.org/entry/193500 |access-date=2019-12-07 |website=omim.org}}</ref> Insyd type 3, wich be rare, de arms den hands sanso be malformed, plus permanent finger contractures anaa fused fingers, while insyd type 4, de person sanso get Hirschsprung's disease.<ref name=":62">{{Cite web |title=OMIM Entry - # 148820 - WAARDENBURG SYNDROME, TYPE 3; WS3 |url=https://omim.org/entry/148820 |access-date=2019-12-07 |website=omim.org}}</ref><ref name=":23">{{Cite web |title=OMIM Entry - # 277580 - WAARDENBURG SYNDROME, TYPE 4A; WS4A |url=https://omim.org/entry/277580 |access-date=2019-12-07 |website=omim.org}}</ref> Der sanso exist at least two types (2E den PCWH) wey fi result in central nervous system (CNS) symptoms such as developmental delay den muscle tone abnormalities.<ref name=":522">{{Cite web |title=OMIM Entry - # 611584 - WAARDENBURG SYNDROME, TYPE 2E; WS2E |url=https://omim.org/entry/611584 |access-date=2019-12-07 |website=omim.org}}</ref>
De syndrome be caused by mutations insyd any of several genes wey affect de division den migration of neural crest cells during embryonic development (though sam of de genes involve sanso affect de neural tube).<ref name=":32">{{Cite journal |last1=Pingault |first1=Véronique |last2=Ente |first2=Dorothée |last3=Moal |first3=Florence Dastot-Le |last4=Goossens |first4=Michel |last5=Marlin |first5=Sandrine |last6=Bondurand |first6=Nadège |date=2010 |title=Review and update of mutations causing Waardenburg syndrome |journal=Human Mutation |language=en |volume=31 |issue=4 |pages=391–406 |doi=10.1002/humu.21211 |issn=1098-1004 |pmid=20127975 |s2cid=12278025 |doi-access=free}}</ref> Neural crest cells be stem cells dem lef over after de closure of de neural tube wey dey go on to form diverse non-CNS cells insyd different parts of de body, wey dey include melanocytes, various facial den inner ear bones den cartilage, den de peripheral nerves of de intestines.<ref name=":52">{{Cite web |title=Neural Crest Development - Embryology |url=https://embryology.med.unsw.edu.au/embryology/index.php/Neural_Crest_Development |access-date=2019-12-13 |website=embryology.med.unsw.edu.au}}</ref>
Type 1 be caused by a mutation insyd de ''PAX3'' gene, while de gene wey most often dey cause type 2 wen mutated be ''MITF''.<ref name=":1322" /><ref name=":032">{{Cite web |title=OMIM Entry - # 193510 - WAARDENBURG SYNDROME, TYPE 2A; WS2A |url=https://omim.org/entry/193510 |access-date=2019-12-07 |website=omim.org}}</ref> Type 3 be a more severe presentation of type 1 wey e be caused by a mutation insyd de same gene, while type 4 most often be caused by a mutation insyd ''SOX10''.<ref name=":62" /><ref name=":1222">{{Cite journal |last1=Song |first1=J. |last2=Feng |first2=Y. |last3=Acke |first3=F. R. |last4=Coucke |first4=P. |last5=Vleminckx |first5=K. |last6=Dhooge |first6=I. J. |date=2016 |title=Hearing loss in Waardenburg syndrome: a systematic review |journal=Clinical Genetics |language=en |volume=89 |issue=4 |pages=416–425 |doi=10.1111/cge.12631 |issn=1399-0004 |pmid=26100139 |s2cid=23834634}}</ref> Mutations insyd oda genes sanso fi cause de different types, den sam of dese be given dema own lettered subtypes. Most types be autosomal dominant.
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
made552srhwm1rvrrqnfvfahzrfdky3
107579
107578
2026-07-23T14:21:50Z
DaSupremo
9
Improve article
107579
wikitext
text/x-wiki
{{Databox}}
'''Waardenburg syndrome''' be a group of rare genetic conditions wey be characterised by at least sam degree of congenital hearing loss den pigmentation deficiencies, wich fi include bright blue eyes (anaa one blue eye den one brown eye), a white forelock anaa patches of light skin. Dese basic features constitute type 2 of de condition; insyd type 1, der sanso be a wider gap between de inner corners of de eyes dem call telecanthus, anaa dystopia canthorum.<ref name=":1322">{{Cite web |title=OMIM Entry - # 193500 - WAARDENBURG SYNDROME, TYPE 1; WS1 |url=https://omim.org/entry/193500 |access-date=2019-12-07 |website=omim.org}}</ref> Insyd type 3, wich be rare, de arms den hands sanso be malformed, plus permanent finger contractures anaa fused fingers, while insyd type 4, de person sanso get Hirschsprung's disease.<ref name=":62">{{Cite web |title=OMIM Entry - # 148820 - WAARDENBURG SYNDROME, TYPE 3; WS3 |url=https://omim.org/entry/148820 |access-date=2019-12-07 |website=omim.org}}</ref><ref name=":23">{{Cite web |title=OMIM Entry - # 277580 - WAARDENBURG SYNDROME, TYPE 4A; WS4A |url=https://omim.org/entry/277580 |access-date=2019-12-07 |website=omim.org}}</ref> Der sanso exist at least two types (2E den PCWH) wey fi result in central nervous system (CNS) symptoms such as developmental delay den muscle tone abnormalities.<ref name=":522">{{Cite web |title=OMIM Entry - # 611584 - WAARDENBURG SYNDROME, TYPE 2E; WS2E |url=https://omim.org/entry/611584 |access-date=2019-12-07 |website=omim.org}}</ref>
De syndrome be caused by mutations insyd any of several genes wey affect de division den migration of neural crest cells during embryonic development (though sam of de genes involve sanso affect de neural tube).<ref name=":32">{{Cite journal |last1=Pingault |first1=Véronique |last2=Ente |first2=Dorothée |last3=Moal |first3=Florence Dastot-Le |last4=Goossens |first4=Michel |last5=Marlin |first5=Sandrine |last6=Bondurand |first6=Nadège |date=2010 |title=Review and update of mutations causing Waardenburg syndrome |journal=Human Mutation |language=en |volume=31 |issue=4 |pages=391–406 |doi=10.1002/humu.21211 |issn=1098-1004 |pmid=20127975 |s2cid=12278025 |doi-access=free}}</ref> Neural crest cells be stem cells dem lef over after de closure of de neural tube wey dey go on to form diverse non-CNS cells insyd different parts of de body, wey dey include melanocytes, various facial den inner ear bones den cartilage, den de peripheral nerves of de intestines.<ref name=":52">{{Cite web |title=Neural Crest Development - Embryology |url=https://embryology.med.unsw.edu.au/embryology/index.php/Neural_Crest_Development |access-date=2019-12-13 |website=embryology.med.unsw.edu.au}}</ref>
Type 1 be caused by a mutation insyd de ''PAX3'' gene, while de gene wey most often dey cause type 2 wen mutated be ''MITF''.<ref name=":1322" /><ref name=":032">{{Cite web |title=OMIM Entry - # 193510 - WAARDENBURG SYNDROME, TYPE 2A; WS2A |url=https://omim.org/entry/193510 |access-date=2019-12-07 |website=omim.org}}</ref> Type 3 be a more severe presentation of type 1 wey e be caused by a mutation insyd de same gene, while type 4 most often be caused by a mutation insyd ''SOX10''.<ref name=":62" /><ref name=":1222">{{Cite journal |last1=Song |first1=J. |last2=Feng |first2=Y. |last3=Acke |first3=F. R. |last4=Coucke |first4=P. |last5=Vleminckx |first5=K. |last6=Dhooge |first6=I. J. |date=2016 |title=Hearing loss in Waardenburg syndrome: a systematic review |journal=Clinical Genetics |language=en |volume=89 |issue=4 |pages=416–425 |doi=10.1111/cge.12631 |issn=1399-0004 |pmid=26100139 |s2cid=23834634}}</ref> Mutations insyd oda genes sanso fi cause de different types, den sam of dese be given dema own lettered subtypes. Most types be autosomal dominant.
De estimated prevalence of Waardenburg syndrome be 1 insyd 42,000.<ref name=":32" /><ref name=":1222" /> Types 1 den 2 be de most common, wey dey comprise approximately half den a third of cases, respectively, while type 4 dey comprise a fifth den type 3 less dan 2% of cases.<ref name=":1222" /> An estimated 2–5% of congenitally deaf people get Waardenburg syndrome.<ref name=":1222" /> Descriptions of de syndrome dey date back to at least de first half of de 20th century, however e be named after Dutch ophthalmologist den geneticist Petrus Johannes Waardenburg, wey describe am insyd 1951.<ref name=":42">{{Cite journal |last=Chandra Mohan |first=Setty. L. N. |date=2018-09-01 |title=Case of Waardenburg Shah syndrome in a family with review of literature |journal=Journal of Otology |volume=13 |issue=3 |pages=105–110 |doi=10.1016/j.joto.2018.05.005 |issn=1672-2930 |pmc=6291636 |pmid=30559775 |doi-access=free}}</ref><ref name="Waardenburg19513">{{Cite journal |last=Waardenburg PJ |date=September 1951 |title=A New Syndrome Combining Developmental Anomalies of the Eyelids, Eyebrows and Noseroot with Pigmentary Anomalies of the Iris and Head Hair and with Congenital Deafness; ''Dystopia canthi medialis et punctorum lacrimalium lateroversa, Hyperplasia supercilii medialis et radicis nasi, Heterochromia iridum totalis sive partialis, Albinismus circumscriptus (leucismus, poliosis) et Surditas congenita (surdimutitas)'' |journal=Am. J. Hum. Genet. |volume=3 |issue=3 |pages=195–253 |pmc=1716407 |pmid=14902764}}</ref> Ein subtypes be progressively discovered insyd de following decades wey e get genes dem attributed to dem mostly insyd de 1990s den 2000s.
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
i9il1efjexqjb54auizulzdn69tbbip
107580
107579
2026-07-23T14:29:09Z
DaSupremo
9
Improve article
107580
wikitext
text/x-wiki
{{Databox}}
'''Waardenburg syndrome''' be a group of rare genetic conditions wey be characterised by at least sam degree of congenital hearing loss den pigmentation deficiencies, wich fi include bright blue eyes (anaa one blue eye den one brown eye), a white forelock anaa patches of light skin. Dese basic features constitute type 2 of de condition; insyd type 1, der sanso be a wider gap between de inner corners of de eyes dem call telecanthus, anaa dystopia canthorum.<ref name=":1322">{{Cite web |title=OMIM Entry - # 193500 - WAARDENBURG SYNDROME, TYPE 1; WS1 |url=https://omim.org/entry/193500 |access-date=2019-12-07 |website=omim.org}}</ref> Insyd type 3, wich be rare, de arms den hands sanso be malformed, plus permanent finger contractures anaa fused fingers, while insyd type 4, de person sanso get Hirschsprung's disease.<ref name=":62">{{Cite web |title=OMIM Entry - # 148820 - WAARDENBURG SYNDROME, TYPE 3; WS3 |url=https://omim.org/entry/148820 |access-date=2019-12-07 |website=omim.org}}</ref><ref name=":23">{{Cite web |title=OMIM Entry - # 277580 - WAARDENBURG SYNDROME, TYPE 4A; WS4A |url=https://omim.org/entry/277580 |access-date=2019-12-07 |website=omim.org}}</ref> Der sanso exist at least two types (2E den PCWH) wey fi result in central nervous system (CNS) symptoms such as developmental delay den muscle tone abnormalities.<ref name=":522">{{Cite web |title=OMIM Entry - # 611584 - WAARDENBURG SYNDROME, TYPE 2E; WS2E |url=https://omim.org/entry/611584 |access-date=2019-12-07 |website=omim.org}}</ref>
De syndrome be caused by mutations insyd any of several genes wey affect de division den migration of neural crest cells during embryonic development (though sam of de genes involve sanso affect de neural tube).<ref name=":32">{{Cite journal |last1=Pingault |first1=Véronique |last2=Ente |first2=Dorothée |last3=Moal |first3=Florence Dastot-Le |last4=Goossens |first4=Michel |last5=Marlin |first5=Sandrine |last6=Bondurand |first6=Nadège |date=2010 |title=Review and update of mutations causing Waardenburg syndrome |journal=Human Mutation |language=en |volume=31 |issue=4 |pages=391–406 |doi=10.1002/humu.21211 |issn=1098-1004 |pmid=20127975 |s2cid=12278025 |doi-access=free}}</ref> Neural crest cells be stem cells dem lef over after de closure of de neural tube wey dey go on to form diverse non-CNS cells insyd different parts of de body, wey dey include melanocytes, various facial den inner ear bones den cartilage, den de peripheral nerves of de intestines.<ref name=":52">{{Cite web |title=Neural Crest Development - Embryology |url=https://embryology.med.unsw.edu.au/embryology/index.php/Neural_Crest_Development |access-date=2019-12-13 |website=embryology.med.unsw.edu.au}}</ref>
Type 1 be caused by a mutation insyd de ''PAX3'' gene, while de gene wey most often dey cause type 2 wen mutated be ''MITF''.<ref name=":1322" /><ref name=":032">{{Cite web |title=OMIM Entry - # 193510 - WAARDENBURG SYNDROME, TYPE 2A; WS2A |url=https://omim.org/entry/193510 |access-date=2019-12-07 |website=omim.org}}</ref> Type 3 be a more severe presentation of type 1 wey e be caused by a mutation insyd de same gene, while type 4 most often be caused by a mutation insyd ''SOX10''.<ref name=":62" /><ref name=":1222">{{Cite journal |last1=Song |first1=J. |last2=Feng |first2=Y. |last3=Acke |first3=F. R. |last4=Coucke |first4=P. |last5=Vleminckx |first5=K. |last6=Dhooge |first6=I. J. |date=2016 |title=Hearing loss in Waardenburg syndrome: a systematic review |journal=Clinical Genetics |language=en |volume=89 |issue=4 |pages=416–425 |doi=10.1111/cge.12631 |issn=1399-0004 |pmid=26100139 |s2cid=23834634}}</ref> Mutations insyd oda genes sanso fi cause de different types, den sam of dese be given dema own lettered subtypes. Most types be autosomal dominant.
De estimated prevalence of Waardenburg syndrome be 1 insyd 42,000.<ref name=":32" /><ref name=":1222" /> Types 1 den 2 be de most common, wey dey comprise approximately half den a third of cases, respectively, while type 4 dey comprise a fifth den type 3 less dan 2% of cases.<ref name=":1222" /> An estimated 2–5% of congenitally deaf people get Waardenburg syndrome.<ref name=":1222" /> Descriptions of de syndrome dey date back to at least de first half of de 20th century, however e be named after Dutch ophthalmologist den geneticist Petrus Johannes Waardenburg, wey describe am insyd 1951.<ref name=":42">{{Cite journal |last=Chandra Mohan |first=Setty. L. N. |date=2018-09-01 |title=Case of Waardenburg Shah syndrome in a family with review of literature |journal=Journal of Otology |volume=13 |issue=3 |pages=105–110 |doi=10.1016/j.joto.2018.05.005 |issn=1672-2930 |pmc=6291636 |pmid=30559775 |doi-access=free}}</ref><ref name="Waardenburg19513">{{Cite journal |last=Waardenburg PJ |date=September 1951 |title=A New Syndrome Combining Developmental Anomalies of the Eyelids, Eyebrows and Noseroot with Pigmentary Anomalies of the Iris and Head Hair and with Congenital Deafness; ''Dystopia canthi medialis et punctorum lacrimalium lateroversa, Hyperplasia supercilii medialis et radicis nasi, Heterochromia iridum totalis sive partialis, Albinismus circumscriptus (leucismus, poliosis) et Surditas congenita (surdimutitas)'' |journal=Am. J. Hum. Genet. |volume=3 |issue=3 |pages=195–253 |pmc=1716407 |pmid=14902764}}</ref> Ein subtypes be progressively discovered insyd de following decades wey e get genes dem attributed to dem mostly insyd de 1990s den 2000s.
== Cause ==
=== Classification table ===
{| class="wikitable"
!Type
!OMIM
!Gene
!Locus
!Inheritance
|-
|Type 1 (WS1)
|193500
|''PAX3''
|2q36.1<ref name="pmid75459133">{{Cite journal |vauthors=Tsukamoto K, Nakamura Y, Niikawa N |date=March 1994 |title=Isolation of two isoforms of the PAX3 gene transcripts and their tissue-specific alternative expression in human adult tissues |journal=Hum. Genet. |volume=93 |issue=3 |pages=270–4 |doi=10.1007/bf00212021 |pmid=7545913 |s2cid=36749688}}</ref>
|Autosomal dominant
|-
|Type 2A (WS2A, originally WS2)
|193510
|''MITF''
|3p14.1–p12.3
|Autosomal dominant
|-
|Type 2B (WS2B)
|600193
|''WS2B''
|1p21–p13.3
|Autosomal dominant
|-
|Type 2C (WS2C)
|606662
|''WS2C''
|8p23
|Autosomal dominant
|-
|Type 2D (WS2D)
|608890
|''SNAI2''
|8q11
|Autosomal recessive
|-
|Type 2E (WS2E)
|611584
|''SOX10''
|22q13.1
|Autosomal dominant
|-
|Type 3 (WS3)
|148820
|''PAX3''
|2q36.1
|Autosomal dominant anaa autosomal recessive
|-
|Type 4A (WS4A)
|277580
|''EDNRB''
|13q22
|Autosomal dominant anaa autosomal recessive
|-
|Type 4B (WS4B)
|613265
|''EDN3''
|20q13
|Autosomal dominant anaa autosomal recessive
|-
|Type 4C (WS4C)
|613266
|''SOX10''
|22q13.1
|Autosomal dominant
|}
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
69py0c1dyqixu6fcowc1e37yq0xmlon
107581
107580
2026-07-23T14:32:06Z
DaSupremo
9
Improve article
107581
wikitext
text/x-wiki
{{Databox}}
'''Waardenburg syndrome''' be a group of rare genetic conditions wey be characterised by at least sam degree of congenital hearing loss den pigmentation deficiencies, wich fi include bright blue eyes (anaa one blue eye den one brown eye), a white forelock anaa patches of light skin. Dese basic features constitute type 2 of de condition; insyd type 1, der sanso be a wider gap between de inner corners of de eyes dem call telecanthus, anaa dystopia canthorum.<ref name=":1322">{{Cite web |title=OMIM Entry - # 193500 - WAARDENBURG SYNDROME, TYPE 1; WS1 |url=https://omim.org/entry/193500 |access-date=2019-12-07 |website=omim.org}}</ref> Insyd type 3, wich be rare, de arms den hands sanso be malformed, plus permanent finger contractures anaa fused fingers, while insyd type 4, de person sanso get Hirschsprung's disease.<ref name=":62">{{Cite web |title=OMIM Entry - # 148820 - WAARDENBURG SYNDROME, TYPE 3; WS3 |url=https://omim.org/entry/148820 |access-date=2019-12-07 |website=omim.org}}</ref><ref name=":23">{{Cite web |title=OMIM Entry - # 277580 - WAARDENBURG SYNDROME, TYPE 4A; WS4A |url=https://omim.org/entry/277580 |access-date=2019-12-07 |website=omim.org}}</ref> Der sanso exist at least two types (2E den PCWH) wey fi result in central nervous system (CNS) symptoms such as developmental delay den muscle tone abnormalities.<ref name=":522">{{Cite web |title=OMIM Entry - # 611584 - WAARDENBURG SYNDROME, TYPE 2E; WS2E |url=https://omim.org/entry/611584 |access-date=2019-12-07 |website=omim.org}}</ref>
De syndrome be caused by mutations insyd any of several genes wey affect de division den migration of neural crest cells during embryonic development (though sam of de genes involve sanso affect de neural tube).<ref name=":32">{{Cite journal |last1=Pingault |first1=Véronique |last2=Ente |first2=Dorothée |last3=Moal |first3=Florence Dastot-Le |last4=Goossens |first4=Michel |last5=Marlin |first5=Sandrine |last6=Bondurand |first6=Nadège |date=2010 |title=Review and update of mutations causing Waardenburg syndrome |journal=Human Mutation |language=en |volume=31 |issue=4 |pages=391–406 |doi=10.1002/humu.21211 |issn=1098-1004 |pmid=20127975 |s2cid=12278025 |doi-access=free}}</ref> Neural crest cells be stem cells dem lef over after de closure of de neural tube wey dey go on to form diverse non-CNS cells insyd different parts of de body, wey dey include melanocytes, various facial den inner ear bones den cartilage, den de peripheral nerves of de intestines.<ref name=":52">{{Cite web |title=Neural Crest Development - Embryology |url=https://embryology.med.unsw.edu.au/embryology/index.php/Neural_Crest_Development |access-date=2019-12-13 |website=embryology.med.unsw.edu.au}}</ref>
Type 1 be caused by a mutation insyd de ''PAX3'' gene, while de gene wey most often dey cause type 2 wen mutated be ''MITF''.<ref name=":1322" /><ref name=":032">{{Cite web |title=OMIM Entry - # 193510 - WAARDENBURG SYNDROME, TYPE 2A; WS2A |url=https://omim.org/entry/193510 |access-date=2019-12-07 |website=omim.org}}</ref> Type 3 be a more severe presentation of type 1 wey e be caused by a mutation insyd de same gene, while type 4 most often be caused by a mutation insyd ''SOX10''.<ref name=":62" /><ref name=":1222">{{Cite journal |last1=Song |first1=J. |last2=Feng |first2=Y. |last3=Acke |first3=F. R. |last4=Coucke |first4=P. |last5=Vleminckx |first5=K. |last6=Dhooge |first6=I. J. |date=2016 |title=Hearing loss in Waardenburg syndrome: a systematic review |journal=Clinical Genetics |language=en |volume=89 |issue=4 |pages=416–425 |doi=10.1111/cge.12631 |issn=1399-0004 |pmid=26100139 |s2cid=23834634}}</ref> Mutations insyd oda genes sanso fi cause de different types, den sam of dese be given dema own lettered subtypes. Most types be autosomal dominant.
De estimated prevalence of Waardenburg syndrome be 1 insyd 42,000.<ref name=":32" /><ref name=":1222" /> Types 1 den 2 be de most common, wey dey comprise approximately half den a third of cases, respectively, while type 4 dey comprise a fifth den type 3 less dan 2% of cases.<ref name=":1222" /> An estimated 2–5% of congenitally deaf people get Waardenburg syndrome.<ref name=":1222" /> Descriptions of de syndrome dey date back to at least de first half of de 20th century, however e be named after Dutch ophthalmologist den geneticist Petrus Johannes Waardenburg, wey describe am insyd 1951.<ref name=":42">{{Cite journal |last=Chandra Mohan |first=Setty. L. N. |date=2018-09-01 |title=Case of Waardenburg Shah syndrome in a family with review of literature |journal=Journal of Otology |volume=13 |issue=3 |pages=105–110 |doi=10.1016/j.joto.2018.05.005 |issn=1672-2930 |pmc=6291636 |pmid=30559775 |doi-access=free}}</ref><ref name="Waardenburg19513">{{Cite journal |last=Waardenburg PJ |date=September 1951 |title=A New Syndrome Combining Developmental Anomalies of the Eyelids, Eyebrows and Noseroot with Pigmentary Anomalies of the Iris and Head Hair and with Congenital Deafness; ''Dystopia canthi medialis et punctorum lacrimalium lateroversa, Hyperplasia supercilii medialis et radicis nasi, Heterochromia iridum totalis sive partialis, Albinismus circumscriptus (leucismus, poliosis) et Surditas congenita (surdimutitas)'' |journal=Am. J. Hum. Genet. |volume=3 |issue=3 |pages=195–253 |pmc=1716407 |pmid=14902764}}</ref> Ein subtypes be progressively discovered insyd de following decades wey e get genes dem attributed to dem mostly insyd de 1990s den 2000s.
== Cause ==
=== Classification table ===
{| class="wikitable"
!Type
!OMIM
!Gene
!Locus
!Inheritance
|-
|Type 1 (WS1)
|193500
|''PAX3''
|2q36.1<ref name="pmid75459133">{{Cite journal |vauthors=Tsukamoto K, Nakamura Y, Niikawa N |date=March 1994 |title=Isolation of two isoforms of the PAX3 gene transcripts and their tissue-specific alternative expression in human adult tissues |journal=Hum. Genet. |volume=93 |issue=3 |pages=270–4 |doi=10.1007/bf00212021 |pmid=7545913 |s2cid=36749688}}</ref>
|Autosomal dominant
|-
|Type 2A (WS2A, originally WS2)
|193510
|''MITF''
|3p14.1–p12.3
|Autosomal dominant
|-
|Type 2B (WS2B)
|600193
|''WS2B''
|1p21–p13.3
|Autosomal dominant
|-
|Type 2C (WS2C)
|606662
|''WS2C''
|8p23
|Autosomal dominant
|-
|Type 2D (WS2D)
|608890
|''SNAI2''
|8q11
|Autosomal recessive
|-
|Type 2E (WS2E)
|611584
|''SOX10''
|22q13.1
|Autosomal dominant
|-
|Type 3 (WS3)
|148820
|''PAX3''
|2q36.1
|Autosomal dominant anaa autosomal recessive
|-
|Type 4A (WS4A)
|277580
|''EDNRB''
|13q22
|Autosomal dominant anaa autosomal recessive
|-
|Type 4B (WS4B)
|613265
|''EDN3''
|20q13
|Autosomal dominant anaa autosomal recessive
|-
|Type 4C (WS4C)
|613266
|''SOX10''
|22q13.1
|Autosomal dominant
|}
== References ==
<references />
== External links ==
{{Commons}}
* [https://www.ncbi.nlm.nih.gov/books/NBK1531/ GeneReviews/NCBI/NIH/UW entry on Waardenburg Syndrome Type I]
* [https://medlineplus.gov/genetics/condition/waardenburg-syndrome/ OMIM Genetic disorder catalog] — Waardenburg syndrome<!--For all types.--><!--For the varieties with pigementary effects; this is not a redundant category in this case!-->
* Yose Mirza, [https://www.atlasofhumanity.org/waardenburg Waardenburg in West Sumatra, Indonesia], 2015 - a webpage within the ''[https://www.atlasofhumanity.org/ Atlas of Humanity]'' website, having photos of several Waardenburg syndrome people with various eye pigmentations.
{{Authority control}}
[[Category:Amino acid metabolism disorders]]
[[Category:Transcription factor deficiencies]]
[[Category:Disturbances of human pigmentation]]
[[Category:Syndromes wey dey affect hearing]]
[[Category:Syndromes insyd mammals]]
[[Category:Translated from MDWiki]]
[[Category:Diseases dem name after discoverers]]
7akhis2p0ff3a5254ehoouyul8lktf8
Category:Syndromes wey dey affect hearing
14
28744
107582
2026-07-23T14:32:38Z
DaSupremo
9
Fresh category
107582
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Amino acid metabolism disorders
14
28745
107583
2026-07-23T14:32:49Z
DaSupremo
9
Fresh category
107583
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Drowning
0
28746
107584
2026-07-23T15:00:52Z
DaSupremo
9
Created by translating the page [[:mdwiki:Special:Redirect/revision/1505757|Drowning]] to:gpe #mdwikicx
107584
wikitext
text/x-wiki
[[Category:Translated from MDWiki]]
r0gf7axtnvt68k0p85plnlehx64o08u
107585
107584
2026-07-23T16:15:31Z
DaSupremo
9
Improve article
107585
wikitext
text/x-wiki
{{Databox}}
'''Drowning''' be a type of suffocation induced by de submersion of de mouth den nose insyd a liquid. Submersion injury dey refer to both drowning den near-miss incidents. Most instances of fatal drowning dey occur alone anaa insyd situations wer odas present either be unaware of de victim ein situation anaa unable to offer assistance. After successful resuscitation, drowning victims fi experience breathing problems, confusion, anaa unconsciousness. Occasionally, victims no fi begin dey experience dese symptoms til several hours after dem be rescued. An incident of drowning sanso fi cause further complications give victims secof [[Hypothermia|low body temperature]], aspiration, anaa acute respiratory distress syndrome (respiratory failure from lung inflammation).
== References ==
[[Category:Translated from MDWiki]]
g8ji69070qbmkgy2bczrivs7y8sftdc
107586
107585
2026-07-23T16:18:58Z
DaSupremo
9
Improve article
107586
wikitext
text/x-wiki
{{Databox}}
'''Drowning''' be a type of suffocation induced by de submersion of de mouth den nose insyd a liquid. Submersion injury dey refer to both drowning den near-miss incidents. Most instances of fatal drowning dey occur alone anaa insyd situations wer odas present either be unaware of de victim ein situation anaa unable to offer assistance. After successful resuscitation, drowning victims fi experience breathing problems, confusion, anaa unconsciousness. Occasionally, victims no fi begin dey experience dese symptoms til several hours after dem be rescued. An incident of drowning sanso fi cause further complications give victims secof [[Hypothermia|low body temperature]], aspiration, anaa acute respiratory distress syndrome (respiratory failure from lung inflammation).
Drowning be more likely to happen wen spending extended periods near large bodies of water.<ref name=BMJ2014>{{cite journal |last=Handley |first=AJ |title=Drowning |journal=BMJ (Clinical Research Ed.) |volume=348 |article-number=g1734 |date=16 April 2014 |pmid=24740929 |s2cid=220103200 |doi=10.1136/bmj.g1734}}</ref><ref name="WHO2018Fact2">{{cite web |date=2020 |title=Drowning |url=https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |archive-date=23 June 2020 |access-date=4 October 2020 |website=WHO}}</ref> Risk factors for drowning dey include alcohol use, drug use, [[epilepsy]], minimal swim training anaa a complete lack of training, den, insyd de case of kiddies, a lack of supervision.<ref name="WHO2018Fact2" /> Common drowning locations dey include natural den man-made bodies of water, bathtubs, den swimming pools.<ref name=Mer2017>{{cite web |title=Drowning – Injuries; Poisoning – Merck Manuals Professional Edition |url=https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |website=Merck Manuals Professional Edition |access-date=9 August 2018 |date=September 2017 |archive-date=9 August 2018 |archive-url=https://web.archive.org/web/20180809185729/https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |url-status=live}}</ref><ref name="AFP2016">{{cite journal |last1=Mott |first1=TF |last2=Latimer |first2=KM |title=Prevention and Treatment of Drowning |journal=American Family Physician |volume=93 |issue=7 |pages=576–582 |date=1 April 2016 |pmid=27035042}}</ref>
== References ==
[[Category:Translated from MDWiki]]
0kryhbfmz7fh1x7pkfp2qilt8b2ial9
107587
107586
2026-07-23T16:43:59Z
DaSupremo
9
Improve article
107587
wikitext
text/x-wiki
{{Databox}}
'''Drowning''' be a type of suffocation induced by de submersion of de mouth den nose insyd a liquid. Submersion injury dey refer to both drowning den near-miss incidents. Most instances of fatal drowning dey occur alone anaa insyd situations wer odas present either be unaware of de victim ein situation anaa unable to offer assistance. After successful resuscitation, drowning victims fi experience breathing problems, confusion, anaa unconsciousness. Occasionally, victims no fi begin dey experience dese symptoms til several hours after dem be rescued. An incident of drowning sanso fi cause further complications give victims secof [[Hypothermia|low body temperature]], aspiration, anaa acute respiratory distress syndrome (respiratory failure from lung inflammation).
Drowning be more likely to happen wen spending extended periods near large bodies of water.<ref name=BMJ2014>{{cite journal |last=Handley |first=AJ |title=Drowning |journal=BMJ (Clinical Research Ed.) |volume=348 |article-number=g1734 |date=16 April 2014 |pmid=24740929 |s2cid=220103200 |doi=10.1136/bmj.g1734}}</ref><ref name="WHO2018Fact2">{{cite web |date=2020 |title=Drowning |url=https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |archive-date=23 June 2020 |access-date=4 October 2020 |website=WHO}}</ref> Risk factors for drowning dey include alcohol use, drug use, [[epilepsy]], minimal swim training anaa a complete lack of training, den, insyd de case of kiddies, a lack of supervision.<ref name="WHO2018Fact2" /> Common drowning locations dey include natural den man-made bodies of water, bathtubs, den swimming pools.<ref name=Mer2017>{{cite web |title=Drowning – Injuries; Poisoning – Merck Manuals Professional Edition |url=https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |website=Merck Manuals Professional Edition |access-date=9 August 2018 |date=September 2017 |archive-date=9 August 2018 |archive-url=https://web.archive.org/web/20180809185729/https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |url-status=live}}</ref><ref name="AFP2016">{{cite journal |last1=Mott |first1=TF |last2=Latimer |first2=KM |title=Prevention and Treatment of Drowning |journal=American Family Physician |volume=93 |issue=7 |pages=576–582 |date=1 April 2016 |pmid=27035042}}</ref>
Drowning dey occur wen a person spend too much time plus dema nose den mouth submerge insyd a liquid to de point of dem be unable to breathe. If dis no be followed by an exit to de surface, low oxygen levels den excess carbon dioxide insyd de blood trigger a neurological state of breathing emergency, wich result in increased physical distress den occasional contractions of de vocal folds.<ref name=North02>{{cite journal|last=North|first=Robert|date=December 2002|title=The pathophysiology of drowning|journal=South Pacific Underwater Medicine Society Journal|volume=32|issue=4|url=https://www.researchgate.net/publication/228699347|access-date=4 October 2020|archive-date=14 March 2021|archive-url=https://web.archive.org/web/20210314091512/https://www.researchgate.net/publication/228699347_The_pathophysiology_of_drowning|url-status=live}}</ref> Wen significant amounts of water enter de lungs, e most often be later insyd de process, wen dem irrestistibly force an inhalation.<ref name="BMJ2014" /><ref>{{cite web |last=Dietrich |first=Graham |date=13 May 2025 |title=When Survival Instincts Betray Us: How the Body Drowns Itself |url=https://swim.org.au/when-survival-instincts-betray-us-how-the-body-drowns-itself/ |website=Swim Coaches & Teachers Australia |access-date=19 February 2026}}</ref>
== References ==
[[Category:Translated from MDWiki]]
<references />
== External links ==
9cjeqaea008ekbhzszri54n5k6rn216
107588
107587
2026-07-23T16:47:10Z
DaSupremo
9
Improve article
107588
wikitext
text/x-wiki
{{Databox}}
'''Drowning''' be a type of suffocation induced by de submersion of de mouth den nose insyd a liquid. Submersion injury dey refer to both drowning den near-miss incidents. Most instances of fatal drowning dey occur alone anaa insyd situations wer odas present either be unaware of de victim ein situation anaa unable to offer assistance. After successful resuscitation, drowning victims fi experience breathing problems, confusion, anaa unconsciousness. Occasionally, victims no fi begin dey experience dese symptoms til several hours after dem be rescued. An incident of drowning sanso fi cause further complications give victims secof [[Hypothermia|low body temperature]], aspiration, anaa acute respiratory distress syndrome (respiratory failure from lung inflammation).
Drowning be more likely to happen wen spending extended periods near large bodies of water.<ref name=BMJ2014>{{cite journal |last=Handley |first=AJ |title=Drowning |journal=BMJ (Clinical Research Ed.) |volume=348 |article-number=g1734 |date=16 April 2014 |pmid=24740929 |s2cid=220103200 |doi=10.1136/bmj.g1734}}</ref><ref name="WHO2018Fact2">{{cite web |date=2020 |title=Drowning |url=https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |archive-date=23 June 2020 |access-date=4 October 2020 |website=WHO}}</ref> Risk factors for drowning dey include alcohol use, drug use, [[epilepsy]], minimal swim training anaa a complete lack of training, den, insyd de case of kiddies, a lack of supervision.<ref name="WHO2018Fact2" /> Common drowning locations dey include natural den man-made bodies of water, bathtubs, den swimming pools.<ref name=Mer2017>{{cite web |title=Drowning – Injuries; Poisoning – Merck Manuals Professional Edition |url=https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |website=Merck Manuals Professional Edition |access-date=9 August 2018 |date=September 2017 |archive-date=9 August 2018 |archive-url=https://web.archive.org/web/20180809185729/https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |url-status=live}}</ref><ref name="AFP2016">{{cite journal |last1=Mott |first1=TF |last2=Latimer |first2=KM |title=Prevention and Treatment of Drowning |journal=American Family Physician |volume=93 |issue=7 |pages=576–582 |date=1 April 2016 |pmid=27035042}}</ref>
Drowning dey occur wen a person spend too much time plus dema nose den mouth submerge insyd a liquid to de point of dem be unable to breathe. If dis no be followed by an exit to de surface, low oxygen levels den excess carbon dioxide insyd de blood trigger a neurological state of breathing emergency, wich result in increased physical distress den occasional contractions of de vocal folds.<ref name=North02>{{cite journal|last=North|first=Robert|date=December 2002|title=The pathophysiology of drowning|journal=South Pacific Underwater Medicine Society Journal|volume=32|issue=4|url=https://www.researchgate.net/publication/228699347|access-date=4 October 2020|archive-date=14 March 2021|archive-url=https://web.archive.org/web/20210314091512/https://www.researchgate.net/publication/228699347_The_pathophysiology_of_drowning|url-status=live}}</ref> Wen significant amounts of water enter de lungs, e most often be later insyd de process, wen dem irrestistibly force an inhalation.<ref name="BMJ2014" /><ref>{{cite web |last=Dietrich |first=Graham |date=13 May 2025 |title=When Survival Instincts Betray Us: How the Body Drowns Itself |url=https://swim.org.au/when-survival-instincts-betray-us-how-the-body-drowns-itself/ |website=Swim Coaches & Teachers Australia |access-date=19 February 2026}}</ref>
While de word "drowning" commonly be associated plus fatal results, drowning fi be classified into three different types: drowning wey dey result in death, drowning wey dey result in long-lasting health problems, den drowning wey dey result in no health complications.<ref name="WHO2005">{{cite journal|last1=van Beeck|first1=EF|last2=Branche|first2=CM|last3=Szpilman|first3=D|last4=Modell|first4=JH|last5=Bierens|first5=JJ|date=November 2005|title=A new definition of drowning: towards documentation and prevention of a global public health problem|journal=Bulletin of the World Health Organization|volume=83|issue=11|pages=853–6|pmc=2626470|pmid=16302042}}</ref> Sometimes de term "near-drowning" be used insyd de latter cases. Among kiddies wey survive, health problems occur insyd about 7.5% of cases.<ref name="AFP2016" />
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
nybqdqol49bcgqlstb72w678z44u5v0
107589
107588
2026-07-23T16:57:39Z
DaSupremo
9
Improve article
107589
wikitext
text/x-wiki
{{Databox}}
'''Drowning''' be a type of suffocation induced by de submersion of de mouth den nose insyd a liquid. Submersion injury dey refer to both drowning den near-miss incidents. Most instances of fatal drowning dey occur alone anaa insyd situations wer odas present either be unaware of de victim ein situation anaa unable to offer assistance. After successful resuscitation, drowning victims fi experience breathing problems, confusion, anaa unconsciousness. Occasionally, victims no fi begin dey experience dese symptoms til several hours after dem be rescued. An incident of drowning sanso fi cause further complications give victims secof [[Hypothermia|low body temperature]], aspiration, anaa acute respiratory distress syndrome (respiratory failure from lung inflammation).
Drowning be more likely to happen wen spending extended periods near large bodies of water.<ref name=BMJ2014>{{cite journal |last=Handley |first=AJ |title=Drowning |journal=BMJ (Clinical Research Ed.) |volume=348 |article-number=g1734 |date=16 April 2014 |pmid=24740929 |s2cid=220103200 |doi=10.1136/bmj.g1734}}</ref><ref name="WHO2018Fact2">{{cite web |date=2020 |title=Drowning |url=https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |archive-date=23 June 2020 |access-date=4 October 2020 |website=WHO}}</ref> Risk factors for drowning dey include alcohol use, drug use, [[epilepsy]], minimal swim training anaa a complete lack of training, den, insyd de case of kiddies, a lack of supervision.<ref name="WHO2018Fact2" /> Common drowning locations dey include natural den man-made bodies of water, bathtubs, den swimming pools.<ref name=Mer2017>{{cite web |title=Drowning – Injuries; Poisoning – Merck Manuals Professional Edition |url=https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |website=Merck Manuals Professional Edition |access-date=9 August 2018 |date=September 2017 |archive-date=9 August 2018 |archive-url=https://web.archive.org/web/20180809185729/https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |url-status=live}}</ref><ref name="AFP2016">{{cite journal |last1=Mott |first1=TF |last2=Latimer |first2=KM |title=Prevention and Treatment of Drowning |journal=American Family Physician |volume=93 |issue=7 |pages=576–582 |date=1 April 2016 |pmid=27035042}}</ref>
Drowning dey occur wen a person spend too much time plus dema nose den mouth submerge insyd a liquid to de point of dem be unable to breathe. If dis no be followed by an exit to de surface, low oxygen levels den excess carbon dioxide insyd de blood trigger a neurological state of breathing emergency, wich result in increased physical distress den occasional contractions of de vocal folds.<ref name=North02>{{cite journal|last=North|first=Robert|date=December 2002|title=The pathophysiology of drowning|journal=South Pacific Underwater Medicine Society Journal|volume=32|issue=4|url=https://www.researchgate.net/publication/228699347|access-date=4 October 2020|archive-date=14 March 2021|archive-url=https://web.archive.org/web/20210314091512/https://www.researchgate.net/publication/228699347_The_pathophysiology_of_drowning|url-status=live}}</ref> Wen significant amounts of water enter de lungs, e most often be later insyd de process, wen dem irrestistibly force an inhalation.<ref name="BMJ2014" /><ref>{{cite web |last=Dietrich |first=Graham |date=13 May 2025 |title=When Survival Instincts Betray Us: How the Body Drowns Itself |url=https://swim.org.au/when-survival-instincts-betray-us-how-the-body-drowns-itself/ |website=Swim Coaches & Teachers Australia |access-date=19 February 2026}}</ref>
While de word "drowning" commonly be associated plus fatal results, drowning fi be classified into three different types: drowning wey dey result in death, drowning wey dey result in long-lasting health problems, den drowning wey dey result in no health complications.<ref name="WHO2005">{{cite journal|last1=van Beeck|first1=EF|last2=Branche|first2=CM|last3=Szpilman|first3=D|last4=Modell|first4=JH|last5=Bierens|first5=JJ|date=November 2005|title=A new definition of drowning: towards documentation and prevention of a global public health problem|journal=Bulletin of the World Health Organization|volume=83|issue=11|pages=853–6|pmc=2626470|pmid=16302042}}</ref> Sometimes de term "near-drowning" be used insyd de latter cases. Among kiddies wey survive, health problems occur insyd about 7.5% of cases.<ref name="AFP2016" />
Steps to prevent drowning dey include teaching kiddies den adults to swim den to recognise unsafe water conditions, never swimming alone, use of personal flotation devices on boats den wen swimming insyd unfavourable conditions, limiting anaa removing access to water (such as plus fencing of swimming pools), den exercising appropriate supervision.<ref name="WHO2018Fact">{{cite web |title=Drowning |date=2020 |url=https://www.who.int/news-room/fact-sheets/detail/drowning |website=WHO |access-date=4 October 2020 |archive-date=23 June 2020 |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live}}</ref><ref name="WHO2015Pre">{{cite book |title=Preventing drowning: an implementation guide |date=2015 |publisher=WHO |isbn=978-92-4-151193-3 |page=2 |url=https://apps.who.int/iris/bitstream/handle/10665/255196/9789241511933-eng.pdf |access-date=9 August 2018 |archive-date=11 October 2020 |archive-url=https://web.archive.org/web/20201011225251/https://apps.who.int/iris/bitstream/handle/10665/255196/9789241511933-eng.pdf |url-status=live}}</ref> Treatment of victims wey no dey breath for begin plus opening de airway den dey provide five breaths of mouth-to-mouth resuscitation.<ref name="AFP2016" /> Cardiopulmonary resuscitation (CPR) be recommended for a person wey ein [[cardiac arrest|heart stop dey beat]] wey e be underwater for less dan an hour.<ref name="AFP2016" />
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
03fiozqt8drvvivmzvpk3gkmk7p8ohv
107590
107589
2026-07-23T17:01:23Z
DaSupremo
9
Improve article
107590
wikitext
text/x-wiki
{{Databox}}
'''Drowning''' be a type of suffocation induced by de submersion of de mouth den nose insyd a liquid. Submersion injury dey refer to both drowning den near-miss incidents. Most instances of fatal drowning dey occur alone anaa insyd situations wer odas present either be unaware of de victim ein situation anaa unable to offer assistance. After successful resuscitation, drowning victims fi experience breathing problems, confusion, anaa unconsciousness. Occasionally, victims no fi begin dey experience dese symptoms til several hours after dem be rescued. An incident of drowning sanso fi cause further complications give victims secof [[Hypothermia|low body temperature]], aspiration, anaa acute respiratory distress syndrome (respiratory failure from lung inflammation).
Drowning be more likely to happen wen spending extended periods near large bodies of water.<ref name=BMJ2014>{{cite journal |last=Handley |first=AJ |title=Drowning |journal=BMJ (Clinical Research Ed.) |volume=348 |article-number=g1734 |date=16 April 2014 |pmid=24740929 |s2cid=220103200 |doi=10.1136/bmj.g1734}}</ref><ref name="WHO2018Fact2">{{cite web |date=2020 |title=Drowning |url=https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |archive-date=23 June 2020 |access-date=4 October 2020 |website=WHO}}</ref> Risk factors for drowning dey include alcohol use, drug use, [[epilepsy]], minimal swim training anaa a complete lack of training, den, insyd de case of kiddies, a lack of supervision.<ref name="WHO2018Fact2" /> Common drowning locations dey include natural den man-made bodies of water, bathtubs, den swimming pools.<ref name=Mer2017>{{cite web |title=Drowning – Injuries; Poisoning – Merck Manuals Professional Edition |url=https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |website=Merck Manuals Professional Edition |access-date=9 August 2018 |date=September 2017 |archive-date=9 August 2018 |archive-url=https://web.archive.org/web/20180809185729/https://www.merckmanuals.com/professional/injuries-poisoning/drowning/drowning |url-status=live}}</ref><ref name="AFP2016">{{cite journal |last1=Mott |first1=TF |last2=Latimer |first2=KM |title=Prevention and Treatment of Drowning |journal=American Family Physician |volume=93 |issue=7 |pages=576–582 |date=1 April 2016 |pmid=27035042}}</ref>
Drowning dey occur wen a person spend too much time plus dema nose den mouth submerge insyd a liquid to de point of dem be unable to breathe. If dis no be followed by an exit to de surface, low oxygen levels den excess carbon dioxide insyd de blood trigger a neurological state of breathing emergency, wich result in increased physical distress den occasional contractions of de vocal folds.<ref name=North02>{{cite journal|last=North|first=Robert|date=December 2002|title=The pathophysiology of drowning|journal=South Pacific Underwater Medicine Society Journal|volume=32|issue=4|url=https://www.researchgate.net/publication/228699347|access-date=4 October 2020|archive-date=14 March 2021|archive-url=https://web.archive.org/web/20210314091512/https://www.researchgate.net/publication/228699347_The_pathophysiology_of_drowning|url-status=live}}</ref> Wen significant amounts of water enter de lungs, e most often be later insyd de process, wen dem irrestistibly force an inhalation.<ref name="BMJ2014" /><ref>{{cite web |last=Dietrich |first=Graham |date=13 May 2025 |title=When Survival Instincts Betray Us: How the Body Drowns Itself |url=https://swim.org.au/when-survival-instincts-betray-us-how-the-body-drowns-itself/ |website=Swim Coaches & Teachers Australia |access-date=19 February 2026}}</ref>
While de word "drowning" commonly be associated plus fatal results, drowning fi be classified into three different types: drowning wey dey result in death, drowning wey dey result in long-lasting health problems, den drowning wey dey result in no health complications.<ref name="WHO2005">{{cite journal|last1=van Beeck|first1=EF|last2=Branche|first2=CM|last3=Szpilman|first3=D|last4=Modell|first4=JH|last5=Bierens|first5=JJ|date=November 2005|title=A new definition of drowning: towards documentation and prevention of a global public health problem|journal=Bulletin of the World Health Organization|volume=83|issue=11|pages=853–6|pmc=2626470|pmid=16302042}}</ref> Sometimes de term "near-drowning" be used insyd de latter cases. Among kiddies wey survive, health problems occur insyd about 7.5% of cases.<ref name="AFP2016" />
Steps to prevent drowning dey include teaching kiddies den adults to swim den to recognise unsafe water conditions, never swimming alone, use of personal flotation devices on boats den wen swimming insyd unfavourable conditions, limiting anaa removing access to water (such as plus fencing of swimming pools), den exercising appropriate supervision.<ref name="WHO2018Fact">{{cite web |title=Drowning |date=2020 |url=https://www.who.int/news-room/fact-sheets/detail/drowning |website=WHO |access-date=4 October 2020 |archive-date=23 June 2020 |archive-url=https://web.archive.org/web/20200623012321/https://www.who.int/news-room/fact-sheets/detail/drowning |url-status=live}}</ref><ref name="WHO2015Pre">{{cite book |title=Preventing drowning: an implementation guide |date=2015 |publisher=WHO |isbn=978-92-4-151193-3 |page=2 |url=https://apps.who.int/iris/bitstream/handle/10665/255196/9789241511933-eng.pdf |access-date=9 August 2018 |archive-date=11 October 2020 |archive-url=https://web.archive.org/web/20201011225251/https://apps.who.int/iris/bitstream/handle/10665/255196/9789241511933-eng.pdf |url-status=live}}</ref> Treatment of victims wey no dey breath for begin plus opening de airway den dey provide five breaths of mouth-to-mouth resuscitation.<ref name="AFP2016" /> Cardiopulmonary resuscitation (CPR) be recommended for a person wey ein [[cardiac arrest|heart stop dey beat]] wey e be underwater for less dan an hour.<ref name="AFP2016" />
== References ==
<references />
== External links ==
{{Commons}}
* Canadian Red Cross: Drowning Research: Drownings in Canada, 10 Years of Research **[https://web.archive.org/web/20160303172429/http://www.redcross.ca/cmslib/general/ws_final_m2_english2006_04_19.pdf Module 2 – Ice & Cold Water Immersion]
* [https://www.psychvarsity.com/Psychological-Effects-Of-Almost-Drowning The Psychological Effects of Almost Drowning]
*{{cite book |url=https://www.who.int/teams/social-determinants-of-health/safety-and-mobility/global-report-on-drowning-prevention |title=Global Status Report on Drowning Prevention 2024 |isbn=978-92-4-010396-2 |publisher=[[World Health Organization]] |location=Geneva |date=13 December 2024 }}
{{Authority control}}
[[Category:Drowning| ]]
[[Category:Asphyxia]]
[[Category:Swimming]]
[[Category:Medical emergencies]]
[[Category:Underwater diving disorders]]
[[Category:Causes of death]]
[[Category:Suicide by suffocation]]
[[Category:Wilderness medical emergencies]]
[[Category:Translated from MDWiki]]
ln1exg7zjgx9qmbm0aahd97cp6igwwd
Category:Drowning
14
28747
107591
2026-07-23T17:01:59Z
DaSupremo
9
Fresh category
107591
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Asphyxia
14
28748
107592
2026-07-23T17:02:30Z
DaSupremo
9
Fresh category
107592
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Swimming
14
28749
107593
2026-07-23T17:03:37Z
DaSupremo
9
Fresh category
107593
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Suicide by suffocation
14
28750
107594
2026-07-23T17:03:58Z
DaSupremo
9
Fresh category
107594
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Glucagon-like peptide-1 receptor agonist
0
28751
107595
2026-07-23T17:54:57Z
DaSupremo
9
Created by translating the page [[:mdwiki:Special:Redirect/revision/1502212|Glucagon-like peptide-1 receptor agonist]] to:gpe #mdwikicx
107595
wikitext
text/x-wiki
[[Category:Translated from MDWiki]]
r0gf7axtnvt68k0p85plnlehx64o08u
107596
107595
2026-07-23T18:04:17Z
DaSupremo
9
Improve article
107596
wikitext
text/x-wiki
{{Databox}}
'''Glucagon-like peptide-1''' ('''GLP-1''') '''receptor agonists''', dem sanso know as '''GLP-1 agonists''', '''GLP-1RAs''', den informally as simply '''GLP-1s''', be a class of medications wey activate de GLP-1 receptor, wey dey cause reduced blood sugar, reduced appetite, den reduced energy intake. '''GLP-1 analogs''' be molecules wey be structurally almost identical to de endogenous GLP-1 hormone. Incretin mimetics be substances wey mimic de actions of incretin hormones such as GLP-1 den GIP.
== References ==
[[Category:Translated from MDWiki]]
nv1493ih2rgbxmgvnp5s0u4hqditdft
107597
107596
2026-07-23T18:09:29Z
DaSupremo
9
Improve article
107597
wikitext
text/x-wiki
{{Databox}}
'''Glucagon-like peptide-1''' ('''GLP-1''') '''receptor agonists''', dem sanso know as '''GLP-1 agonists''', '''GLP-1RAs''', den informally as simply '''GLP-1s''', be a class of medications wey activate de GLP-1 receptor, wey dey cause reduced blood sugar, reduced appetite, den reduced energy intake. '''GLP-1 analogs''' be molecules wey be structurally almost identical to de endogenous GLP-1 hormone. Incretin mimetics be substances wey mimic de actions of incretin hormones such as GLP-1 den GIP.
Originally dem develop to treat [[type 2 diabetes]], sam GLP-1 agonists be approved to treat [[obesity]]. Dem dey mimic de actions of de endogenous incretin hormone GLP-1, wich be released insyd de small intestine den fi inhibit glucagon release den increase insulin secretion.<ref>{{Cite journal |last1=Ross |first1=Stuart A. |last2=Ekoé |first2=Jean-Marie |date=July 2010 |title=Incretin agents in type 2 diabetes |journal=Canadian Family Physician |volume=56 |issue=7 |pages=639–648 |pmc=2922799 |pmid=20631270}}</ref>
== References ==
[[Category:Translated from MDWiki]]
<references />
== External links ==
n5y0owtgrioyd1nngv68yjnr8n8vyf3
107598
107597
2026-07-23T18:11:14Z
DaSupremo
9
Improve article
107598
wikitext
text/x-wiki
{{Databox}}
'''Glucagon-like peptide-1''' ('''GLP-1''') '''receptor agonists''', dem sanso know as '''GLP-1 agonists''', '''GLP-1RAs''', den informally as simply '''GLP-1s''', be a class of medications wey activate de GLP-1 receptor, wey dey cause reduced blood sugar, reduced appetite, den reduced energy intake. '''GLP-1 analogs''' be molecules wey be structurally almost identical to de endogenous GLP-1 hormone. Incretin mimetics be substances wey mimic de actions of incretin hormones such as GLP-1 den GIP.
Originally dem develop to treat [[type 2 diabetes]], sam GLP-1 agonists be approved to treat [[obesity]]. Dem dey mimic de actions of de endogenous incretin hormone GLP-1, wich be released insyd de small intestine den fi inhibit glucagon release den increase insulin secretion.<ref>{{Cite journal |last1=Ross |first1=Stuart A. |last2=Ekoé |first2=Jean-Marie |date=July 2010 |title=Incretin agents in type 2 diabetes |journal=Canadian Family Physician |volume=56 |issue=7 |pages=639–648 |pmc=2922799 |pmid=20631270}}</ref>
GLP-1 receptor agonists be used to treat type 2 diabetes den obesity, wey dem be under study for treatment of metabolic dysfunction–associated steatotic liver disease, polyendocrine metabolic ovarian syndrome, den diseases of de reward system, such as addictions (especially from ultra-processed foods).<ref>{{Cite web |title=David Kessler on What Doctors and Patients Should Know About GLP-1 Drugs {{!}} Harvard Medicine Magazine |url=https://magazine.hms.harvard.edu/articles/david-kessler-what-doctors-and-patients-should-know-about-glp-1-drugs |access-date=8 March 2026 |website=magazine.hms.harvard.edu |language=en}}</ref>
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
atsrlhqhpsmrapnz1z23y4awbig2l5c
107601
107598
2026-07-23T18:45:32Z
DaSupremo
9
Improve article
107601
wikitext
text/x-wiki
{{Databox}}
'''Glucagon-like peptide-1''' ('''GLP-1''') '''receptor agonists''', dem sanso know as '''GLP-1 agonists''', '''GLP-1RAs''', den informally as simply '''GLP-1s''', be a class of medications wey activate de GLP-1 receptor, wey dey cause reduced blood sugar, reduced appetite, den reduced energy intake. '''GLP-1 analogs''' be molecules wey be structurally almost identical to de endogenous GLP-1 hormone. Incretin mimetics be substances wey mimic de actions of incretin hormones such as GLP-1 den GIP.
Originally dem develop to treat [[type 2 diabetes]], sam GLP-1 agonists be approved to treat [[obesity]]. Dem dey mimic de actions of de endogenous incretin hormone GLP-1, wich be released insyd de small intestine den fi inhibit glucagon release den increase insulin secretion.<ref>{{Cite journal |last1=Ross |first1=Stuart A. |last2=Ekoé |first2=Jean-Marie |date=July 2010 |title=Incretin agents in type 2 diabetes |journal=Canadian Family Physician |volume=56 |issue=7 |pages=639–648 |pmc=2922799 |pmid=20631270}}</ref>
GLP-1 receptor agonists be used to treat type 2 diabetes den obesity, wey dem be under study for treatment of metabolic dysfunction–associated steatotic liver disease, polyendocrine metabolic ovarian syndrome, den diseases of de reward system, such as addictions (especially from ultra-processed foods).<ref>{{Cite web |title=David Kessler on What Doctors and Patients Should Know About GLP-1 Drugs {{!}} Harvard Medicine Magazine |url=https://magazine.hms.harvard.edu/articles/david-kessler-what-doctors-and-patients-should-know-about-glp-1-drugs |access-date=8 March 2026 |website=magazine.hms.harvard.edu |language=en}}</ref>
== References ==
<references />
== External links ==
{{Commons}}
* {{cite journal |last1=Gonzalez-Rellan |first1=Maria J. |last2=Drucker |first2=Daniel J. |title=The expanding benefits of GLP-1 medicines |journal=Cell Reports Medicine |date=July 2025 |volume=6 |issue=7 |article-number=102214 |doi=10.1016/j.xcrm.2025.102214 |pmid=40669447 |pmc=12281309 }}
[[Category:GLP-1 receptor agonists| ]]
[[Category:Anorectics]]
[[Category:Anti-diabetic drugs]]
[[Category:Type 2 diabetes]]
[[Category:Translated from MDWiki]]
nrm6ev8jda6qqzwhutizt2pie3vincz
Category:Type 2 diabetes
14
28752
107602
2026-07-23T18:46:12Z
DaSupremo
9
Fresh category
107602
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Gtaphic novels
14
28753
107606
2026-07-23T20:05:37Z
~2026-41365-45
7047
Created page with "[[Category:Novels]]"
107606
wikitext
text/x-wiki
[[Category:Novels]]
1bj32gt8vdv4pbpmq792j6m6yvxwo9m
Category:Graphic novels
14
28754
107608
2026-07-23T20:06:04Z
~2026-41365-45
7047
Created page with "[[Category:Novels]]"
107608
wikitext
text/x-wiki
[[Category:Novels]]
1bj32gt8vdv4pbpmq792j6m6yvxwo9m
Category:Novels
14
28755
107609
2026-07-23T20:07:01Z
~2026-41365-45
7047
Created page with "[[Category:Literature]]"
107609
wikitext
text/x-wiki
[[Category:Literature]]
ikgurezx3s4kpe2ureg3ecqxgbrg8ub
Category:Literature
14
28756
107612
2026-07-23T20:08:11Z
~2026-41365-45
7047
Created blank page
107612
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Manga
14
28757
107628
2026-07-23T20:12:43Z
~2026-41365-45
7047
Created page with "[[Category:Japan]] [[Category:Literature]]"
107628
wikitext
text/x-wiki
[[Category:Japan]]
[[Category:Literature]]
kxiwh9bh52e6i4wjwjd1yu8r3qm1trb
Category:Japan
14
28758
107629
2026-07-23T20:12:54Z
~2026-41365-45
7047
Created blank page
107629
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Japanese sportswomen
14
28759
107633
2026-07-23T20:14:28Z
~2026-41365-45
7047
Created page with "[[Category:Japan]] [[Category:Sportswomen]]"
107633
wikitext
text/x-wiki
[[Category:Japan]]
[[Category:Sportswomen]]
lsqcwkymnha5op95u9f99y0dujubope
Category:Asian Games
14
28760
107636
2026-07-23T20:15:58Z
~2026-41365-45
7047
Created blank page
107636
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Japanese footballers
14
28761
107641
2026-07-23T20:18:20Z
~2026-41365-45
7047
Created page with "[[Category:Japanese sportswomen]] [[Category:Japanese sportsmen]] [[Category:Footballers]]"
107641
wikitext
text/x-wiki
[[Category:Japanese sportswomen]]
[[Category:Japanese sportsmen]]
[[Category:Footballers]]
grz0bity5yl6ubx4fta2i9v6zcrbodj
Category:Medalists
14
28762
107648
2026-07-23T20:21:24Z
~2026-41365-45
7047
Created blank page
107648
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Silver medalists
14
28763
107650
2026-07-23T20:22:09Z
~2026-41365-45
7047
Created page with "[[Category:Silver]] [[Category:Medalists]]"
107650
wikitext
text/x-wiki
[[Category:Silver]]
[[Category:Medalists]]
nin2l3j1jmfrjwlphktl3swjhjs2iqo
Category:Gold medalists
14
28764
107652
2026-07-23T20:22:44Z
~2026-41365-45
7047
Created page with "[[Category:Gold]] [[Category:Medalists]]"
107652
wikitext
text/x-wiki
[[Category:Gold]]
[[Category:Medalists]]
plu6qrg55bvtafgrwga35e3epyxqvsv
Category:Summer Olympic Games
14
28765
107660
2026-07-23T20:26:39Z
~2026-41365-45
7047
Created blank page
107660
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Olympic medalists
14
28766
107662
2026-07-23T20:27:35Z
~2026-41365-45
7047
Created page with "[[Category:Summer Olympic Games]] [[Category:Medalists]]"
107662
wikitext
text/x-wiki
[[Category:Summer Olympic Games]]
[[Category:Medalists]]
aq02q6tly5nzy44bwlwl98kmpqfuvhh
Category:Olympic footballers
14
28767
107664
2026-07-23T20:28:41Z
~2026-41365-45
7047
Created page with "[[Category:Footballers]] [[Category:Summer Olympic Games]]"
107664
wikitext
text/x-wiki
[[Category:Footballers]]
[[Category:Summer Olympic Games]]
4bhhvqv7npf5gs94u4gyqeikm5cg3fp
Category:FIFA Women's World Cup players
14
28768
107667
2026-07-23T20:30:07Z
~2026-41365-45
7047
Created page with "[[Category:Female footballers]] [[Category:FIFA Women's World Cup]]"
107667
wikitext
text/x-wiki
[[Category:Female footballers]]
[[Category:FIFA Women's World Cup]]
rz91yc9uh0oeuzi0dlez3ztlpqi7ve3
Category:Female footballers
14
28769
107668
2026-07-23T20:30:23Z
~2026-41365-45
7047
Created page with "[[Category:Footballers]] [[Category:Women]]"
107668
wikitext
text/x-wiki
[[Category:Footballers]]
[[Category:Women]]
fsvwxmf935xwpabcgbz9iv6idxylhqc
Category:FIFA Women's World Cup
14
28770
107669
2026-07-23T20:30:46Z
~2026-41365-45
7047
Created blank page
107669
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Women
14
28771
107677
2026-07-23T20:34:00Z
~2026-41365-45
7047
Created blank page
107677
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Revolutionaries
14
28772
107684
2026-07-23T20:36:59Z
~2026-41365-45
7047
Created page with "[[Category:Revolutions]]"
107684
wikitext
text/x-wiki
[[Category:Revolutions]]
8x1jdvgb3xgw6katuw34mv4hwu4jxuu
Category:Revolutions
14
28773
107685
2026-07-23T20:37:12Z
~2026-41365-45
7047
Created blank page
107685
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Organisational founders
14
28774
107688
2026-07-23T20:38:43Z
~2026-41365-45
7047
Created blank page
107688
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Documentary filmmakers
14
28775
107691
2026-07-23T20:40:17Z
~2026-41365-45
7047
Created blank page
107691
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Architects
14
28776
107693
2026-07-23T20:40:49Z
~2026-41365-45
7047
Created blank page
107693
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Graffiti
14
28777
107697
2026-07-23T20:41:53Z
~2026-41365-45
7047
Created blank page
107697
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Printmakers
14
28778
107702
2026-07-23T20:44:10Z
~2026-41365-45
7047
Created blank page
107702
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Children's book illustrators
14
28779
107706
2026-07-23T20:46:05Z
~2026-41365-45
7047
Created page with "[[Category:Illustrators]]"
107706
wikitext
text/x-wiki
[[Category:Illustrators]]
6aaw2znxvvs4vrje9mpfcv67bpl3svr
Category:Illustrators
14
28780
107707
2026-07-23T20:46:15Z
~2026-41365-45
7047
Created blank page
107707
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Mauritians
14
28781
107708
2026-07-23T20:46:31Z
~2026-41365-45
7047
Created blank page
107708
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Ivorians
14
28782
107710
2026-07-23T20:47:01Z
~2026-41365-45
7047
Created blank page
107710
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Category:Art dealers
14
28784
107716
2026-07-23T20:48:50Z
~2026-41365-45
7047
Created blank page
107716
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Baclofen
0
28785
107722
2026-07-24T10:01:34Z
DaSupremo
9
Created by translating the page [[:mdwiki:Special:Redirect/revision/1500592|Baclofen]] to:gpe #mdwikicx
107722
wikitext
text/x-wiki
[[Category:Translated from MDWiki]]
r0gf7axtnvt68k0p85plnlehx64o08u
107723
107722
2026-07-24T10:07:51Z
DaSupremo
9
Improve article
107723
wikitext
text/x-wiki
{{Databox}}
'''Baclofen''', dem sell under de brand name '''Lioresal''' among odas, be a central nervous system (CNS) depressant den derivative of de inhibitory neurotransmitter, ''gamma''-Aminobutyric acid (GABA). Baclofen be a potent GABA<sub>B</sub> receptor agonist, gabapentinoid, den skeletal muscle relaxant dem use to treat chronic muscle spasms den muscle spasticity, such as from a spinal cord injury anaa [[multiple sclerosis]].<ref name="AHFS2019">{{cite web |title=Baclofen Monograph for Professionals |url=https://www.drugs.com/monograph/baclofen.html |access-date=3 March 2019 |website=Drugs.com |publisher=American Society of Health-System Pharmacists |archive-date=26 April 2019 |archive-url=https://web.archive.org/web/20190426153502/https://www.drugs.com/monograph/baclofen.html |url-status=live }}</ref><ref name="BNF76">{{cite book | date = 2018 | title = British national formulary: BNF 76 | publisher = Pharmaceutical Press | edition = 76 | page = 1092 | isbn = 978-0-85711-338-2 }}</ref> E sanso fi be used for hiccups den muscle spasms near de end of life,<ref name="BNF76" /> den off-label to treat alcohol use disorder<ref name="Agabio_2023">{{cite journal | vauthors = Agabio R, Saulle R, Rösner S, Minozzi S | title = Baclofen for alcohol use disorder | journal = The Cochrane Database of Systematic Reviews | volume = 1 | issue = 1 | article-number = CD012557 | date = January 2023 | pmid = 36637087 | pmc = 9837849 | doi = 10.1002/14651858.cd012557.pub3 }}</ref> anaa opioid withdrawal symptoms.<ref name="baclofenmaintenance">{{cite journal | vauthors = Assadi SM, Radgoodarzi R, Ahmadi-Abhari SA | title = Baclofen for maintenance treatment of opioid dependence: a randomized double-blind placebo-controlled clinical trial [ISRCTN32121581] | journal = BMC Psychiatry | volume = 3 | article-number = 16 | date = November 2003 | pmid = 14624703 | pmc = 293465 | doi = 10.1186/1471-244X-3-16 | doi-access = free | title-link = doi }}</ref> Dem dey take am orally anaa by intrathecal pump (dem deliver into de spinal canal via an implantable pump device).<ref name="AHFS2019" />
== References ==
[[Category:Translated from MDWiki]]
<references />
== External links ==
he5uan698bxtaoes8rp8lwy4tyjqk9e
107724
107723
2026-07-24T10:10:15Z
DaSupremo
9
Improve article
107724
wikitext
text/x-wiki
{{Databox}}
'''Baclofen''', dem sell under de brand name '''Lioresal''' among odas, be a central nervous system (CNS) depressant den derivative of de inhibitory neurotransmitter, ''gamma''-Aminobutyric acid (GABA). Baclofen be a potent GABA<sub>B</sub> receptor agonist, gabapentinoid, den skeletal muscle relaxant dem use to treat chronic muscle spasms den muscle spasticity, such as from a spinal cord injury anaa [[multiple sclerosis]].<ref name="AHFS2019">{{cite web |title=Baclofen Monograph for Professionals |url=https://www.drugs.com/monograph/baclofen.html |access-date=3 March 2019 |website=Drugs.com |publisher=American Society of Health-System Pharmacists |archive-date=26 April 2019 |archive-url=https://web.archive.org/web/20190426153502/https://www.drugs.com/monograph/baclofen.html |url-status=live }}</ref><ref name="BNF76">{{cite book | date = 2018 | title = British national formulary: BNF 76 | publisher = Pharmaceutical Press | edition = 76 | page = 1092 | isbn = 978-0-85711-338-2 }}</ref> E sanso fi be used for hiccups den muscle spasms near de end of life,<ref name="BNF76" /> den off-label to treat alcohol use disorder<ref name="Agabio_2023">{{cite journal | vauthors = Agabio R, Saulle R, Rösner S, Minozzi S | title = Baclofen for alcohol use disorder | journal = The Cochrane Database of Systematic Reviews | volume = 1 | issue = 1 | article-number = CD012557 | date = January 2023 | pmid = 36637087 | pmc = 9837849 | doi = 10.1002/14651858.cd012557.pub3 }}</ref> anaa opioid withdrawal symptoms.<ref name="baclofenmaintenance">{{cite journal | vauthors = Assadi SM, Radgoodarzi R, Ahmadi-Abhari SA | title = Baclofen for maintenance treatment of opioid dependence: a randomized double-blind placebo-controlled clinical trial [ISRCTN32121581] | journal = BMC Psychiatry | volume = 3 | article-number = 16 | date = November 2003 | pmid = 14624703 | pmc = 293465 | doi = 10.1186/1471-244X-3-16 | doi-access = free | title-link = doi }}</ref> Dem dey take am orally anaa by intrathecal pump (dem deliver into de spinal canal via an implantable pump device).<ref name="AHFS2019" />
Baclofen for be avoided insyd de setting of chronic kidney disease den end stage renal disease as even small doses fi cause excessive toxicity.<ref>{{cite journal | vauthors = El-Husseini A, Sabucedo A, Lamarche J, Courville C, Peguero A | title = Baclofen toxicity in patients with advanced nephropathy: proposal for new labeling | journal = American Journal of Nephrology | volume = 34 | issue = 6 | pages = 491–495 | date = 26 October 2011 | pmid = 22041434 | doi = 10.1159/000333247 }}</ref> Common side effects dey include sleepiness, weakness, den dizziness.<ref name=AHFS2019/> Serious side effects, such as seizures den [[rhabdomyolysis]], fi occur if use of baclofen be stopped abruptly.<ref name="AHFS2019" /> Use during [[pregnancy]] be of unclear safety, whilst use during [[breastfeeding]] likely be safe, den even more so if oral administration be avoided.<ref name="Preg2019">{{Cite web |title=Baclofen use while Breastfeeding |url=https://www.drugs.com/breastfeeding/baclofen.html |access-date=28 December 2024 |website=Drugs.com |archive-date=19 June 2024 |archive-url=https://web.archive.org/web/20240619074002/https://www.drugs.com/breastfeeding/baclofen.html |url-status=live }}</ref>
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
3x35y7v77ddumwh15cpvdhb3gyoacz3
107725
107724
2026-07-24T10:13:23Z
DaSupremo
9
Improve article
107725
wikitext
text/x-wiki
{{Databox}}
'''Baclofen''', dem sell under de brand name '''Lioresal''' among odas, be a central nervous system (CNS) depressant den derivative of de inhibitory neurotransmitter, ''gamma''-Aminobutyric acid (GABA). Baclofen be a potent GABA<sub>B</sub> receptor agonist, gabapentinoid, den skeletal muscle relaxant dem use to treat chronic muscle spasms den muscle spasticity, such as from a spinal cord injury anaa [[multiple sclerosis]].<ref name="AHFS2019">{{cite web |title=Baclofen Monograph for Professionals |url=https://www.drugs.com/monograph/baclofen.html |access-date=3 March 2019 |website=Drugs.com |publisher=American Society of Health-System Pharmacists |archive-date=26 April 2019 |archive-url=https://web.archive.org/web/20190426153502/https://www.drugs.com/monograph/baclofen.html |url-status=live }}</ref><ref name="BNF76">{{cite book | date = 2018 | title = British national formulary: BNF 76 | publisher = Pharmaceutical Press | edition = 76 | page = 1092 | isbn = 978-0-85711-338-2 }}</ref> E sanso fi be used for hiccups den muscle spasms near de end of life,<ref name="BNF76" /> den off-label to treat alcohol use disorder<ref name="Agabio_2023">{{cite journal | vauthors = Agabio R, Saulle R, Rösner S, Minozzi S | title = Baclofen for alcohol use disorder | journal = The Cochrane Database of Systematic Reviews | volume = 1 | issue = 1 | article-number = CD012557 | date = January 2023 | pmid = 36637087 | pmc = 9837849 | doi = 10.1002/14651858.cd012557.pub3 }}</ref> anaa opioid withdrawal symptoms.<ref name="baclofenmaintenance">{{cite journal | vauthors = Assadi SM, Radgoodarzi R, Ahmadi-Abhari SA | title = Baclofen for maintenance treatment of opioid dependence: a randomized double-blind placebo-controlled clinical trial [ISRCTN32121581] | journal = BMC Psychiatry | volume = 3 | article-number = 16 | date = November 2003 | pmid = 14624703 | pmc = 293465 | doi = 10.1186/1471-244X-3-16 | doi-access = free | title-link = doi }}</ref> Dem dey take am orally anaa by intrathecal pump (dem deliver into de spinal canal via an implantable pump device).<ref name="AHFS2019" />
Baclofen for be avoided insyd de setting of chronic kidney disease den end stage renal disease as even small doses fi cause excessive toxicity.<ref>{{cite journal | vauthors = El-Husseini A, Sabucedo A, Lamarche J, Courville C, Peguero A | title = Baclofen toxicity in patients with advanced nephropathy: proposal for new labeling | journal = American Journal of Nephrology | volume = 34 | issue = 6 | pages = 491–495 | date = 26 October 2011 | pmid = 22041434 | doi = 10.1159/000333247 }}</ref> Common side effects dey include sleepiness, weakness, den dizziness.<ref name=AHFS2019/> Serious side effects, such as seizures den [[rhabdomyolysis]], fi occur if use of baclofen be stopped abruptly.<ref name="AHFS2019" /> Use during [[pregnancy]] be of unclear safety, whilst use during [[breastfeeding]] likely be safe, den even more so if oral administration be avoided.<ref name="Preg2019">{{Cite web |title=Baclofen use while Breastfeeding |url=https://www.drugs.com/breastfeeding/baclofen.html |access-date=28 December 2024 |website=Drugs.com |archive-date=19 June 2024 |archive-url=https://web.archive.org/web/20240619074002/https://www.drugs.com/breastfeeding/baclofen.html |url-status=live }}</ref>
De adverse effects den safety profile dem associate plus baclofen wen e be combined plus sedative drugs (for example alcohol, barbiturates, den benzodiazepines) range wey dey depend on de dose den de individual. De interaction fi increase de sedative effects of all ingested sedatives den as such no be generally recommended.<ref>{{cite web | author = NHS website | date = 3 March 2022 | title = Common questions about baclofen | website = nhs.uk | url = https://www.nhs.uk/medicines/baclofen/common-questions-about-baclofen/ | access-date = 24 March 2024 | archive-date = 24 March 2024 | archive-url = https://web.archive.org/web/20240324003119/https://www.nhs.uk/medicines/baclofen/common-questions-about-baclofen/ | url-status = live }}</ref> Insyd high doses de interaction plus alcohol fi cause ''de novo'' seizures.<ref>{{cite web | vauthors = Rolland B, Deheul S, Danel T, Bordet R, Cottencin O | date = 2012-10-12 | title = Seizures Following High-Dose Baclofen With Alcohol | website = Medscape | publisher = Alcohol and Alcoholism | url = http://www.medscape.com/viewarticle/769329 | access-date = 24 March 2024 | archive-date = 28 June 2022 | archive-url = https://web.archive.org/web/20220628004830/https://www.medscape.com/viewarticle/769329 | url-status = live }}</ref>
== References ==
<references />
== External links ==
[[Category:Translated from MDWiki]]
m4u5a1n83z0ib4mp92t703j4yfmn4xz