updated standard lengths
[public/misc-sysadmin.git] / save_firefox_urls.py
index c28857ec29b2d9bd5a32e70470dd9013188d4359..57cf0cf6156bc1579ecaf55652262a8f332b22d4 100755 (executable)
@@ -17,7 +17,10 @@ import time
 
 ts = time.strftime("%Y-%m-%d-%H:%M:%S")
 
-profile = "default"
+if len(sys.argv) == 2:
+    profile = sys.argv[1]
+else:
+    profile = "default"
 basedir = os.environ['HOME'] + "/.mozilla/firefox/"
 histdir = os.environ['HOME'] + "/mozhistory";
 if not os.path.exists(histdir): 
@@ -65,9 +68,9 @@ for w in range(windows):
                 continue
             print ("    Found:")
             print ("      Entry: " + str(e))
-            print ("      Title: " + title)
             print ("      Url  : " + url)
-            outfp.write( str(w) + " " + str(t) + " " + str(e) + " " + title + " " + url + "\n")
+            print ("      Title: " + title)
+            outfp.write( str(w) + " " + str(t) + " " + str(e) + " " + url + " \"" + title + "\"\n")
 
 outfp.close()
 print ("Saved as " + outfile)