X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bkmk2db.py;h=e3971a6b3177c53368b93d04674515b7eda12e5c;hb=e22c9b34182445a2ce878453d6be1cf52d467661;hp=721371b3ced78092eac15042d3afc472e2d3d04e;hpb=ef7c03ab627cd2aae229f44b66b02978e936f649;p=bookmarks_db.git diff --git a/bkmk2db.py b/bkmk2db.py index 721371b..e3971a6 100755 --- a/bkmk2db.py +++ b/bkmk2db.py @@ -5,8 +5,10 @@ This file is a part of Bookmarks database and Internet robot. """ from __future__ import print_function -import sys, os from getopt import getopt +import os +import sys + from bkmk_parser import BkmkParser @@ -40,8 +42,8 @@ def run(): filename = args[0] else: - filename = 'bookmarks.html' # good name both for DOS (bookmark.htm) and UNIX - + # good name both for DOS (bookmark.htm) and UNIX + filename = 'bookmarks.html' if report_stats: from storage import storage_name @@ -64,7 +66,6 @@ def run(): print(filename, ": no such file") sys.exit(1) - if show_pbar: pbar = ttyProgressBar(0, size) lng = 0 @@ -73,8 +74,7 @@ def run(): if os.name == 'dos' or os.name == 'nt': dos_add = 1 else: - dos_add = 0 # UNIX' and Mac's len() counts CR or LF correct - + dos_add = 0 # UNIX' and Mac's len() counts CR or LF correct infile = open(filename, 'r') parser = BkmkParser() @@ -88,7 +88,7 @@ def run(): lng = lng + len(line) + dos_add pbar.display(lng) - #line = line.strip() + # line = line.strip() line_no = line_no + 1 try: