]> git.phdru.name Git - bookmarks_db.git/blob - check_new.py
This commit was manufactured by cvs2svn to create tag 'version2'.
[bookmarks_db.git] / check_new.py
1 #! /usr/local/bin/python -O
2 """
3    Test FLAD database for old records
4
5    Written by BroytMann, Feb 2000. Copyright (C) 2000 PhiloSoft Design
6 """
7
8
9 import fladm
10 from time import time
11
12 now = time()
13 thrashold = 2*24*3600 # 2 days
14
15
16 def run():
17    bookmarks_db = fladm.load_from_file("bookmarks.db", fladm.check_record, ["Level"])
18
19    for record in bookmarks_db:
20       if record.has_key("URL"):
21          add_date = int(record["AddDate"])
22          if now - add_date < thrashold:
23             print "New URL:", record["URL"]
24
25
26 if __name__ == '__main__':
27    run()