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