X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bkmk2db.py;h=5a96d7f1f7926496cb8fbe5bcd34a8b5002207b2;hb=e784339181e160ebaf4ee5e21e00c50712823421;hp=58031c0531be145917168cf3f1939230700d4165;hpb=4255ead7de9ed5069f94b90cb134a077387d43c1;p=bookmarks_db.git diff --git a/bkmk2db.py b/bkmk2db.py index 58031c0..5a96d7f 100755 --- a/bkmk2db.py +++ b/bkmk2db.py @@ -1,12 +1,14 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 """Convert Netscape Navigator's or Mozilla's bookmarks.html to a database 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 @@ -75,7 +76,6 @@ def run(): else: dos_add = 0 # UNIX' and Mac's len() counts CR or LF correct - infile = open(filename, 'r') parser = BkmkParser()