]> git.phdru.name Git - bookmarks_db.git/blobdiff - bkmk2db.py
Copy third-party modules to the source tree.
[bookmarks_db.git] / bkmk2db.py
index e2436f6a4ec06130b46cbae357ebed86d185c4a8..946dfbdf96e3a9bdaa46d3b8d811908616668ac3 100755 (executable)
@@ -1,8 +1,8 @@
-#! /usr/local/bin/python -O
+#! /usr/bin/env python
 """
    Convert Netscape Navigator's or Mozilla's bookmarks.html to a database
 
-   Written by BroytMann, Jun 1997 - Aug 2002. Copyright (C) 1997-2002 PhiloSoft Design
+   Written by Broytman. Copyright (C) 1997-2003 PhiloSoft Design
 """
 
 
@@ -14,7 +14,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 +55,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)
@@ -84,7 +84,7 @@ def run():
          lng = lng + len(line) + dos_add
          pbar.display(lng)
 
-      line = line.strip()
+      #line = line.strip()
       line_no = line_no + 1
 
       try: