SHOW:
|
|
- or go back to the newest paste.
1 | - | import os, sys |
1 | + | import csv, os, sys |
2 | ||
3 | - | names = { |
3 | + | def load_tags_from(tag_file): |
4 | - | 'opening.bns': '00 - Disc Channel Theme.bns', |
4 | + | tags = {} |
5 | - | '01_BGM_TITLE.brstm': '01 - Title Screen.brstm', |
5 | + | csv_reader = csv.reader(tag_file) |
6 | - | '01_ME_SAVE.brstm': '02 - Save Fanfare.brstm', |
6 | + | #Skip the first row |
7 | - | '03_BGM_BANNER.brstm': '03 - Banner.brstm', |
7 | + | csv_reader.next() |
8 | - | '03_ME_HOLIDAY.brstm': '04 - Take-a-break Square.brstm', |
8 | + | for row in csv_reader: |
9 | - | '04_BGM_SAVELOAD.brstm': '05 - File Selection.brstm', |
9 | + | original_name, song_index, tagged_name = row |
10 | - | '04_ME_LEVELUP_M.brstm': '06 - Promotion (Mario Version).brstm', |
10 | + | tags[original_name] = '{0} - {1}'.format(song_index, tagged_name) |
11 | - | '05_BGM_MENU.brstm': '07 - Main Menu.brstm', |
11 | + | return tags |
12 | - | '05_ME_LEVELUP_D.brstm': '08 - Promotion (Dragon Quest Version).brstm', |
12 | + | |
13 | - | '06_BGM_WIFI.brstm': '09 - Nintendo Wi-Fi Connection.brstm', |
13 | + | |
14 | - | '06_ME_CURSE.brstm': '10 - Cursed Card!.brstm', |
14 | + | |
15 | - | '07_BGM_ENDING_M.brstm': '11 - Ending (Mario Version).brstm', |
15 | + | |
16 | - | '07_ME_MONOPOLY.brstm': '12 - Total Domination!.brstm', |
16 | + | |
17 | - | '08_BGM_ENDING_D.brstm': '13 - Ending (Dragon Quest Version).brstm', |
17 | + | |
18 | - | '08_ME_OJAMA_COME.brstm': '14 - Cameo Adventure!.brstm', |
18 | + | |
19 | - | '09_BGM_ORDER.brstm': '15 - Order Selection.brstm', |
19 | + | |
20 | - | '09_ME_OJAMA_BYE.brstm': '16 - Goodbye, Cameo!.brstm', |
20 | + | |
21 | - | '10_BGM_WINNER_M.brstm': '17 - Winner! (Mario Version).brstm', |
21 | + | |
22 | - | '10_ME_5_BUY.brstm': '18 - Forced Buyout.brstm', |
22 | + | |
23 | - | '11_BGM_WINNER_D.brstm': '19 - Winner! (Dragon Quest Version).brstm', |
23 | + | |
24 | - | '11_ME_BANKRUPTCY.brstm': '20 - Bankrupt!.brstm', |
24 | + | |
25 | - | '12_BGM_CHANCECARD.brstm': '21 - Venture Card Selection.brstm', |
25 | + | tag_file = open('tags.csv','rb') |
26 | - | '12_ME_ITEM_GET.brstm': '22 - Got Item!.brstm', |
26 | + | tags = load_tags_from(tag_file) |
27 | - | '13_BGM_STOCK.brstm': '23 - Stock Purchase Menu.brstm', |
27 | + | |
28 | - | '13_ME_ATARI_M.brstm': '24 - Round the Blocks - Winner! (Mario Version).brstm', |
28 | + | |
29 | - | '14_BGM_AUCTION.brstm': '25 - Auction.brstm', |
29 | + | for name in tags: |
30 | - | '14_ME_OHATARI_M.brstm': '26 - Round the Blocks - BIG WINNER! (Mario Version).brstm', |
30 | + | |
31 | - | '15_BGM_CASINO_SLOT_M.brstm': '27 - Round the Blocks (Mario Version).brstm', |
31 | + | new_name = tags[name] |
32 | - | '15_ME_ATARI_D.brstm': '28 - Round the Blocks - Winner! (Dragon Quest Version).brstm', |
32 | + | |
33 | - | '16_BGM_CASINO_SLOT_D.brstm': '29 - Round the Blocks (Dragon Quest Version).brstm', |
33 | + | |
34 | - | '16_ME_OHATARI_D.brstm': '30 - Round the Blocks - BIG WINNER! (Dragon Quest Version).brstm', |
34 | + | for name in tags: |
35 | - | '17_BGM_CASINO_BLOCK.brstm': '31 - Memory Block.brstm', |
35 | + | current_name = tags[name] |
36 | - | '17_ME_RACE_START.brstm': '32 - Slurpodrome - Race Start Fanfare.brstm', |
36 | + | |
37 | - | '19_BGM_CASINO_RACE.brstm': '33 - Slurpodrome - Race in Progress.brstm', |
37 | + | |
38 | - | '19_ME_OP_FIREWORKS.brstm': '34 - Opening (Fireworks).brstm', |
38 | + | |
39 | - | '20_BGM_MAP_YOSHI.brstm': '35 - Yoshi\'s Island.brstm', |
39 | + | |
40 | - | '20_ME_OP_LIGHT_BUBBLES.brstm': '36 - Opening (Bubbles).brstm', |
40 | + |