Skip to content

Commit

Permalink
add fa column
Browse files Browse the repository at this point in the history
  • Loading branch information
Walavouchey committed Feb 22, 2024
1 parent 0058da6 commit 88cb650
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions wikitools_cli/commands/update_originals.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def link_icon(link: str) -> str:


def link_icons(row: typing.List[typing.Dict[str, str]]) -> str:
return " ".join([link_icon(link) for link in [row['SoundCloud'], row['YouTube'], row['Spotify'], row['Bandcamp'], row['Asset'], row['FA listing']] if link])
return " ".join([link_icon(link) for link in [row['SoundCloud'], row['YouTube'], row['Spotify'], row['Bandcamp'], row['Asset']] if link])

def first(l: typing.List[str]) -> str:
trimmed = [l for l in l if l]
Expand Down Expand Up @@ -307,12 +307,13 @@ def create_table_ost(data):
[
{
"Links": link_icons(row),
"FA": link_icon(row['FA listing']),
"Song": row['Track'] + footnote(row['FA status']),
"Notes": row['Note']
} for row in data
],
["Links", "Song", "Notes"],
["--:", ":--", ":--"]
["Links", "FA", "Song", "Notes"],
["--:", ":-:", ":--", ":--"]
)


Expand All @@ -325,11 +326,12 @@ def create_table_fa_release(data):
[
{
"Links": link_icons(row),
"FA": link_icon(row['FA listing']),
"Song": row['Track'],
} for row in data
],
["Links", "Song"],
["--:", ":--"]
["Links", "FA", "Song"],
["--:", ":-:", ":--"]
)


Expand All @@ -342,13 +344,14 @@ def create_table_tournament(data):
[
{
"Links": link_icons(row),
"FA": link_icon(row['FA listing']),
"Song": row['Track'] + footnote(row['FA status']),
"Beatmap": ", ".join([maybe_link(f"#{i}", beatmap, True) for i, beatmap in enumerate(row['Beatmap'].split(", "), start=1)]),
"Notes": first([row['Mappool slot'], row['Note']])
} for row in data
],
["Links", "Song", "Beatmap", "Notes"],
["--:", ":--", ":-:", ":--"]
["Links", "FA", "Song", "Beatmap", "Notes"],
["--:", ":-:", ":--", ":-:", ":--"]
)


Expand All @@ -361,12 +364,13 @@ def create_table_contest_official(data):
[
{
"Links": link_icons(row),
"FA": link_icon(row['FA listing']),
"Song": row['Track'] + footnote(row['FA status']),
"Beatmap": ", ".join([maybe_link(f"#{i}", beatmap, True) for i, beatmap in enumerate(row['Beatmap'].split(", "), start=1)]),
} for row in data
],
["Links", "Song", "Beatmap"],
["--:", ":--", ":-:"]
["Links", "FA", "Song", "Beatmap"],
["--:", ":-:", ":--", ":-:"]
)


Expand All @@ -379,11 +383,12 @@ def create_table_contest_community(data):
[
{
"Links": link_icons(row),
"FA": link_icon(row['FA listing']),
"Song": row['Track'] + footnote(row['FA status']),
} for row in data
],
["Links", "Song"],
["--:", ":--"]
["Links", "FA", "Song"],
["--:", ":-:", ":--"]
)


Expand All @@ -396,12 +401,13 @@ def create_table_standalone_beatmap(data):
[
{
"Links": link_icons(row),
"FA": link_icon(row['FA listing']),
"Song": row['Track'] + footnote(row['FA status']),
"Beatmap": ", ".join([maybe_link(f"#{i}", beatmap, True) for i, beatmap in enumerate(row['Beatmap'].split(", "), start=1)]),
} for row in data
],
["Links", "Song", "Beatmap"],
["--:", ":--", ":-:"]
["Links", "FA", "Song", "Beatmap"],
["--:", ":-:", ":--", ":-:"]
)


Expand Down

0 comments on commit 88cb650

Please sign in to comment.