<s> """<STR_LIT>""" <EOL> import json <EOL> from django . core . management . base import NoArgsCommand <EOL> import desktop . urls <EOL> from desktop . lib . metrics import global_registry <EOL> class Command ( NoArgsCommand ) : <EOL> def handle_noargs ( self , ** options ) : <EOL> """<STR_LIT>""" <EOL> registry = global_registry ( ) <EOL> definitions = [ ] <EOL> for schema in registry . schemas : <EOL> definitions . extend ( schema . to_json ( ) ) <EOL> definitions . sort ( lambda a , b : cmp ( a [ '<STR_LIT>' ] , b [ '<STR_LIT>' ] ) ) <EOL> d = { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:version>' : <NUM_LIT:1> , <EOL> '<STR_LIT>' : [ ] , <EOL> '<STR_LIT>' : [ <EOL> { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : definitions , <EOL> } , <EOL> ] , <EOL> } <EOL> print json . dumps ( d ) </s>
