def parseSidebarlistsPlist(self, mru_file): plist = self.load_bplist(mru_file) if plist == None: return [] aliases = [] try: for n, item in enumerate(plist["systemitems"]['VolumesList']): try: aliases.append( Alias(data=plist["systemitems"]['VolumesList'][n] ['Alias']).parse()) except Exception as e: pass except: pass try: for n, item in enumerate(plist["favorites"]['VolumesList']): try: pass aliases.append( Alias(data=plist["systemitems"]['VolumesList'][n] ['Alias']).parse()) except: pass except: pass return aliases
def parseMSOffice2011Plist(self, mru_file): plist = self.load_bplist(mru_file) if plist == None: return [] aliases = [] try: for n, item in enumerate(plist["14\File MRU\MSWD"]): aliases.append(Alias(data=item["File Alias"]).parse()) except: pass try: for n, item in enumerate(plist["14\File MRU\XCEL"]): aliases.append(Alias(data=item["File Alias"]).parse()) except: pass try: for n, item in enumerate(plist["14\File MRU\PPT3"]): aliases.append(Alias(data=item["File Alias"]).parse()) except: pass return aliases
def parseRecentItemsPlist(self, mru_file): plist = self.load_bplist(mru_file) if plist == None: return [], [] bookmarks = [] aliases = [] try: for n, item in enumerate( plist["RecentApplications"]["CustomListItems"]): bookmarks.append(Bookmark(data=item["Bookmark"]).parse()) except: pass try: for n, item in enumerate( plist["RecentDocuments"]["CustomListItems"]): bookmarks.append(Bookmark(data=item["Bookmark"]).parse()) except: pass try: for n, item in enumerate( plist["RecentServers"]["CustomListItems"]): bookmarks.append(Bookmark(data=item["Bookmark"]).parse()) except: pass try: for n, item in enumerate(plist["Applications"]["CustomListItems"]): aliases.append(Alias(data=item["Alias"]).parse()) except: pass try: for n, item in enumerate(plist["Documents"]["CustomListItems"]): aliases.append(Alias(data=item["Alias"]).parse()) except: pass try: for n, item in enumerate(plist["Servers"]["CustomListItems"]): aliases.append(Alias(data=item["Alias"]).parse()) except: pass return bookmarks, aliases
def parseFinderPlist(self, mru_file): plist = self.load_bplist(mru_file) if plist == None: return [], [] bookmarks = [] aliases = [] try: for n, item in enumerate(plist["FXRecentFolders"]): try: bookmarks.append( Bookmark(data=item["file-bookmark"]).parse()) except: pass try: pass aliases.append( Alias( data=item["file-data"]["_CFURLAliasData"]).parse()) except: pass except: pass return bookmarks, aliases