1 # -*- coding: utf-8 -*-
4 #------------------------------------
5 # import des modules python
6 #------------------------------------
7 from optparse import OptionParser
10 parser = OptionParser()
11 parser.add_option("-f", "--file", dest="filename",
12 help="open FILE", metavar="FILE", default=False)
13 parser.add_option("-b", "--whiteblack", dest='b', default=False, action='store_true')
15 (options, args) = parser.parse_args()
17 with open(options.filename, 'r') as f :
20 def correct_police(content) :
21 return content.replace('Arial Black','Arial')
23 content = correct_police(content)
25 def inverse_b_nb(content) :
26 return content.replace('#000000','#NOIRNOIRNOIR').replace('#ffffff','#000000').replace('#NOIRNOIRNOIR','#ffffff')
29 content = inverse_b_nb(content)
32 with open(options.filename, 'w') as f :