<s> import sys <EOL> import subprocess <EOL> import re <EOL> import os <EOL> import shutil <EOL> import json <EOL> from collections import OrderedDict <EOL> if len ( sys . argv ) < <NUM_LIT:2> : <EOL> print "<STR_LIT>" <EOL> sys . exit ( ) <EOL> path = sys . argv [ <NUM_LIT:1> ] <EOL> data = json . loads ( open ( path ) . read ( ) , object_pairs_hook = OrderedDict ) <EOL> for appIndex , app in enumerate ( data [ '<STR_LIT>' ] ) : <EOL> appKeys = app . keys ( ) <EOL> for keyIndex , key in enumerate ( appKeys ) : <EOL> if not key in [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] : <EOL> app . pop ( key , None ) <EOL> for actionIndex , action in enumerate ( data [ '<STR_LIT>' ] ) : <EOL> actionKeys = action . keys ( ) <EOL> for keyIndex , key in enumerate ( actionKeys ) : <EOL> if not key in [ "<STR_LIT:title>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] : <EOL> action . pop ( key , None ) <EOL> for format in action [ '<STR_LIT>' ] : <EOL> formatKeys = format . keys ( ) <EOL> for keyIndex , key in enumerate ( formatKeys ) : <EOL> if not key in [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] : <EOL> format . pop ( key , None ) <EOL> if '<STR_LIT>' in data : <EOL> for browserIndex , browser in enumerate ( data [ '<STR_LIT>' ] ) : <EOL> browserKeys = browser . keys ( ) <EOL> for keyIndex , key in enumerate ( browserKeys ) : <EOL> if not key in [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] : <EOL> browser . pop ( key , None ) <EOL> data = json . dumps ( data , separators = ( '<STR_LIT:U+002C>' , '<STR_LIT::>' ) ) <EOL> open ( path . replace ( '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT:w>' ) . write ( data ) </s>
