]> git.phdru.name Git - bookmarks_db.git/blobdiff - bkmk-add.py
Add ChangeLog
[bookmarks_db.git] / bkmk-add.py
index 6bd02c5cac0331a3bdae97e59d6ce72c5bc079ab..fd9723b4a3dd3b686781b5f07beb22d8ddb23fcf 100755 (executable)
@@ -1,18 +1,17 @@
 #! /usr/bin/env python
-"""
-   Add a bookmark to the database.
+"""Add a bookmark to the database
 
-   Written by BroytMann. Copyright (C) 2002-2007 PhiloSoft Design.
+This file is a part of Bookmarks database and Internet robot.
 """
 
+__author__ = "Oleg Broytman <phd@phdru.name>"
+__copyright__ = "Copyright (C) 2002-2012 PhiloSoft Design"
+__license__ = "GNU GPL"
 
 import sys, os, time
 from bkmk_objects import Bookmark
 from Robots.bkmk_rsimple import robot_simple
 
-import tempfile
-tempfname = "bkmk-add" + tempfile.gettempprefix() + "tmp"
-
 
 def run():
    from getopt import getopt
@@ -53,7 +52,7 @@ def run():
    bookmark = Bookmark(href, str(now), '0', '0')
    bookmark.name = ''
 
-   robot = robot_simple(tempfname, None)
+   robot = robot_simple(None)
 
    if robot.check_url(bookmark): # get real title and last modified date
       if title: # forced title
@@ -74,11 +73,5 @@ def run():
          print "Ok"
 
 
-   try:
-      os.unlink(tempfname)
-   except os.error:
-      pass
-
-
 if __name__ == '__main__':
    run()