<s> from google . appengine . ext import webapp <EOL> from google . appengine . ext . webapp import util <EOL> import crx <EOL> import os <EOL> class MainHandler ( webapp . RequestHandler ) : <EOL> def get ( self ) : <EOL> self . response . out . write ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> class CrxHandler ( webapp . RequestHandler ) : <EOL> def get ( self ) : <EOL> zipper = crx . Zipper ( ) <EOL> packager = crx . Packager ( ) <EOL> key = crx . SigningKey . getOrCreate ( ) <EOL> base_dir = os . path . realpath ( os . path . dirname ( __file__ ) ) <EOL> extension_dir = os . path . join ( base_dir , "<STR_LIT>" ) <EOL> extension = packager . package ( zipper . zip ( extension_dir ) , key ) <EOL> self . response . headers [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> self . response . out . write ( extension ) <EOL> def main ( ) : <EOL> application = webapp . WSGIApplication ( [ <EOL> ( '<STR_LIT:/>' , MainHandler ) , <EOL> ( '<STR_LIT>' , CrxHandler ) , <EOL> ] , debug = True ) <EOL> util . run_wsgi_app ( application ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
