+ dict = {}
+ comment = getattr(b, 'comment')
+ if comment: dict["annos"] = make_annos(comment)
+ charset = getattr(b, 'charset')
+ if charset: dict["charset"] = charset
+ dict["dateAdded"] = b.add_date
+ dict["id"] = b.id
+ index = getattr(b, 'index')
+ if index: dict["index"] = index
+ keyword = getattr(b, 'keyword')
+ if keyword: dict["keyword"] = keyword
+ dict["lastModified"] = b.last_modified
+ dict["parent"] = b.parent_idx
+ dict["title"] = b.name.decode('utf-8')
+ 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:folder=BOOKMARKS_MENU') \
+ or uri.startswith('place://folder=BOOKMARKS_MENU'):
+ value = 'RecentlyBookmarked'
+ elif uri.startswith('place:sort=14') \
+ or uri.startswith('place://sort=14'):
+ value = 'RecentTags'
+ dict["annos"] = make_annos(value, name='Places/SmartBookmark')
+ del dict["dateAdded"]
+ del dict["lastModified"]
+ self.folder_stack[-1].append(dict)