Skip to content

Instantly share code, notes, and snippets.

@stuartpb
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartpb/533d2053792c35024b5f to your computer and use it in GitHub Desktop.
Save stuartpb/533d2053792c35024b5f to your computer and use it in GitHub Desktop.
Script for ganking TF2 map images from Wikipedia
// phase 0: copy a subsection of the source of http://wiki.teamfortress.com/wiki/Template:List_of_maps, trim whitespace and run:
// s/\|-\n\|\s*\[\[File:([^\|]*)\|[^\n]*\n\|[^\|]*\|([^\]]*)\]\]'*\n[^\n]*\n\| \{\{code\|([^\}]*)\}\}\n[^\n]*\n[^\n]*\n[^\n]*\n/{id: "$3", name: "$2", image: "$1"},\n/g
//phase 1
var maps = [
{id: "ctf_2fort", name: "2Fort", image: "Ctf 2fort bridge ss.png"},
{id: "ctf_doublecross", name: "Double Cross", image: "CTF DoubleCross RedBase.png"},
{id: "ctf_sawmill", name: "Sawmill", image: "CTF Sawmill Center.png"},
{id: "ctf_turbine", name: "Turbine", image: "CTF Turbine Center.png"},
{id: "ctf_well", name: "Well", image: "Ctfwell04.png"},
{id: "cp_5gorge", name: "5Gorge", image: "5gorge1.png"},
{id: "cp_badlands", name: "Badlands", image: "CP Badlands Central point.PNG"},
{id: "cp_coldfront", name: "Coldfront", image: "Coldfront5.png"},
{id: "cp_fastlane", name: "Fastlane", image: "fastlane1.png"},
{id: "cp_foundry", name: "Foundry", image: "Cp foundry mid.png"},
{id: "cp_freight_final1", name: "Freight", image: "freight1.png"},
{id: "cp_granary", name: "Granary", image: "TF2 Granary Map.jpg"},
{id: "cp_gullywash_final1", name: "Gullywash", image: "CP_Gullywash_3.png"},
{id: "cp_process_final", name: "Process", image: "Cp_process_middle_point.jpeg"},
{id: "cp_snakewater_final1", name: "Snakewater", image: "Snakewater_mid.jpg"},
{id: "cp_well", name: "Well", image: "TF2 Well Map.jpg"},
{id: "cp_yukon_final", name: "Yukon", image: "CP_Yukon_overview.png"},
{id: "cp_standin_final", name: "Standin", image: "Cp_standin_B.jpg"},
{id: "cp_degrootkeep", name: "DeGroot Keep", image: "Degroot Keep Castle.png"},
{id: "cp_dustbowl", name: "Dustbowl", image: "TF2 Dustbowl Map.jpg"},
{id: "cp_egypt_final", name: "Egypt", image: "Egypt 01.jpg"},
{id: "cp_gorge", name: "Gorge", image: "Cp gorge.jpg"},
{id: "cp_gravelpit", name: "Gravel Pit", image: "Tf2 gravelpit.jpg"},
{id: "cp_junction_final", name: "Junction", image: "Junct 01.jpg"},
{id: "cp_manor_event", name: "Mann Manor", image: "Mann manor event.jpg"},
{id: "cp_mountainlab", name: "Mountain Lab", image: "Art Pass Winner 3DNJ.jpg"},
{id: "cp_steel", name: "Steel", image: "Steel Main.png"},// redirect from "01 cpSteel 2.jpg"
{id: "tc_hydro", name: "Hydro", image: "TF2 Hydro Map.jpg"},
{id: "pl_badwater", name: "Badwater Basin", image: "Plbadwater.jpg"},
{id: "pl_barnblitz", name: "Barnblitz", image: "Barnblitz.PNG"},
{id: "pl_frontier_final", name: "Frontier", image: "Pl_frontier.jpg"},
{id: "pl_goldrush", name: "Gold Rush", image: "Goldrush.jpg"},
{id: "pl_hoodoo_final", name: "Hoodoo", image: "Plhoodoo.jpg"},
{id: "pl_thundermountain", name: "Thunder Mountain", image: "PL Thunder Mountain.png"},
{id: "pl_upward", name: "Upward", image: "Engineer Update Upward.png"},
{id: "plr_hightower_event", name: "Helltower", image: "Plr_hightower_event3.png"},
{id: "plr_hightower", name: "Hightower", image: "Hightower.png"},
{id: "plr_nightfall_final", name: "Nightfall", image: "Nightfall stage2.png"},
{id: "plr_pipeline", name: "Pipeline", image: "Pipeline.jpg"},
{id: "arena_badlands", name: "Badlands", image: "Arenabadlands.jpg"},
{id: "arena_granary", name: "Granary", image: "Arenagranary.jpg"},
{id: "arena_lumberyard", name: "Lumberyard", image: "Arenalumberyard.jpg"},
{id: "arena_nucleus", name: "Nucleus", image: "Arenanucleus.jpg"},
{id: "arena_offblast_final", name: "Offblast", image: "Offblast 01.jpg"},
{id: "arena_ravine", name: "Ravine", image: "Arenaravine.jpg"},
{id: "arena_sawmill", name: "Sawmill", image: "Sawmill.PNG"},
{id: "arena_watchtower", name: "Watchtower", image: "Watch 01.jpg"},
{id: "arena_well", name: "Well", image: "Tg arenawell.jpg"},
{id: "koth_badlands", name: "Badlands", image: "Koth badlands.png"},
{id: "koth_viaduct_event", name: "Eyeaduct", image: "Eyeaduct 1.png"},
{id: "koth_lakeside_event", name: "Ghost Fort", image: "Ghost Fort.png"},
{id: "koth_harvest_final", name: "Harvest", image: "KOTH Harvest Farmhouse.PNG"},
{id: "koth_harvest_event", name: "Harvest Event", image: "koth_harvest_event_mid.jpg"},
{id: "koth_king", name: "Kong King", image: "Kong_King.png"},
{id: "koth_lakeside_final", name: "Lakeside", image: "Koth_lakeside.jpg"},
{id: "koth_nucleus", name: "Nucleus", image: "Nucleus.PNG"},
{id: "koth_sawmill", name: "Sawmill", image: "Enviromental death Saw Blades.png"}, //redirect from "Kothsawmill.jpg"
{id: "koth_viaduct", name: "Viaduct", image: "Viaduct 01.jpg"},
{id: "sd_doomsday", name: "Doomsday", image: "Sd_doomsday_ingame_1.jpg"},
{id: "tr_dustbowl", name: "Dustbowl", image: "Tr dustbowl0003.jpg"},
{id: "tr_target", name: "Target", image: "Map TR Training.png"},
{id: "itemtest", name: "Itemtest", image: "Item test.jpg"},
{id: "cp_cloak", name: "Cloak", image: "cp_cloak1.jpg"},
{id: "mvm_bigrock", name: "Bigrock", image: "Mvm bigrock.png"},
{id: "mvm_coaltown", name: "Coal Town", image: "Coal Town base.png"},
{id: "mvm_decoy", name: "Decoy", image: "Decoy base.png"},
{id: "mvm_example", name: "Example", image: "Example5.png"},
{id: "mvm_ghost_town", name: "Ghost Town", image: "Mvm_coaltown_event.jpg"},
{id: "mvm_mannhattan", name: "Mannhattan", image: "Mannhattan_preview.png"},
{id: "mvm_mannworks", name: "Mannworks", image: "Mannworks base.jpg"},
{id: "mvm_rottenburg", name: "Rottenburg", image: "Rottenburg.png"},
]
function wikiPagename(n){
return 'File:'+n.image.slice(0,1).toUpperCase()+n.image.slice(1).replace(/[_ ]/g,' ');
}
//console.log(encodeURIComponent(maps.slice(0,50).map(wikiPagename).join('|')))
//console.log(encodeURIComponent(maps.slice(50).map(wikiPagename).join('|')))
var desired = Object.create(null);
for(var i=0; i<maps.length; i++){
var extension = maps[i].image.replace(/^.*\./,'.');
maps[i].image = desired[wikiPagename(maps[i])] = maps[i].id + extension.toLowerCase();
}
//step 1.5:
//visit "http://wiki.teamfortress.com/w/api.php?action=query&prop=imageinfo&iiprop=url&format=json&titles=" + each set of outputs
//and paste the contents of "pages" below
//phase 2
/*
var pages={
"66339":{"pageid":66339,"ns":6,"title":"File:5gorge1.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/8/81/5gorge1.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:5gorge1.png"}]},"11589":{"pageid":11589,"ns":6,"title":"File:Arenabadlands.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/4/46/Arenabadlands.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Arenabadlands.jpg"}]},"11591":{"pageid":11591,"ns":6,"title":"File:Arenagranary.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/3/38/Arenagranary.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Arenagranary.jpg"}]},"11596":{"pageid":11596,"ns":6,"title":"File:Arenalumberyard.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/df/Arenalumberyard.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Arenalumberyard.jpg"}]},"11597":{"pageid":11597,"ns":6,"title":"File:Arenanucleus.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/6/6c/Arenanucleus.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Arenanucleus.jpg"}]},"11598":{"pageid":11598,"ns":6,"title":"File:Arenaravine.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/3/3c/Arenaravine.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Arenaravine.jpg"}]},"25179":{"pageid":25179,"ns":6,"title":"File:Art Pass Winner 3DNJ.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/c/c2/Art_Pass_Winner_3DNJ.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Art_Pass_Winner_3DNJ.jpg"}]},"90525":{"pageid":90525,"ns":6,"title":"File:Barnblitz.PNG","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/7b/Barnblitz.PNG","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Barnblitz.PNG"}]},"35010":{"pageid":35010,"ns":6,"title":"File:CP Badlands Central point.PNG","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/7d/CP_Badlands_Central_point.PNG","descriptionurl":"http://wiki.teamfortress.com/wiki/File:CP_Badlands_Central_point.PNG"}]},"120333":{"pageid":120333,"ns":6,"title":"File:CP Gullywash 3.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/1/17/CP_Gullywash_3.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:CP_Gullywash_3.png"}]},"58287":{"pageid":58287,"ns":6,"title":"File:CP Yukon overview.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/8/8a/CP_Yukon_overview.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:CP_Yukon_overview.png"}]},"27271":{"pageid":27271,"ns":6,"title":"File:CTF DoubleCross RedBase.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/a/ae/CTF_DoubleCross_RedBase.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:CTF_DoubleCross_RedBase.png"}]},"27276":{"pageid":27276,"ns":6,"title":"File:CTF Sawmill Center.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/b/bd/CTF_Sawmill_Center.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:CTF_Sawmill_Center.png"}]},"51199":{"pageid":51199,"ns":6,"title":"File:CTF Turbine Center.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/dc/CTF_Turbine_Center.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:CTF_Turbine_Center.png"}]},"66983":{"pageid":66983,"ns":6,"title":"File:Coldfront5.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/1/13/Coldfront5.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Coldfront5.png"}]},"124695":{"pageid":124695,"ns":6,"title":"File:Cp foundry mid.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/2/24/Cp_foundry_mid.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Cp_foundry_mid.png"}]},"3588":{"pageid":3588,"ns":6,"title":"File:Cp gorge.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/2/25/Cp_gorge.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Cp_gorge.jpg"}]},"222774":{"pageid":222774,"ns":6,"title":"File:Cp process middle point.jpeg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/8/82/Cp_process_middle_point.jpeg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Cp_process_middle_point.jpeg"}]},"221729":{"pageid":221729,"ns":6,"title":"File:Cp standin B.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/73/Cp_standin_B.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Cp_standin_B.jpg"}]},"27209":{"pageid":27209,"ns":6,"title":"File:Ctf 2fort bridge ss.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/a/a1/Ctf_2fort_bridge_ss.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Ctf_2fort_bridge_ss.png"}]},"65127":{"pageid":65127,"ns":6,"title":"File:Ctfwell04.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e1/Ctfwell04.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Ctfwell04.png"}]},"63016":{"pageid":63016,"ns":6,"title":"File:Degroot Keep Castle.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/0/0e/Degroot_Keep_Castle.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Degroot_Keep_Castle.png"}]},"4040":{"pageid":4040,"ns":6,"title":"File:Egypt 01.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/4/45/Egypt_01.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Egypt_01.jpg"}]},"12835":{"pageid":12835,"ns":6,"title":"File:Engineer Update Upward.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/9/92/Engineer_Update_Upward.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Engineer_Update_Upward.png"}]},"151049":{"pageid":151049,"ns":6,"title":"File:Eyeaduct 1.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/7c/Eyeaduct_1.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Eyeaduct_1.png"}]},"67207":{"pageid":67207,"ns":6,"title":"File:Fastlane1.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/ee/Fastlane1.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Fastlane1.png"}]},"68017":{"pageid":68017,"ns":6,"title":"File:Freight1.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/da/Freight1.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Freight1.png"}]},"4679":{"pageid":4679,"ns":6,"title":"File:Goldrush.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/c/cb/Goldrush.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Goldrush.jpg"}]},"14527":{"pageid":14527,"ns":6,"title":"File:Hightower.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/d9/Hightower.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Hightower.png"}]},"5479":{"pageid":5479,"ns":6,"title":"File:Junct 01.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/2/23/Junct_01.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Junct_01.jpg"}]},"77628":{"pageid":77628,"ns":6,"title":"File:Koth badlands.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/3/31/Koth_badlands.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Koth_badlands.png"}]},"28054":{"pageid":28054,"ns":6,"title":"File:Mann manor event.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/4/4d/Mann_manor_event.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Mann_manor_event.jpg"}]},"57264":{"pageid":57264,"ns":6,"title":"File:Nightfall stage2.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/1/18/Nightfall_stage2.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Nightfall_stage2.png"}]},"5975":{"pageid":5975,"ns":6,"title":"File:Offblast 01.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/d9/Offblast_01.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Offblast_01.jpg"}]},"13103":{"pageid":13103,"ns":6,"title":"File:PL Thunder Mountain.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/f/f0/PL_Thunder_Mountain.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:PL_Thunder_Mountain.png"}]},"6015":{"pageid":6015,"ns":6,"title":"File:Pipeline.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/7e/Pipeline.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Pipeline.jpg"}]},"6019":{"pageid":6019,"ns":6,"title":"File:Pl frontier.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/a/af/Pl_frontier.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Pl_frontier.jpg"}]},"11638":{"pageid":11638,"ns":6,"title":"File:Plbadwater.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e6/Plbadwater.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Plbadwater.jpg"}]},"11604":{"pageid":11604,"ns":6,"title":"File:Plhoodoo.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/da/Plhoodoo.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Plhoodoo.jpg"}]},"232508":{"pageid":232508,"ns":6,"title":"File:Plr hightower event3.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/7f/Plr_hightower_event3.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Plr_hightower_event3.png"}]},"6241":{"pageid":6241,"ns":6,"title":"File:Sawmill.PNG","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/8/81/Sawmill.PNG","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Sawmill.PNG"}]},"87396":{"pageid":87396,"ns":6,"title":"File:Snakewater mid.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e7/Snakewater_mid.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Snakewater_mid.jpg"}]},"104175":{"pageid":104175,"ns":6,"title":"File:Steel Main.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/3/39/Steel_Main.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Steel_Main.png"}]},"8364":{"pageid":8364,"ns":6,"title":"File:TF2 Dustbowl Map.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/3/31/TF2_Dustbowl_Map.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:TF2_Dustbowl_Map.jpg"}]},"8365":{"pageid":8365,"ns":6,"title":"File:TF2 Granary Map.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/d0/TF2_Granary_Map.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:TF2_Granary_Map.jpg"}]},"8369":{"pageid":8369,"ns":6,"title":"File:TF2 Hydro Map.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e8/TF2_Hydro_Map.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:TF2_Hydro_Map.jpg"}]},"8379":{"pageid":8379,"ns":6,"title":"File:TF2 Well Map.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/b/b9/TF2_Well_Map.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:TF2_Well_Map.jpg"}]},"8366":{"pageid":8366,"ns":6,"title":"File:Tf2 gravelpit.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e4/Tf2_gravelpit.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Tf2_gravelpit.jpg"}]},"11577":{"pageid":11577,"ns":6,"title":"File:Tg arenawell.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/4/4a/Tg_arenawell.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Tg_arenawell.jpg"}]},"8487":{"pageid":8487,"ns":6,"title":"File:Watch 01.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/8/86/Watch_01.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Watch_01.jpg"}]},
"156491":{"pageid":156491,"ns":6,"title":"File:Coal Town base.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/c/c2/Coal_Town_base.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Coal_Town_base.png"}]},"247346":{"pageid":247346,"ns":6,"title":"File:Cp cloak1.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/f/fa/Cp_cloak1.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Cp_cloak1.jpg"}]},"156634":{"pageid":156634,"ns":6,"title":"File:Decoy base.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e1/Decoy_base.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Decoy_base.png"}]},"57806":{"pageid":57806,"ns":6,"title":"File:Enviromental death Saw Blades.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e3/Enviromental_death_Saw_Blades.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Enviromental_death_Saw_Blades.png"}]},"158120":{"pageid":158120,"ns":6,"title":"File:Example5.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/9/95/Example5.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Example5.png"}]},"168758":{"pageid":168758,"ns":6,"title":"File:Ghost Fort.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/f/f9/Ghost_Fort.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Ghost_Fort.png"}]},"46568":{"pageid":46568,"ns":6,"title":"File:Item test.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/73/Item_test.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Item_test.jpg"}]},"35116":{"pageid":35116,"ns":6,"title":"File:KOTH Harvest Farmhouse.PNG","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/d3/KOTH_Harvest_Farmhouse.PNG","descriptionurl":"http://wiki.teamfortress.com/wiki/File:KOTH_Harvest_Farmhouse.PNG"}]},"152770":{"pageid":152770,"ns":6,"title":"File:Kong King.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/b/b4/Kong_King.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Kong_King.png"}]},"49222":{"pageid":49222,"ns":6,"title":"File:Koth harvest event mid.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/8/8c/Koth_harvest_event_mid.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Koth_harvest_event_mid.jpg"}]},"66109":{"pageid":66109,"ns":6,"title":"File:Koth lakeside.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/f/fc/Koth_lakeside.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Koth_lakeside.jpg"}]},"238751":{"pageid":238751,"ns":6,"title":"File:Mannhattan preview.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/d4/Mannhattan_preview.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Mannhattan_preview.png"}]},"155639":{"pageid":155639,"ns":6,"title":"File:Mannworks base.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/3/31/Mannworks_base.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Mannworks_base.jpg"}]},"8851":{"pageid":8851,"ns":6,"title":"File:Map TR Training.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/e/e8/Map_TR_Training.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Map_TR_Training.png"}]},"178212":{"pageid":178212,"ns":6,"title":"File:Mvm bigrock.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/6/6b/Mvm_bigrock.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Mvm_bigrock.png"}]},"167139":{"pageid":167139,"ns":6,"title":"File:Mvm coaltown event.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/d/d0/Mvm_coaltown_event.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Mvm_coaltown_event.jpg"}]},"5972":{"pageid":5972,"ns":6,"title":"File:Nucleus.PNG","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/1/13/Nucleus.PNG","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Nucleus.PNG"}]},"239721":{"pageid":239721,"ns":6,"title":"File:Rottenburg.png","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/a/a9/Rottenburg.png","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Rottenburg.png"}]},"147341":{"pageid":147341,"ns":6,"title":"File:Sd doomsday ingame 1.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/7/7c/Sd_doomsday_ingame_1.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Sd_doomsday_ingame_1.jpg"}]},"11605":{"pageid":11605,"ns":6,"title":"File:Tr dustbowl0003.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/6/67/Tr_dustbowl0003.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Tr_dustbowl0003.jpg"}]},"8481":{"pageid":8481,"ns":6,"title":"File:Viaduct 01.jpg","imagerepository":"local","imageinfo":[{"url":"http://wiki.teamfortress.com/w/images/c/c9/Viaduct_01.jpg","descriptionurl":"http://wiki.teamfortress.com/wiki/File:Viaduct_01.jpg"}]}
};
var pageids = Object.keys(pages);
for (var i=0; i<pageids.length; i++){
var page = pages[pageids[i]];
if(page.imageinfo){
console.log('curl '+page.imageinfo[0].url+' > '+desired[page.title]);
} else{
console.log('# '+page.title+' has no imageinfo');
}
}
*/
//phase 2 take a few: go back and alter data for any entries that use redirects (no imageinfo)
//phase 3: run resulting script
//phase 4
//console.log(maps);
//phase 5: manually rename cp_process_final.jpeg and edit the data accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment