-#! /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, Jun 1997 - Aug 2002. Copyright (C) 1997-2002 PhiloSoft Design
+This file is a part of Bookmarks database and Internet robot.
"""
+__version__ = "$Revision$"[11:-2]
+__revision__ = "$Id$"[5:-2]
+__date__ = "$Date$"[7:-2]
+__author__ = "Oleg Broytman <phd@phdru.name>"
+__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design"
+__license__ = "GNU GPL"
import sys, os
from getopt import getopt
def run():
optlist, args = getopt(sys.argv[1:], "is")
- show_pbar = not __debug__
+ show_pbar = True
report_stats = 1
for _opt, _arg in optlist:
if show_pbar:
try:
- size = os.stat(filename).st_size
+ size = os.path.getsize(filename)
except:
print filename, ": no such file"
sys.exit(1)
lng = lng + len(line) + dos_add
pbar.display(lng)
- line = line.strip()
+ #line = line.strip()
line_no = line_no + 1
try: