X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bkmk2db.py;h=b8905324ab2d620b04acb03b57dfc920390d54f0;hb=97202bf84e9c78d8fac912a82a85fb1cbb233a4b;hp=1e652828692665bfeb64ae242bdb0ca0f9774dbd;hpb=391f68ebaffbf017768a2ca64b4a2aded8a94e41;p=bookmarks_db.git diff --git a/bkmk2db.py b/bkmk2db.py index 1e65282..b890532 100755 --- a/bkmk2db.py +++ b/bkmk2db.py @@ -1,20 +1,24 @@ -#! /usr/local/bin/python -O -""" - Convert Netscape Navigator's or Mozilla's bookmarks.html to a database +#! /usr/bin/env python +"""Convert Netscape Navigator's or Mozilla's bookmarks.html to a database - Written by BroytMann. Copyright (C) 1997-2003 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ - +from __future__ import print_function import sys, os from getopt import getopt from bkmk_parser import BkmkParser +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2017 PhiloSoft Design" +__license__ = "GNU GPL" + + def run(): optlist, args = getopt(sys.argv[1:], "is") - show_pbar = not __debug__ + show_pbar = True report_stats = 1 for _opt, _arg in optlist: @@ -57,7 +61,7 @@ def run(): try: size = os.path.getsize(filename) except: - print filename, ": no such file" + print(filename, ": no such file") sys.exit(1) @@ -104,10 +108,10 @@ def run(): del pbar if report_stats: - print "Ok" - print line_no, "lines proceed" - print parser.urls, "urls found" - print parser.objects, "objects created" + print("Ok") + print(line_no, "lines proceed") + print(parser.urls, "urls found") + print(parser.objects, "objects created") if ok: from storage import storage