Third-party docs
eidge opened this issue ยท 16 comments
Is there a way to use dasht to download kapeli's third party docs? Such as Hexdocs.pm?
I'm trying but with no success.
(Congrats anyway though, this is an excellent little app :) )
At present, the dasht-docsets-install(1) script can only download docsets that Dash for OS X has kindly made available to us on its "Docset Direct Download Links" page. ๐ I don't know if (or where) third-party docsets are made available to us in a similar fashion, but please do tell me if you happen to find out. ๐ฎ
However, if you somehow have access to the *.tar.gz
files or the *.docset
folders of third-party docsetsโfor example, if you generated your own custom docsetโthen simply place them into your $DASHT_DOCSETS_DIR
folder (and extract if necessary) to make them visible to and searchable in dasht.
I've added a new dasht-docsets-extract
script in commit b73f37c that further simplifies the task of installing third-party docsets directly from their *.tgz
files (if you already have them in your possession).
The dasht-docsets-extract
script has been released in version 1.2.0. ๐
@eidge Were you able to get a setup you're happy with for importing and viewing Hexdocs in dasht
? I'm just starting down that path and came across this issue. Thanks.
Hi there,
Unfortunately I didn't, but to be honest I didn't take a big look. I use
Linux virtual boxes for development purposes which make it very frustrating
to use dash to download the docsets and then move them over to the vms. So
I'm just using dash at the moment.
This would definitely unlock it though.
Thanks for the good work!
On Thursday, 1 September 2016, Eric Milford notifications@github.com
wrote:
@eidge https://github.com/eidge Were you able to get a setup you're
happy with for importing and viewing Hexdocs in dasht? I'm just starting
down that path and came across this issue. Thanks.โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#4 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACPZiPkH787rs60XepK7xgbKgyYNPstNks5qlvbPgaJpZM4HqXJB
.
Hugo Ribeira
Jack of All Trades at *intoCros http://intocross.coms
http://intocross.com *
Tel: +351 910982209 http://910982209 * LinkedIn
http://pt.linkedin.com/pub/hugo-ribeira/45/295/536/ * GitHub
https://github.com/eidge
Universidade de Coimbra
Thanks.
Downloading and extracting the docsets directly from hex.pm didn't work because of the directory structure format, sqlite, etc. required by dash. I've found that downloading the docsets via Dash and copying them to the dasht location works, as mentioned above.
Could you provide an example URL of a hexdocs.pm docset package (tarball) so I can download it and debug why dasht-docsets-extract
isn't sufficient to make it searchable with dasht?
All I could gather from hexdocs.pm's homepage was that I could access a particular hex package's documentation online via a URL like this: http://hexdocs.pm/<package>/<version>
. I tried appending .tgz
and .tar.gz
to the URL but that did not yield a downloadable docset.
Here's an example https://repo.hex.pm/docs/ecto-2.0.4.tar.gz
There's a good chance I borked something when using dasht-docsets-extract
. ๐
๐ This tarball simply contains a bunch of HTML files at the root: there is no SQLite3 database at /Contents/Resources/docSet.dsidx
available for searching, so this isn't a proper Dash docset.
We need to transform this tarball, somehow, into a proper Dash docset to make it installable with dasht-docset-extract
and searchable with dasht. Right now, I don't know how to do this. ๐
I haven't had a chance to look at it or to give it a shot, but came across this which might help.
๐ Considering the fact that hexdocset has runtime dependencies on Elixir and Erlang , it seems unlikely that Dash would come bundled with it to dynamically transform hexdocs.pm tarballs into proper Dash docsets during installation on the client side. ๐
Instead, I believe that hexdocset is run internally by hexdocs.pm and the result is provided as a proper Dash docset to be downloaded directly into Dash for OS X. That way, Dash users are spared from having to satisfy special runtime dependencies just to install exotic docsets. ๐ฐ
An easy way to confirm this suspicion would be to run a network traffic analyzer while downloading a brand new hexdocs.pm docset into Dash for OS X. Find out what URL is actually being downloaded: it's likely not the same one that you provided in comment #4 (comment). ๐
Finally, repeat the experiment with other sources third of party docsets and share the results here. Of course, I could do all of this myself, except for the fact that I don't use Mac OS X at all. ๐ง
Interesting, so Dash comes bundled with hexdocset? and it uses hexdocset to build an SQLite3 database out of the HTML files on the client side? ๐ฒ
Help Wanted: If anyone wants to try adding support for installing improper docsets (which don't contain a SQLite3 database at /Contents/Resources/docSet.dsidx
within them, as defined in #4 (comment)) such as those from hexdocset, please submit a pull request and I would be glad to review and merge it! ๐
I am having an issue with getting the docsets from sub-folders. I have set the directory to this:
export DASHT_DOCSETS_DIR="/Users/XXXXX/Library/Application Support/Dash/DocSets"
However, dasht does not detect .docsets files in subfolder. When i search for 'Dart' I get no result at all. after resetting the directory exactly where the .docsets files are, it seems to be working. like the following:
export DASHT_DOCSETS_DIR="/Users/XXXXX/Library/Application Support/Dash/DocSets/Dart"
but this will only get the dart docs obviously and it is very inconvenient to move all .docsets files directly in the same folder directly.
Any idea on how to properly set the DASHT_DOCSETS_DIR to look into subfolders ?
Regards,
Sultan
@SultanEid, see issue #15 instead: ๐โโ๏ธ the request for adding support for subfolders is discussed there.