Advertisement
miguelmartins1987

Fortune Street Music Renamer

Nov 22nd, 2012
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.40 KB | None | 0 0
  1. import os, sys
  2.  
  3. names = {
  4.     'opening.bns':  '00 - Disc Channel Theme.bns',
  5.     '01_BGM_TITLE.brstm': '01 - Title Screen.brstm',
  6.     '01_ME_SAVE.brstm': '02 - Save Fanfare.brstm',
  7.     '03_BGM_BANNER.brstm': '03 - Banner.brstm',
  8.     '03_ME_HOLIDAY.brstm': '04 - Take-a-break Square.brstm',
  9.     '04_BGM_SAVELOAD.brstm': '05 - File Selection.brstm',
  10.     '04_ME_LEVELUP_M.brstm': '06 - Promotion (Mario Version).brstm',
  11.     '05_BGM_MENU.brstm': '07 - Main Menu.brstm',
  12.     '05_ME_LEVELUP_D.brstm': '08 - Promotion (Dragon Quest Version).brstm',
  13.     '06_BGM_WIFI.brstm': '09 - Nintendo Wi-Fi Connection.brstm',
  14.     '06_ME_CURSE.brstm': '10 - Cursed Card!.brstm',
  15.     '07_BGM_ENDING_M.brstm': '11 - Ending (Mario Version).brstm',
  16.     '07_ME_MONOPOLY.brstm': '12 - Total Domination!.brstm',
  17.     '08_BGM_ENDING_D.brstm': '13 - Ending (Dragon Quest Version).brstm',
  18.     '08_ME_OJAMA_COME.brstm': '14 - Cameo Adventure!.brstm',
  19.     '09_BGM_ORDER.brstm': '15 - Order Selection.brstm',
  20.     '09_ME_OJAMA_BYE.brstm': '16 - Goodbye, Cameo!.brstm',
  21.     '10_BGM_WINNER_M.brstm': '17 - Winner! (Mario Version).brstm',
  22.     '10_ME_5_BUY.brstm': '18 - Forced Buyout.brstm',
  23.     '11_BGM_WINNER_D.brstm': '19 - Winner! (Dragon Quest Version).brstm',
  24.     '11_ME_BANKRUPTCY.brstm': '20 - Bankrupt!.brstm',
  25.     '12_BGM_CHANCECARD.brstm': '21 - Venture Card Selection.brstm',
  26.     '12_ME_ITEM_GET.brstm': '22 - Got Item!.brstm',
  27.     '13_BGM_STOCK.brstm': '23 - Stock Purchase Menu.brstm',
  28.     '13_ME_ATARI_M.brstm': '24 - Round the Blocks - Winner! (Mario Version).brstm',
  29.     '14_BGM_AUCTION.brstm': '25 - Auction.brstm',
  30.     '14_ME_OHATARI_M.brstm': '26 - Round the Blocks - BIG WINNER! (Mario Version).brstm',
  31.     '15_BGM_CASINO_SLOT_M.brstm': '27 - Round the Blocks (Mario Version).brstm',
  32.     '15_ME_ATARI_D.brstm': '28 - Round the Blocks - Winner! (Dragon Quest Version).brstm',
  33.     '16_BGM_CASINO_SLOT_D.brstm': '29 - Round the Blocks (Dragon Quest Version).brstm',
  34.     '16_ME_OHATARI_D.brstm': '30 - Round the Blocks - BIG WINNER! (Dragon Quest Version).brstm',
  35.     '17_BGM_CASINO_BLOCK.brstm': '31 - Memory Block.brstm',
  36.     '17_ME_RACE_START.brstm': '32 - Slurpodrome - Race Start Fanfare.brstm',
  37.     '19_BGM_CASINO_RACE.brstm': '33 - Slurpodrome - Race in Progress.brstm',
  38.     '19_ME_OP_FIREWORKS.brstm': '34 - Opening (Fireworks).brstm',
  39.     '20_BGM_MAP_YOSHI.brstm': '35 - Yoshi\'s Island.brstm',
  40.     '20_ME_OP_LIGHT_BUBBLES.brstm': '36 - Opening (Bubbles).brstm',
  41.     '21_BGM_MAP_CIRCUIT.brstm': '37 - Mario Circuit.brstm',
  42.     '22_BGM_MAP_PEACH.brstm': '38 - Peach\'s Castle.brstm',
  43.     '23_BGM_MAP_STADIUM.brstm': '39 - Mario Stadium.brstm',
  44.     '24_BGM_MAP_DOLPIC.brstm': '40 - Delfino Plaza.brstm',
  45.     '25_BGM_MAP_SMB.brstm': '41 - Super Mario Bros..brstm',
  46.     '26_BGM_MAP_KOOPA.brstm': '42 - Bowser\'s Castle.brstm',
  47.     '27_BGM_MAP_STARSHIP.brstm': '43 - Starship Mario.brstm',
  48.     '28_BGM_MAP_EGG.brstm': '44 - Good Egg Galaxy.brstm',
  49.     '29_BGM_MAP_TRODAIN.brstm': '45 - Castle Trodain.brstm',
  50.     '30_BGM_MAP_GHOSTSHIP.brstm': '46 - Ghost Ship.brstm',
  51.     '31_BGM_MAP_MAJINZOU.brstm': '47 - Colossus.brstm',
  52.     '32_BGM_MAP_SINOKAZAN.brstm': '48 - Mt. Magmageddon.brstm',
  53.     '33_BGM_MAP_SLABACCA.brstm': '49 - Slimenia.brstm',
  54.     '34_BGM_MAP_KANDATA.brstm': '50 - Robin Hood Ruins.brstm',
  55.     '35_BGM_MAP_ALEFGARD.brstm': '51 - Alefgard.brstm',
  56.     '36_BGM_MAP_DHAMA.brstm': '52 - Alltrades Abbey.brstm',
  57.     '37_BGM_MAP_ANGEL.brstm': '53 - The Observatory.brstm',
  58.     '38_BGM_GOALPROP_M.brstm': '54 - Target Amount Reached! (Mario Version).brstm',
  59.     '39_BGM_GOALPROP_D.brstm': '55 - Target Amount Reached! (Dragon Quest Version).brstm',
  60.     'BGM_010.brstm': 'Unused - BGM 10.brstm',
  61.     'BGM_033.brstm': 'Unused - BGM 33.brstm'
  62. }
  63.  
  64. def print_usage():
  65.     print 'Usage: python {0} (original|detailed)'.format(sys.argv[0])
  66.  
  67. def main():
  68.     args = sys.argv[1:]
  69.     if len(args) != 1:
  70.         print_usage()
  71.         return
  72.     mode = args[0].lower()
  73.     if mode != 'original' and mode != 'detailed':
  74.         print_usage()
  75.         return
  76.     #Rename the files
  77.     if mode == 'detailed':
  78.         for name in names:
  79.             old_name = name
  80.             new_name = names[name]
  81.             os.rename(old_name, new_name)
  82.     else:
  83.         for name in names:
  84.             current_name = names[name]
  85.             original_name = name
  86.             os.rename(current_name, original_name)
  87.  
  88. if __name__ == '__main__':
  89.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement