|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Helpviewer.Bookmarks.BookmarksImporters.SafariImporter</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.SafariImporter</h1> |
|
23 <p> |
|
24 Module implementing an importer for Apple Safari 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="#SafariImporter">SafariImporter</a></td> |
|
34 <td>Class implementing the Apple Safari 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="SafariImporter" ID="SafariImporter"></a> |
|
46 <h2>SafariImporter</h2> |
|
47 <p> |
|
48 Class implementing the Apple Safari 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="#SafariImporter.__init__">SafariImporter</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#SafariImporter.__processChildren">__processChildren</a></td> |
|
67 <td>Private method to process the list of children.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SafariImporter.importedBookmarks">importedBookmarks</a></td> |
|
70 <td>Public method to get the imported bookmarks.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SafariImporter.open">open</a></td> |
|
73 <td>Public method to open the bookmarks file.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SafariImporter.setPath">setPath</a></td> |
|
76 <td>Public method to set the path of the bookmarks file or directory.</td> |
|
77 </tr> |
|
78 </table> |
|
79 <h3>Static Methods</h3> |
|
80 <table> |
|
81 <tr><td>None</td></tr> |
|
82 </table> |
|
83 <a NAME="SafariImporter.__init__" ID="SafariImporter.__init__"></a> |
|
84 <h4>SafariImporter (Constructor)</h4> |
|
85 <b>SafariImporter</b>(<i>sourceId="", parent=None</i>) |
|
86 <p> |
|
87 Constructor |
|
88 </p><dl> |
|
89 <dt><i>sourceId</i></dt> |
|
90 <dd> |
|
91 source ID (string) |
|
92 </dd><dt><i>parent</i></dt> |
|
93 <dd> |
|
94 reference to the parent object (QObject) |
|
95 </dd> |
|
96 </dl><a NAME="SafariImporter.__processChildren" ID="SafariImporter.__processChildren"></a> |
|
97 <h4>SafariImporter.__processChildren</h4> |
|
98 <b>__processChildren</b>(<i>children, rootNode</i>) |
|
99 <p> |
|
100 Private method to process the list of children. |
|
101 </p><dl> |
|
102 <dt><i>children</i></dt> |
|
103 <dd> |
|
104 list of child nodes to be processed (list of dict) |
|
105 </dd><dt><i>rootNode</i></dt> |
|
106 <dd> |
|
107 node to add the bookmarks to (BookmarkNode) |
|
108 </dd> |
|
109 </dl><a NAME="SafariImporter.importedBookmarks" ID="SafariImporter.importedBookmarks"></a> |
|
110 <h4>SafariImporter.importedBookmarks</h4> |
|
111 <b>importedBookmarks</b>(<i></i>) |
|
112 <p> |
|
113 Public method to get the imported bookmarks. |
|
114 </p><dl> |
|
115 <dt>Returns:</dt> |
|
116 <dd> |
|
117 imported bookmarks (BookmarkNode) |
|
118 </dd> |
|
119 </dl><a NAME="SafariImporter.open" ID="SafariImporter.open"></a> |
|
120 <h4>SafariImporter.open</h4> |
|
121 <b>open</b>(<i></i>) |
|
122 <p> |
|
123 Public method to open the bookmarks file. |
|
124 </p><dl> |
|
125 <dt>Returns:</dt> |
|
126 <dd> |
|
127 flag indicating success (boolean) |
|
128 </dd> |
|
129 </dl><a NAME="SafariImporter.setPath" ID="SafariImporter.setPath"></a> |
|
130 <h4>SafariImporter.setPath</h4> |
|
131 <b>setPath</b>(<i>path</i>) |
|
132 <p> |
|
133 Public method to set the path of the bookmarks file or directory. |
|
134 </p><dl> |
|
135 <dt><i>path</i></dt> |
|
136 <dd> |
|
137 bookmarks file or directory (string) |
|
138 </dd> |
|
139 </dl> |
|
140 <div align="right"><a href="#top">Up</a></div> |
|
141 <hr /><hr /> |
|
142 <a NAME="getImporterInfo" ID="getImporterInfo"></a> |
|
143 <h2>getImporterInfo</h2> |
|
144 <b>getImporterInfo</b>(<i>sourceId</i>) |
|
145 <p> |
|
146 Module function to get information for the given source id. |
|
147 </p><dl> |
|
148 <dt><i>sourceId</i></dt> |
|
149 <dd> |
|
150 id of the browser ("chrome" or "chromium") |
|
151 </dd> |
|
152 </dl><dl> |
|
153 <dt>Returns:</dt> |
|
154 <dd> |
|
155 tuple with an icon (QPixmap), readable name (string), name of |
|
156 the default bookmarks file (string), an info text (string), |
|
157 a prompt (string) and the default directory of the bookmarks file |
|
158 (string) |
|
159 </dd> |
|
160 </dl><dl> |
|
161 <dt>Raises <b>ValueError</b>:</dt> |
|
162 <dd> |
|
163 raised to indicate an invalid browser ID |
|
164 </dd> |
|
165 </dl> |
|
166 <div align="right"><a href="#top">Up</a></div> |
|
167 <hr /> |
|
168 </body></html> |