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) 2010, 2011 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2010-2012 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['storage_json']
dict["type"] = "text/x-moz-place"
dict["uri"] = uri = b.href
if uri.startswith('place:'):
- if uri.startswith('place:sort=8') \
- or uri.startswith('place://sort=8'):
- value = 'MostVisited'
- elif uri.startswith('place://redirectsMode'):
- value = 'Most Visited'
- elif uri.startswith('place:folder=BOOKMARKS_MENU') \
- or uri.startswith('place://folder=BOOKMARKS_MENU'):
- value = 'RecentlyBookmarked'
- elif uri.startswith('place://folder'):
+ if uri.startswith('place:folder'):
value = 'Recently Bookmarked'
- elif uri.startswith('place:sort=14') \
- or uri.startswith('place://sort=14'):
- value = 'RecentTags'
- elif uri.startswith('place://type'):
+ elif uri.startswith('place:sort=8') or \
+ uri.startswith('place:redirectsMode'):
+ value = 'Most Visited'
+ elif uri.startswith('place:sort=14') or \
+ uri.startswith('place:type=6'):
value = 'Recent Tags'
else:
raise ValueError('UNKNOWN place URI: %s' % uri)
return ''
for a in annos:
- if a["name"] == "bookmarkProperties/description" and \
- a["type"] == 3:
+ if a["name"] == "bookmarkProperties/description":
return a["value"].encode('utf-8')
return ''