import optparse
import os
import re
import sys

def main():
    output_filename = sys.argv[1]
    input_filenames = sys.argv[2:]
    for input_filename in input_filenames:
        class_name, ext = os.path.splitext(os.path.basename(input_filename))
        with open(input_filename) as input_file:
            input_text = input_file.read()
            hex_values = ['0x{0:02x}'.format(ord(char)) for char in input_text]
            contents.append('const unsigned char kSourceOf%s[] = {\n    %s\n};\n\n' % (
                class_name, ', '.join(hex_values)))
                
if __name__ == '__main__':
    sys.exit(main())

@@ -122,16 +122,35 @@
 rgv%5B2:%5D%0A
+    contents = %5B%5D%0A%0A
     for 
@@ -573,16 +573,111 @@
 lues)))%0A
+    output = open(output_filename, %22w%22)%0A    output.write(%22%22.join(contents))%0A    output.close()%0A
         

Update js2string.py