Created
February 26, 2015 16:05
-
-
Save vlandham/45c5092bb52d4fe5ed45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name":"A Better Tomorrow", | |
"id":"ABetterTomorrow" | |
}, | |
{ | |
"name":"A Boy and His Dog", | |
"id":"ABoyAndHisDog" | |
}, | |
{ | |
"name":"A Bridge Too Far", | |
"id":"ABridgeTooFar" | |
}, | |
{ | |
"name":"A Bug's Life", | |
"id":"ABugsLife" | |
}, | |
{ | |
"name":"A Car's Life: Sparky's Big Adventure", | |
"id":"ACarsLifeSparkysBigAdventure" | |
}, | |
{ | |
"name":"A Cat in Paris", | |
"id":"ACatInParis" | |
}, | |
{ | |
"name":"A Christmas Story", | |
"id":"AChristmasStory" | |
}, | |
{ | |
"name":"A Clockwork Orange", | |
"id":"AClockworkOrange" | |
}, | |
{ | |
"name":"A Cure For Pokeritis", | |
"id":"ACureForPokeritis" | |
}, | |
{ | |
"name":"A Dangerous Method", | |
"id":"ADangerousMethod" | |
}, | |
{ | |
"name":"A Day At The Races", | |
"id":"ADayAtTheRaces" | |
}, | |
{ | |
"name":"A Dogs Life", | |
"id":"ADogsLife" | |
}, | |
{ | |
"name":"A Fairly Odd Movie: Grow Up, Timmy Turner!", | |
"id":"AFairlyOddMovieGrowUpTimmyTurner" | |
}, | |
{ | |
"name":"A Few Good Men", | |
"id":"AFewGoodMen" | |
}, | |
{ | |
"name":"A Fine Mess", | |
"id":"AFineMess" | |
}, | |
{ | |
"name":"A Fish Called Wanda", | |
"id":"AFishCalledWanda" | |
}, | |
{ | |
"name":"A Fistful of Dollars", | |
"id":"AFistfulOfDollars" | |
}, | |
{ | |
"name":"A Funny Thing Happened on the Way to the Forum", | |
"id":"AFunnyThingHappenedOnTheWayToTheForum" | |
}, | |
{ | |
"name":"A Gnome Named Gnorm", | |
"id":"AGnomeNamedGnorm" | |
}, | |
{ | |
"name":"A Goofy Movie", | |
"id":"AGoofyMovie" | |
}, | |
{ | |
"name":"A Hard Day's Night", | |
"id":"AHardDaysNight" | |
}, | |
{ | |
"name":"A History of Violence", | |
"id":"AHistoryOfViolence" | |
}, | |
{ | |
"name":"A Kid in King Arthur's Court", | |
"id":"AKidInKingArthursCourt" | |
}, | |
{ | |
"name":"A League of Their Own", | |
"id":"ALeagueOfTheirOwn" | |
}, | |
{ | |
"name":"A Letter To Three Wives", | |
"id":"ALetterToThreeWives" | |
}, | |
{ | |
"name":"A Life Less Ordinary", | |
"id":"ALifeLessOrdinary" | |
}, | |
{ | |
"name":"A Little Princess", | |
"id":"ALittlePrincess" | |
}, | |
{ | |
"name":"A Matter of Loaf and Death", | |
"id":"AMatterOfLoafAndDeath" | |
}, | |
{ | |
"name":"A Midnight Clear", | |
"id":"AMidnightClear" | |
}, | |
{ | |
"name":"A Midsummer Night's Dream", | |
"id":"AMidsummerNightsDream" | |
}, | |
{ | |
"name":"A Monster in Paris", | |
"id":"AMonsterInParis" | |
}, | |
{ | |
"name":"A New Hope", | |
"id":"ANewHope" | |
}, | |
{ | |
"name":"A Night at the Opera", | |
"id":"ANightAtTheOpera" | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
starting_dir = ARGV[0] | |
trope_files = Dir.glob(File.join(starting_dir, "*.json")) | |
all = [] | |
trope_files.each do |trope_file| | |
trope_data = JSON.parse(File.open(trope_file,'r').read) | |
puts trope_data['adjectives'].length | |
adjs = trope_data['adjectives'][0..4].map {|a| a[0]} | |
trope = {"id":trope_data['id'], "name":trope_data['name'], "adjs":adjs} | |
all.push trope | |
end | |
File.open("all.json", 'w') do |file| | |
file.puts JSON.pretty_generate(JSON.parse(all.to_json)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "AbsentMindedProfessor", | |
"name": "Absent Minded Professor", | |
"adjs": [ | |
"absent-minded", | |
"mathematical", | |
"scientific", | |
"flighty", | |
"brilliant" | |
] | |
}, | |
{ | |
"id": "AcceptableFeminineGoalsAndTraits", | |
"name": "Acceptable Feminine Goals And Traits", | |
"adjs": [ | |
"strong", | |
"wrench", | |
"masculine", | |
"female", | |
"certain" | |
] | |
}, | |
{ | |
"id": "AccidentalPornomancer", | |
"name": "Accidental Pornomancer", | |
"adjs": [ | |
"weird", | |
"inconsequential", | |
"non-consensual", | |
"apathetic", | |
"ditzy" | |
] | |
}, | |
{ | |
"id": "ActionDad", | |
"name": "Action Dad", | |
"adjs": [ | |
"beat", | |
"touch", | |
"protective", | |
"kid", | |
"main" | |
] | |
}, | |
{ | |
"id": "ActionGirl", | |
"name": "Action Girl", | |
"adjs": [ | |
"curb-stomp", | |
"very", | |
"far-more-aggressive", | |
"full-on", | |
"helpless" | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment