]> git.phdru.name Git - bookmarks_db.git/blobdiff - bkmk2db.py
Minor refactoring
[bookmarks_db.git] / bkmk2db.py
index 3f2f25a77d30bdf0db9560348d7b605ccb8a3148..34fca60d21fa8ced2434430a1c0de314440d4f33 100755 (executable)
@@ -1,10 +1,12 @@
-#! /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.
 """
 
+__author__ = "Oleg Broytman <phd@phdru.name>"
+__copyright__ = "Copyright (C) 1997-2012 PhiloSoft Design"
+__license__ = "GNU GPL"
 
 import sys, os
 from getopt import getopt
@@ -14,7 +16,7 @@ from bkmk_parser import BkmkParser
 def run():
    optlist, args = getopt(sys.argv[1:], "is")
 
-   show_pbar = not __debug__
+   show_pbar = True
    report_stats = 1
 
    for _opt, _arg in optlist:
@@ -55,7 +57,7 @@ def run():
 
    if show_pbar:
       try:
-         size = os.stat(filename).st_size
+         size = os.path.getsize(filename)
       except:
          print filename, ": no such file"
          sys.exit(1)