mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-26 07:37:15 +03:00
py273 docset - parse library/functions.html
This commit is contained in:
parent
535786e25a
commit
349a89aeac
@ -22,7 +22,7 @@ Currently Zeal requires Qt 5.0. To compile it, run `qmake` and `make` in the `ze
|
||||
After compiling it you need to download docsets and put them in `$HOME/.local/share/zeal/docsets/` -- after creating the directory first. Currently there are docsets available from Qt 5 and Python 2.7.3, generated using scripts from `gendoctests` directory, but for convenience can be downloaded from Dropbox:
|
||||
|
||||
* [Qt5.tar.bz2](https://www.dropbox.com/s/qnpjfphph2z1yqw/Qt5.tar.bz2) (55M)
|
||||
* [python-2.7.3-docs-html.tar.bz2](https://www.dropbox.com/s/2xehy4d2umwg574/python-2.7.3-docs-html.tar.bz2) (4.3M)
|
||||
* [python-2.7.3-docs-html.tar.bz2](https://www.dropbox.com/s/fn12dctc3lcx98p/python-2.7.3-docs-html.tar.bz2) (4.3M)
|
||||
|
||||
Do `tar -jxvf file.tar.bz2` in docsets directory to enable given docset.
|
||||
|
||||
|
@ -98,5 +98,15 @@ for method in tree.xpath('//dl[@class="method"]'):
|
||||
(method.xpath('dt/tt[@class="descname"]/text()')[0], url,
|
||||
get_std_class(classname, url)))
|
||||
|
||||
|
||||
tree = parse('library/functions.html')
|
||||
for method in tree.xpath('//dl[@class="function"]'):
|
||||
url = 'library/functions.html'
|
||||
if method.xpath('dt/@id'):
|
||||
url += '#'+method.xpath('dt/@id')[0]
|
||||
c.execute('INSERT INTO things(type, name, path) values("function", ?, ?)',
|
||||
(method.xpath('dt/tt[@class="descname"]/text()')[0], url))
|
||||
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
Loading…
Reference in New Issue
Block a user