Created
February 4, 2014 22:25
-
-
Save leafo/8813608 to your computer and use it in GitHub Desktop.
find missing candyjam games
This file contains hidden or 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
import GamesSearch, JamGames from require "models" | |
import get_all_pages from require "util" | |
pager = GamesSearch\text "candy" | |
all_games = get_all_pages pager | |
game_ids = table.concat [game.id for game in *all_games], ", " | |
print "Games #{#all_games}" | |
jgs = JamGames\select "where jam_id = 1" | |
print "Jam games #{#jgs}" | |
jgs_by_game_id = {jg.game_id, jg for jg in *jgs} | |
missing_games = for game in *all_games | |
continue if jgs_by_game_id[game.id] | |
game | |
print #missing_games |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment