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