eric7.WebBrowser.Bookmarks.BookmarksImporters.ChromeImporter

Module implementing an importer for Chrome bookmarks.

Global Attributes

None

Classes

ChromeImporter Class implementing the Chrome bookmarks importer.

Functions

createImporter Constructor
getImporterInfo Module function to get information for the given source id.


ChromeImporter

Class implementing the Chrome bookmarks importer.

Derived from

BookmarksImporter

Class Attributes

None

Class Methods

None

Methods

ChromeImporter Constructor
__generateFolderNode Private method to process a bookmarks folder.
__generateUrlNode Private method to process a bookmarks node.
__processRoots Private method to process the bookmark roots.
importedBookmarks Public method to get the imported bookmarks.
open Public method to open the bookmarks file.
setPath Public method to set the path of the bookmarks file or directory.

Static Methods

None

ChromeImporter (Constructor)

ChromeImporter(sourceId="", parent=None)

Constructor

sourceId (str (optional))
source ID (defaults to "")
parent (QObject (optional))
reference to the parent object (defaults to None)

ChromeImporter.__generateFolderNode

__generateFolderNode(data, rootNode)

Private method to process a bookmarks folder.

data (dict)
dictionary with the bookmarks data
rootNode (BookmarkNode)
node to add the bookmarks to

ChromeImporter.__generateUrlNode

__generateUrlNode(data, rootNode)

Private method to process a bookmarks node.

data (dict)
dictionary with the bookmarks data
rootNode (BookmarkNode)
node to add the bookmarks to

ChromeImporter.__processRoots

__processRoots(data, rootNode)

Private method to process the bookmark roots.

data (dict)
dictionary with the bookmarks data
rootNode (BookmarkNode)
node to add the bookmarks to

ChromeImporter.importedBookmarks

importedBookmarks()

Public method to get the imported bookmarks.

Return:
imported bookmarks
Return Type:
BookmarkNode

ChromeImporter.open

open()

Public method to open the bookmarks file.

Return:
flag indicating success
Return Type:
bool

ChromeImporter.setPath

setPath(path)

Public method to set the path of the bookmarks file or directory.

path (str)
bookmarks file or directory
Up


createImporter

createImporter(sourceId="", parent=None)

Constructor

sourceId (str (optional))
source ID (defaults to "")
parent (QObject (optional))
reference to the parent object (defaults to None)
Return:
reference to the instantiated importer object
Return Type:
ChromeImporter
Up


getImporterInfo

getImporterInfo(sourceId)

Module function to get information for the given source id.

sourceId (str)
id of the browser
Return:
tuple with an icon, readable name, name of the default bookmarks file, an info text, a prompt and the default directory of the bookmarks file
Return Type:
tuple of (QPixmap, str, str, str, str, str)
Raises ValueError:
raised to indicate an invalid browser ID
Up