模組: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:
53 ━ (2025年8月5日)[1]
- ^ The WBSC World Ranking. WBSC. 2025年8月5日 [2025年8月5日].
更新
[编辑]主模板頁面本身不應直接修改。排名資料應更新於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 = 5, month = '8', year =2025 }
data.previous = { day = 23, month = '7', year =2025 }
-- see "Generating code" section on doc page for how to update the rankings
data.rankings = {
{ "Japan", 1, 0, 6980 },
{ "Chinese Taipei", 2, 0, 5127 },
{ "United States", 3, 0, 4591 },
{ "South Korea", 4, 0, 4542 },
{ "Mexico", 5, 0, 3938 },
{ "Venezuela", 6, 0, 3612 },
{ "Puerto Rico", 7, 0, 3081 },
{ "Netherlands", 8, 0, 3040 },
{ "Panama", 9, 0, 2818 },
{ "Australia", 10, 1, 2550 },
{ "Dominican Republic", 11, -1, 2494 },
{ "Cuba", 12, 0, 2461 },
{ "Colombia", 13, 0, 1927 },
{ "Italy", 14, 0, 1563 },
{ "Czech Republic", 15, 0, 1453 },
{ "Nicaragua", 16, 0, 1410 },
{ "Great Britain", 17, 0, 1047 },
{ "Germany", 18, 1, 952 },
{ "China", 19, -1, 937 },
{ "Canada", 20, 0, 835 },
{ "Brazil", 21, 0, 810 },
{ "Israel", 22, 0, 786 },
{ "France", 23, 0, 513 },
{ "Philippines", 24, 0, 451 },
{ "Spain", 25, 0, 430 },
{ "South Africa", 26, 0, 343 },
{ "Hong Kong", 27, 0, 331 },
{ "Curaçao", 28, 0, 265 },
{ "Austria", 29, 0, 243 },
{ "Sweden", 30, 0, 206 },
{ "Thailand", 31, 0, 193 },
{ "Guam", 32, 0, 181 },
{ "Argentina", 33, 0, 178 },
{ "Belgium", 33, 0, 178 },
{ "Pakistan", 35, 0, 160 },
{ "Switzerland", 36, 0, 157 },
{ "Croatia", 37, 0, 151 },
{ "Palestine", 38, 0, 87 },
{ "Greece", 39, 0, 86 },
{ "US Virgin Islands", 40, 0, 82 },
{ "Ukraine", 41, 0, 81 },
{ "Chile", 42, 0, 71 },
{ "Hungary", 43, 0, 68 },
{ "Laos", 44, 0, 66 },
{ "Peru", 44, 0, 66 },
{ "Costa Rica", 46, 0, 62 },
{ "Singapore", 46, 0, 62 },
{ "Sri Lanka", 48, 0, 55 },
{ "Guatemala", 49, 0, 54 },
{ "Bahamas", 50, 0, 51 },
{ "Poland", 51, 0, 50 },
{ "Sint Maarten", 52, 0, 46 },
{ "Honduras", 53, 0, 45 },
{ "Lithuania", 54, 0, 44 },
{ "Uganda", 55, 0, 42 },
{ "New Zealand", 56, 0, 35 },
{ "Slovakia", 57, 0, 32 },
{ "Palau", 58, 0, 30 },
{ "El Salvador", 59, 0, 25 },
{ "Iran", 59, 0, 25 },
{ "India", 59, 0, 25 },
{ "Northern Mariana Islands", 62, 0, 21 },
{ "Serbia", 63, 0, 20 },
{ "Kenya", 63, 0, 20 },
{ "Ireland", 65, 0, 18 },
{ "Indonesia", 65, 0, 18 },
{ "Ecuador", 67, 0, 16 },
{ "Norway", 68, 0, 15 },
{ "Slovenia", 69, 0, 14 },
{ "Malaysia", 70, 0, 12 },
{ "Federated States of Micronesia", 71, 0, 10 },
{ "Bangladesh", 72, 0, 9 },
{ "Romania", 73, 0, 8 },
{ "Cambodia", 74, 0, 5 },
{ "Afghanistan", 75, 0, 4 },
{ "Tanzania", 75, 0, 4 },
{ "Bulgaria", 77, 0, 3 },
{ "Finland", 77, 0, 3 },
{ "Fiji", 77, 0, 3 },
{ "Turkey", 77, 0, 3 },
{ "Zimbabwe", 77, 0, 3 },
}
-- 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