|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Helpviewer.Bookmarks.BookmarksImporters.ChromeImporter</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Helpviewer.Bookmarks.BookmarksImporters.ChromeImporter</h1> |
|
23 <p> |
|
24 Module implementing an importer for Chrome bookmarks. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#ChromeImporter">ChromeImporter</a></td> |
|
34 <td>Class implementing the Chrome bookmarks importer.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr> |
|
40 <td><a href="#getImporterInfo">getImporterInfo</a></td> |
|
41 <td>Module function to get information for the given source id.</td> |
|
42 </tr> |
|
43 </table> |
|
44 <hr /><hr /> |
|
45 <a NAME="ChromeImporter" ID="ChromeImporter"></a> |
|
46 <h2>ChromeImporter</h2> |
|
47 <p> |
|
48 Class implementing the Chrome bookmarks importer. |
|
49 </p> |
|
50 <h3>Derived from</h3> |
|
51 BookmarksImporter |
|
52 <h3>Class Attributes</h3> |
|
53 <table> |
|
54 <tr><td>None</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#ChromeImporter.__init__">ChromeImporter</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#ChromeImporter.__generateFolderNode">__generateFolderNode</a></td> |
|
67 <td>Private method to process a bookmarks folder.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#ChromeImporter.__generateUrlNode">__generateUrlNode</a></td> |
|
70 <td>Private method to process a bookmarks node.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#ChromeImporter.__processRoots">__processRoots</a></td> |
|
73 <td>Private method to process the bookmark roots.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#ChromeImporter.importedBookmarks">importedBookmarks</a></td> |
|
76 <td>Public method to get the imported bookmarks.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#ChromeImporter.open">open</a></td> |
|
79 <td>Public method to open the bookmarks file.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#ChromeImporter.setPath">setPath</a></td> |
|
82 <td>Public method to set the path of the bookmarks file or directory.</td> |
|
83 </tr> |
|
84 </table> |
|
85 <h3>Static Methods</h3> |
|
86 <table> |
|
87 <tr><td>None</td></tr> |
|
88 </table> |
|
89 <a NAME="ChromeImporter.__init__" ID="ChromeImporter.__init__"></a> |
|
90 <h4>ChromeImporter (Constructor)</h4> |
|
91 <b>ChromeImporter</b>(<i>sourceId="", parent=None</i>) |
|
92 <p> |
|
93 Constructor |
|
94 </p><dl> |
|
95 <dt><i>sourceId</i></dt> |
|
96 <dd> |
|
97 source ID (string) |
|
98 </dd><dt><i>parent</i></dt> |
|
99 <dd> |
|
100 reference to the parent object (QObject) |
|
101 </dd> |
|
102 </dl><a NAME="ChromeImporter.__generateFolderNode" ID="ChromeImporter.__generateFolderNode"></a> |
|
103 <h4>ChromeImporter.__generateFolderNode</h4> |
|
104 <b>__generateFolderNode</b>(<i>data, rootNode</i>) |
|
105 <p> |
|
106 Private method to process a bookmarks folder. |
|
107 </p><dl> |
|
108 <dt><i>data</i></dt> |
|
109 <dd> |
|
110 dictionary with the bookmarks data (dict) |
|
111 </dd><dt><i>rootNode</i></dt> |
|
112 <dd> |
|
113 node to add the bookmarks to (BookmarkNode) |
|
114 </dd> |
|
115 </dl><a NAME="ChromeImporter.__generateUrlNode" ID="ChromeImporter.__generateUrlNode"></a> |
|
116 <h4>ChromeImporter.__generateUrlNode</h4> |
|
117 <b>__generateUrlNode</b>(<i>data, rootNode</i>) |
|
118 <p> |
|
119 Private method to process a bookmarks node. |
|
120 </p><dl> |
|
121 <dt><i>data</i></dt> |
|
122 <dd> |
|
123 dictionary with the bookmarks data (dict) |
|
124 </dd><dt><i>rootNode</i></dt> |
|
125 <dd> |
|
126 node to add the bookmarks to (BookmarkNode) |
|
127 </dd> |
|
128 </dl><a NAME="ChromeImporter.__processRoots" ID="ChromeImporter.__processRoots"></a> |
|
129 <h4>ChromeImporter.__processRoots</h4> |
|
130 <b>__processRoots</b>(<i>data, rootNode</i>) |
|
131 <p> |
|
132 Private method to process the bookmark roots. |
|
133 </p><dl> |
|
134 <dt><i>data</i></dt> |
|
135 <dd> |
|
136 dictionary with the bookmarks data (dict) |
|
137 </dd><dt><i>rootNode</i></dt> |
|
138 <dd> |
|
139 node to add the bookmarks to (BookmarkNode) |
|
140 </dd> |
|
141 </dl><a NAME="ChromeImporter.importedBookmarks" ID="ChromeImporter.importedBookmarks"></a> |
|
142 <h4>ChromeImporter.importedBookmarks</h4> |
|
143 <b>importedBookmarks</b>(<i></i>) |
|
144 <p> |
|
145 Public method to get the imported bookmarks. |
|
146 </p><dl> |
|
147 <dt>Returns:</dt> |
|
148 <dd> |
|
149 imported bookmarks (BookmarkNode) |
|
150 </dd> |
|
151 </dl><a NAME="ChromeImporter.open" ID="ChromeImporter.open"></a> |
|
152 <h4>ChromeImporter.open</h4> |
|
153 <b>open</b>(<i></i>) |
|
154 <p> |
|
155 Public method to open the bookmarks file. |
|
156 </p><dl> |
|
157 <dt>Returns:</dt> |
|
158 <dd> |
|
159 flag indicating success (boolean) |
|
160 </dd> |
|
161 </dl><a NAME="ChromeImporter.setPath" ID="ChromeImporter.setPath"></a> |
|
162 <h4>ChromeImporter.setPath</h4> |
|
163 <b>setPath</b>(<i>path</i>) |
|
164 <p> |
|
165 Public method to set the path of the bookmarks file or directory. |
|
166 </p><dl> |
|
167 <dt><i>path</i></dt> |
|
168 <dd> |
|
169 bookmarks file or directory (string) |
|
170 </dd> |
|
171 </dl> |
|
172 <div align="right"><a href="#top">Up</a></div> |
|
173 <hr /><hr /> |
|
174 <a NAME="getImporterInfo" ID="getImporterInfo"></a> |
|
175 <h2>getImporterInfo</h2> |
|
176 <b>getImporterInfo</b>(<i>sourceId</i>) |
|
177 <p> |
|
178 Module function to get information for the given source id. |
|
179 </p><dl> |
|
180 <dt><i>sourceId</i></dt> |
|
181 <dd> |
|
182 id of the browser ("chrome" or "chromium") |
|
183 </dd> |
|
184 </dl><dl> |
|
185 <dt>Returns:</dt> |
|
186 <dd> |
|
187 tuple with an icon (QPixmap), readable name (string), name of |
|
188 the default bookmarks file (string), an info text (string), |
|
189 a prompt (string) and the default directory of the bookmarks file |
|
190 (string) |
|
191 </dd> |
|
192 </dl><dl> |
|
193 <dt>Raises <b>ValueError</b>:</dt> |
|
194 <dd> |
|
195 raised to indicate an invalid browser ID |
|
196 </dd> |
|
197 </dl> |
|
198 <div align="right"><a href="#top">Up</a></div> |
|
199 <hr /> |
|
200 </body></html> |