else:
filename = 'bookmarks.html' # good name both for DOS (bookmark.htm) and UNIX
-
if report_stats:
from storage import storage_name
sys.stdout.write("Converting %s to %s: " % (filename, storage_name))
print(filename, ": no such file")
sys.exit(1)
-
if show_pbar:
pbar = ttyProgressBar(0, size)
lng = 0
else:
dos_add = 0 # UNIX' and Mac's len() counts CR or LF correct
-
infile = open(filename, 'r')
parser = BkmkParser()
if report_stats:
print("Ok")
-
dup_dict = {}
for object_no in range(objects):
else:
dup_dict[href] = object_no
-
if log_filename:
log_file.close()
if report_stats:
print("Ok")
-
for object_no in range(objects):
object = root_folder.linear[object_no]
print("NO REAL TITLE!!!")
print()
-
if report_stats:
print(objects, "objects passed")
sys.stdout.write("Writing %s: " % output_filename)
sys.stdout.flush()
-
if transl:
new_ext = str(transl)
transl_d = {}
root_folder.walk_depth(Transl(transl_d))
-
outfile = open(output_filename, 'w')
root_folder.walk_depth(writer(outfile, prune))
outfile.close()
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2002-2017 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2002-2023 PhiloSoft Design"
__license__ = "GNU GPL"
pass
if report_stats:
- print("Broytman set-real_title, Copyright (C) 2003-2017 PhiloSoft Design")
+ print("Broytman set-real_title, Copyright (C) 2003-2023 PhiloSoft Design")
if args:
sys.stderr.write("set-real_title: too many arguments\n")
if report_stats:
print("Ok")
-
changed = 0
for object_no in range(objects):
object = root_folder.linear[object_no]
object.name = real_title
changed += 1
-
if changed and report_stats:
sys.stdout.write("Saving %s: " % storage.filename)
sys.stdout.flush()
title_list_file.close()
-
from storage import storage
storage = storage()
if report_stats:
print("Ok")
-
# Run through the list of objects and check URLs/titles
changed = 0
for object_no in range(objects):
object.name = name
changed += 1
-
if changed and report_stats:
sys.stdout.write("Saving %s: " % storage.filename)
sys.stdout.flush()