Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third-party docs #4

Open
eidge opened this issue Mar 6, 2016 · 16 comments
Open

Third-party docs #4

eidge opened this issue Mar 6, 2016 · 16 comments

Comments

@eidge
Copy link

eidge commented Mar 6, 2016

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 :) )

@sunaku
Copy link
Owner

sunaku commented Mar 6, 2016

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. 🔮

:neckbeard: 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.

@sunaku
Copy link
Owner

sunaku commented Mar 8, 2016

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).

@sunaku
Copy link
Owner

sunaku commented Mar 18, 2016

The dasht-docsets-extract script has been released in version 1.2.0. 🎁

@emilford
Copy link

emilford commented Sep 1, 2016

@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.

@eidge
Copy link
Author

eidge commented Sep 2, 2016

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 [email protected]
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

@emilford
Copy link

emilford commented Sep 2, 2016

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.

@sunaku
Copy link
Owner

sunaku commented Sep 2, 2016

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.

@emilford
Copy link

emilford commented Sep 2, 2016

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. 😁

@sunaku
Copy link
Owner

sunaku commented Sep 2, 2016

👍 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. 😕

@emilford
Copy link

emilford commented Sep 2, 2016

I haven't had a chance to look at it or to give it a shot, but came across this which might help.

@sunaku
Copy link
Owner

sunaku commented Sep 3, 2016

👍 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. 🐧 :neckbeard:

@emilford
Copy link

emilford commented Sep 5, 2016

There's seemingly something to do with hexdocset when downloading a hex docset within Dash. It's from a different app; the one you linked to I'd need to spend more time with to understand what I'm looking at. These results are consistent when downloading.

screen shot 2016-09-04 at 9 22 41 pm

screen shot 2016-09-04 at 9 22 49 pm

@sunaku
Copy link
Owner

sunaku commented Sep 5, 2016

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? 😲

@sunaku
Copy link
Owner

sunaku commented Oct 23, 2016

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! 😅

@SultanEid
Copy link

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

@sunaku
Copy link
Owner

sunaku commented May 6, 2020

@SultanEid, see issue #15 instead: 💁‍♂️ the request for adding support for subfolders is discussed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants