"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design"
__license__ = "GNU GPL"
import sys
output_filename = writer.filename
transl = 0
- transl_name = "" # dictionary translation; default is no translation
+ transl_name = "" # dictionary translation; default is no translation
for _opt, _arg in optlist:
if _opt == '-s':
sys.stdout.write("Writing %s: " % output_filename)
sys.stdout.flush()
-
if transl:
new_ext = str(transl)
transl_d = {}
from m_lib.flad import fladm
transl_db = fladm.load_from_file(transl_name, fladm.check_record, ["URL1", "URL2"], [""])
- # This prevents any other key to appear in transl_db ^
+ # This prevents any other key to appear in transl_db ^
# Generate translation dictionary (hash table)
if transl == 1:
else:
raise ValueError("transl (%d) must be 1 or 2" % transl)
- del transl_db # Save few bytes of memory
+ del transl_db # Save few bytes of memory
from bkmk_objects import Walker
+
class Transl(Walker):
- def __init__(self, transl_d):
+ def __init__(self, transl_d): # noqa: E306 expected 1 blank line
self.transl_d = transl_d
def bookmark(self, b, level):
root_folder.walk_depth(Transl(transl_d))
-
outfile = open(output_filename, 'w')
root_folder.walk_depth(writer(outfile, prune))
outfile.close()