def run(bk): try: px2em = Px2Em() for id_file, href in bk.css_iter(): if bk.launcher_version() <= 20151001: # Sigil-0.8.901 data = bk.readfile(id_file).decode('utf-8') else: data = bk.readfile(id_file) px2em._read(data) px2em._replace() px2em._update(bk, id_file) except: print(str(sys.exc_info()[0]) + " : " + str(sys.exc_info()[1])) return 0