OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # coding: utf-8 | 2 # coding: utf-8 |
3 | 3 |
4 import sys, os, codecs, re, json, argparse | 4 import sys, os, codecs, re, json, argparse |
5 import xml.dom.minidom as minidom | 5 import xml.dom.minidom as minidom |
6 baseDir = os.path.abspath(os.path.dirname(__file__)) | 6 baseDir = os.path.abspath(os.path.dirname(__file__)) |
7 sys.path.append(os.path.join(baseDir, 'adblockplus', 'buildtools', 'jshydra')) | 7 sys.path.append(os.path.join(baseDir, 'adblockplus', 'buildtools', 'jshydra')) |
8 from abp_rewrite import doRewrite | 8 from abp_rewrite import doRewrite |
9 | 9 |
10 def toCString(string): | 10 def toCString(string): |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 parser.add_argument('--before', metavar='verbatim_file', nargs='+', | 67 parser.add_argument('--before', metavar='verbatim_file', nargs='+', |
68 help='JavaScript file to include verbatim at the beginning') | 68 help='JavaScript file to include verbatim at the beginning') |
69 parser.add_argument('--convert', metavar='file_to_convert', nargs='+', | 69 parser.add_argument('--convert', metavar='file_to_convert', nargs='+', |
70 help='JavaScript files to convert') | 70 help='JavaScript files to convert') |
71 parser.add_argument('--after', metavar='verbatim_file', nargs='+', | 71 parser.add_argument('--after', metavar='verbatim_file', nargs='+', |
72 help='JavaScript file to include verbatim at the end') | 72 help='JavaScript file to include verbatim at the end') |
73 parser.add_argument('output_file', | 73 parser.add_argument('output_file', |
74 help='output from the conversion') | 74 help='output from the conversion') |
75 args = parser.parse_args() | 75 args = parser.parse_args() |
76 convert(args.before, args.convert, args.after, args.output_file) | 76 convert(args.before, args.convert, args.after, args.output_file) |
OLD | NEW |