Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Walavouchey committed Nov 14, 2024
1 parent a89da58 commit 82fe17b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 5 additions & 1 deletion wikitools/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def plot_originals_over_time():
data_fa = [int(row['Featured Artist releases']) for row in data]
data_beatmap = [int(row['Standalone beatmaps']) for row in data]
data_ost = [int(row['Original soundtrack']) for row in data]
data_other = [int(row['Other']) for row in data]

data_list = [
data_tournament_community,
Expand All @@ -63,6 +64,7 @@ def plot_originals_over_time():
data_fa,
data_beatmap,
data_ost,
data_other,
]

#data_tournament_community = [row['Community tournaments'] for row in data]
Expand All @@ -76,12 +78,13 @@ def plot_originals_over_time():
"Featured Artist releases",
"Standalone beatmaps",
"osu! original soundtrack",
"Other osu!-related releases",
]

years = list(range(2007, 2025))

def hex_to_tuple(hex):
return tuple(int(hex[i:i+2], 16) for i in (0, 2, 4))
return tuple(int(hex[i:i + 2], 16) for i in (0, 2, 4))

osu_colours_list = [
hex_to_tuple("FFAA66"), # orange
Expand All @@ -92,6 +95,7 @@ def hex_to_tuple(hex):
hex_to_tuple("66FFCC"), # turquoise
hex_to_tuple("DD55FF"), # purple
hex_to_tuple("FF66AA"), # osu!pink
hex_to_tuple("FFFFFF"), # white
#[140, 102, 255], # purple
#[255, 217, 102], # orange (actually yellow)
#[255, 102, 171], # osu!pink
Expand Down
20 changes: 16 additions & 4 deletions wikitools_cli/commands/update_originals.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def main(*args):
table_fa_james_landino = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`James Landino`:39" in row['Artists']]))
table_fa_kiraku = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`kiraku`:101" in row['Artists']]))
table_fa_kitazawa_kyouhei = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`Kitazawa Kyouhei`:165" in row['Artists']]))
table_fa_midian = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`Midian`:443" in row['Artists']]))
table_fa_rabbit_house = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`Rabbit House`:242" in row['Artists']]))
table_fa_tomspicy = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`tomspicy`:437" in row['Artists']]))
table_fa_yuki = str(create_table_fa_release([row for row in csv if row['Type'] == "FA_RELEASE" and "`yuki.`:4" in row['Artists']]))
Expand All @@ -414,6 +415,7 @@ def main(*args):
section_tournament_community = populate_section(csv, "TOURNAMENT_COMMUNITY", create_table_tournament)
section_contest_official = ""
section_contest_community = populate_section(csv, "CONTEST_COMMUNITY", create_table_contest)
section_other = ""

data_contest_official = [row for row in csv if row['Type'] == "CONTEST_OFFICIAL"]
for contest in sorted(list(set(row['Event'] for row in data_contest_official))):
Expand All @@ -424,6 +426,13 @@ def main(*args):

table_standalone = str(create_table_standalone_beatmap([row for row in csv if row['Type'] == "BEATMAP"]))

data_other = [row for row in csv if row['Type'] == "OTHER"]
for event in sorted(list(set(row['Event'] for row in data_other))):
data = [row for row in csv if row['Event'] == event]
section_other += f"#### {maybe_link(event, data[0]['Event link'])}"
section_other += "\n\n"
section_other += str(create_table_fa_release(data)) + "\n"

with open('wiki/osu!_originals/en.md', "r", encoding="utf-8", newline="\n") as file:
contents = file.read()

Expand All @@ -436,10 +445,11 @@ def main(*args):
tree[0][1][1][2].nodes[3] = table_fa_james_landino.strip()
tree[0][1][1][3].nodes[2] = table_fa_kiraku.strip()
tree[0][1][1][4].nodes[2] = table_fa_kitazawa_kyouhei.strip()
tree[0][1][1][5].nodes[2] = table_fa_rabbit_house.strip()
tree[0][1][1][6].nodes[3] = table_fa_tomspicy.strip()
tree[0][1][1][7].nodes[2] = table_fa_yuki.strip()
tree[0][1][1][8].nodes[2] = table_fa_zxnx.strip()
tree[0][1][1][5].nodes[2] = table_fa_midian.strip()
tree[0][1][1][6].nodes[2] = table_fa_rabbit_house.strip()
tree[0][1][1][7].nodes[3] = table_fa_tomspicy.strip()
tree[0][1][1][8].nodes[2] = table_fa_yuki.strip()
tree[0][1][1][9].nodes[2] = table_fa_zxnx.strip()

tree[0][1][2] = tree[0][1][2].nodes[0] + "\n\n" + section_tournament_official.strip()
tree[0][1][3] = tree[0][1][3].nodes[0] + "\n\n" + section_tournament_community.strip()
Expand All @@ -448,6 +458,8 @@ def main(*args):

tree[0][1][6].nodes[2] = table_standalone.strip()

tree[0][1][7] = tree[0][1][7].nodes[0] + "\n\n" + section_other.strip()

time_string = datetime.datetime.now().strftime("%Y%m%d")
tree[0][0].nodes[1] = f"There is currently a total of **{len(csv)}** documented osu! originals."
tree[0][0].nodes[2] = f"![Graph of osu! originals over time](img/originals-over-time.png?{time_string})"
Expand Down

0 comments on commit 82fe17b

Please sign in to comment.