模組:SportsRankings/data/WBSC World Rankings
外观
![]() | 无效评级或未指定评级 |
用法
[编辑]本模板用於快速更新WBSC旗下所有男子國家棒球代表隊的世界排名,並於各代表隊條目的資訊框中呈現。輸入國家代碼後,模板將顯示該國的WBSC世界排名,以及排名變動情況(如上升、下降或維持不變),若有變動也會註明變動名次。同時顯示該次排名的發布日期,並引用WBSC官方網站的排名資料作為參考。
如有需要,該排名的參考資料亦可在條目其他段落中重複引用,格式為<ref name="WBSC World Rankings"/>
。
參數
[编辑]1
(unnamed): WBSC country codemdy
: Switches dates to month-day-year format
範例
[编辑]An example of the code used to display the ranking of 洪都拉斯:
{{WBSC World Rankings|HON}}
This code produces the following:
58 ━ (2024年12月31日)[1]
- ^ The WBSC World Ranking. WBSC. 2024年12月31日 [2024年12月31日].
更新
[编辑]主模板頁面本身不應直接修改。排名資料應更新於Module:SportsRankings/data/WBSC World Rankings。更新模板時,請先將日期(含日與月,如有需要也包含年份)改為最新一次WBSC世界排名的發布日期。接著,輸入各國的新名次及其名次變動,例如2表示上升兩名、0表示名次不變、-5表示下滑五名。
所有名次資料可透過試算表快速整理與更新。舉例來說,從WBSC排名表格複製整張表後,可在外部試算表中套用以下公式,以產生更新資料頁面所需的程式碼(假設WBSC排名從A1儲存格起始):
="| {{subst:str sub old|"&B1&"|0|3}} = "&A1&" | {{subst:str sub old|"&B1&"|0|3}}_move = "&E1
將產生的程式碼儲存至資料頁面後,排名便會同步更新。當某支國家代表隊的頁面快取被清除後,頁面上將顯示最新的排名資訊。
local data = {}
-- information about other templates used by module
data.templates = { flagged_team_link = "bb" }
-- general information about ranking and website being cited
data.source = {
url = "https://www.wbsc.org/en/rankings",
title = "The WBSC World Ranking",
website = "WBSC"
}
-- date of latest update and previous one for movement
data.updated = { day = 31, month = '12', year =2024 }
data.previous = { day = 27, month = '11', year =2024 }
-- see "Generating code" section on doc page for how to update the rankings
data.rankings = {
{ "Japan", 1, 0, 6911 },
{ "Chinese Taipei", 2, 0, 5558 },
{ "Venezuela", 3, 0, 4877 },
{ "Mexico", 4, 0, 4769 },
{ "United States", 5, 0, 4751 },
{ "South Korea", 6, 0, 4539 },
{ "Netherlands", 7, 0, 3949 },
{ "Panama", 8, 0, 3439 },
{ "Puerto Rico", 9, 0, 3375 },
{ "Cuba", 10, 0, 3146 },
{ "Dominican Republic", 11, 0, 2800 },
{ "Australia", 12, 0, 2542 },
{ "Colombia", 13, 0, 2457 },
{ "Italy", 14, 0, 2214 },
{ "Czech Republic", 15, 0, 2030 },
{ "Nicaragua", 16, 0, 1854 },
{ "Germany", 17, 0, 1399 },
{ "Great Britain", 18, 0, 1326 },
{ "Israel", 19, 0, 1121 },
{ "China", 20, 0, 937 },
{ "France", 21, 0, 888 },
{ "Canada", 22, 0, 856 },
{ "Brazil", 23, 0, 851 },
{ "Spain", 24, 0, 822 },
{ "Philippines", 25, 0, 451 },
{ "Curaçao", 26, 0, 417 },
{ "Belgium", 27, 0, 391 },
{ "Austria", 28, 0, 388 },
{ "Hong Kong", 29, 2, 331 },
{ "Croatia", 30, -1, 327 },
{ "South Africa", 31, -1, 313 },
{ "Sweden", 32, 0, 300 },
{ "Argentina", 33, 0, 235 },
{ "Thailand", 34, 1, 192 },
{ "Ukraine", 35, -1, 190 },
{ "Guam", 36, 2, 183 },
{ "Greece", 37, -1, 167 },
{ "Pakistan", 38, -1, 165 },
{ "Russia", 39, 0, 157 },
{ "Hungary", 40, 0, 153 },
{ "Switzerland", 41, 0, 139 },
{ "Slovakia", 42, 0, 115 },
{ "Lithuania", 43, 0, 114 },
{ "Peru", 44, 0, 108 },
{ "US Virgin Islands", 45, 0, 103 },
{ "Palestine", 46, 0, 82 },
{ "Bahamas", 47, 0, 80 },
{ "New Zealand", 48, 2, 72 },
{ "Uganda", 48, 0, 72 },
{ "Chile", 50, -1, 71 },
{ "Guatemala", 51, 0, 66 },
{ "Sri Lanka", 51, 0, 66 },
{ "Costa Rica", 53, 0, 62 },
{ "Singapore", 54, 0, 55 },
{ "Laos", 55, 0, 54 },
{ "Ireland", 56, 0, 53 },
{ "Sint Maarten", 57, 0, 46 },
{ "Honduras", 58, 0, 45 },
{ "Serbia", 59, 0, 44 },
{ "Slovenia", 60, 0, 37 },
{ "Ecuador", 61, 5, 35 },
{ "Bulgaria", 62, -1, 33 },
{ "Norway", 63, -1, 32 },
{ "Northern Mariana Islands", 64, -1, 29 },
{ "Poland", 65, -2, 25 },
{ "El Salvador", 65, -2, 25 },
{ "Belarus", 67, 0, 23 },
{ "Kenya", 67, 0, 23 },
{ "India", 69, 3, 20 },
{ "Bangladesh", 70, -1, 19 },
{ "Indonesia", 71, -1, 18 },
{ "Romania", 71, -1, 18 },
{ "Palau", 73, -1, 14 },
{ "Afghanistan", 73, -1, 14 },
{ "Nepal", 73, -1, 14 },
{ "Finland", 76, 0, 13 },
{ "Malaysia", 77, 0, 12 },
{ "Fiji", 78, 0, 8 },
{ "Turkey", 79, 0, 6 },
{ "Cambodia", 80, 0, 5 },
{ "Bolivia", 81, 0, 4 },
{ "Tanzania", 81, 0, 4 },
{ "Solomon Islands", 83, 0, 3 },
{ "Estonia", 84, 0, 2 }
}
-- list of WBSC country codes
data.alias = {
{ "AFG", "Afghanistan" },
{ "ARG", "Argentina" },
{ "ARM", "Armenia" },
{ "ARU", "Aruba" },
{ "ASA", "American Samoa" },
{ "AUS", "Australia" },
{ "AUT", "Austria" },
{ "BAH", "Bahamas" },
{ "BAN", "Bangladesh" },
{ "BEL", "Belgium" },
{ "BEN", "Benin" },
{ "BER", "Bermuda" },
{ "BHU", "Bhutan" },
{ "BLR", "Belarus" },
{ "BOL", "Bolivia" },
{ "BOT", "Botswana" },
{ "BRA", "Brazil" },
{ "BRU", "Brunei" },
{ "BUL", "Bulgaria" },
{ "BUR", "Burkina Faso" },
{ "CAN", "Canada" },
{ "CAM", "Cambodia"},
{ "CHI", "Chile" },
{ "CHN", "China" },
{ "CIV", "Ivory Coast" },
{ "CMR", "Cameroon" },
{ "COD", "Congo DR" },
{ "COK", "Cook Islands" },
{ "COL", "Colombia" },
{ "CPV", "Cape Verde" },
{ "CRC", "Costa Rica" },
{ "CRO", "Croatia" },
{ "CUB", "Cuba" },
{ "CUW", "Curaçao" },
{ "CYP", "Cyprus" },
{ "CZE", "Czech Republic" },
{ "DEN", "Denmark" },
{ "DOM", "Dominican Republic" },
{ "ECU", "Ecuador" },
{ "EGY", "Egypt" },
{ "ESA", "El Salvador" },
{ "ESP", "Spain" },
{ "EST", "Estonia" },
{ "FIJ", "Fiji" },
{ "FIN", "Finland" },
{ "FRA", "France" },
{ "FSM", "Federated States of Micronesia" },
{ "GBR", "Great Britain" },
{ "GEO", "Georgia" },
{ "GER", "Germany" },
{ "GHA", "Ghana" },
{ "GRE", "Greece" },
{ "GUA", "Guatemala" },
{ "GUM", "Guam" },
{ "GUY", "Guyana" },
{ "HAI", "Haiti" },
{ "HKG", "Hong Kong" },
{ "HON", "Honduras" },
{ "HUN", "Hungary" },
{ "INA", "Indonesia" },
{ "IND", "India" },
{ "IRI", "Iran" },
{ "IRL", "Ireland" },
{ "IRQ", "Iraq" },
{ "ISL", "Iceland" },
{ "ISR", "Israel" },
{ "ISV", "US Virgin Islands" },
{ "ITA", "Italy" },
{ "IVB", "British Virgin Islands" },
{ "JAM", "Jamaica" },
{ "JPN", "Japan" },
{ "KEN", "Kenya" },
{ "KOR", "South Korea" },
{ "KOS", "Kosovo" },
{ "KSA", "Saudi Arabia" },
{ "LAO", "Laos" },
{ "LAT", "Lativa" },
{ "LES", "Lesotho" },
{ "LTU", "Lithuania" },
{ "MAS", "Malaysia" },
{ "MDA", "Moldova" },
{ "MEX", "Mexico" },
{ "MGL", "Mongolia" },
{ "MHL", "Marshall Islands" },
{ "MLT", "Malta" },
{ "MNP", "Northern Mariana Islands" },
{ "MYA", "Myanmar" },
{ "NCA", "Nicaragua" },
{ "NCL", "New Caledonia" },
{ "NED", "Netherlands" },
{ "NEP", "Nepal" },
{ "NGR", "Nigeria" },
{ "NOR", "Norway" },
{ "NZL", "New Zealand" },
{ "PAK", "Pakistan" },
{ "PAN", "Panama" },
{ "PER", "Peru" },
{ "PHI", "Philippines" },
{ "PLE", "Palestine" },
{ "PLW", "Palau" },
{ "PNG", "Papua New Guinea" },
{ "POL", "Poland" },
{ "POR", "Portugal" },
{ "PRK", "North Korea" },
{ "PUR", "Puerto Rico" },
{ "ROU", "Romania" },
{ "RSA", "South Africa" },
{ "RUS", "Russia" },
{ "SAM", "Samoa" },
{ "SGP", "Singapore" },
{ "SLE", "Sierra Leone" },
{ "SLO", "Slovenia" },
{ "SMR", "San Marino" },
{ "SOL", "Solomon Islands" },
{ "SRB", "Serbia" },
{ "SRI", "Sri Lanka" },
{ "SUI", "Switzerland" },
{ "SVK", "Slovakia" },
{ "SWE", "Sweden" },
{ "SXM", "Sint Maarten" },
{ "TAN", "Tanzania" },
{ "THA", "Thailand" },
{ "TOG", "Togo" },
{ "TPE", "Chinese Taipei" },
{ "TTO", "Trinidad and Tobago" },
{ "TUN", "Tunisia" },
{ "TUR", "Turkey" },
{ "UGA", "Uganda" },
{ "UKR", "Ukraine" },
{ "USA", "United States" },
{ "VEN", "Venezuela" },
{ "ZAM", "Zambia" },
{ "ZIM", "Zimbabwe" },
}
-- List of WBSC confederations
data.confederation = {
Africa = { "RSA", "UGA", "KEN", "TAN"
},
Americas = { "MEX", "USA", "VEN", "CUB", "DOM", "PAN", "PUR", "COL", "CAN",
"NCA", "BRA", "CUW", "ARG", "PER", "HON", "ESA", "CHI", "GUA", "CRC",
"BAH", "ISV", "ECU", "BOL"
},
Asia = { "JPN", "KOR", "TPE", "CHN", "PHI", "HKG", "PAK", "THA", "PLE",
"LAO", "SRI", "SGP", "BAN", "AFG", "IND", "NEP"
},
Europe = { "NED", "ITA", "CZE", "GER", "GBR", "ISR", "FRA", "ESP", "BEL",
"CRO", "AUT", "SWE", "UKR", "GRE", "RUS", "SUI", "HUN", "SVK", "LTU",
"IRL", "BUL", "SRB", "BLR", "SLO", "NOR", "POL", "FIN", "ROU", "TUR",
"EST"
},
Oceania = { "AUS", "GUM", "NZL", "MNP", "PLW", "FIJ", "SOL"
},
}
return data