sunaku / dasht

💁 Search API docs offline, in terminal or browser
https://sunaku.github.io/dasht/man
827 stars 26 forks source link

better interoperability with Zeal and Dash #52

Open sunaku opened 4 years ago

sunaku commented 4 years ago

Feature: dasht should be able to re-use docsets from existing Zeal and Dash installations.

Seirdy commented 4 years ago

Setting $DASHT_DOCSETS_DIR to the directory containing Zeal docsets seems to do the trick.

smackesey commented 4 years ago

Hey, nice little app you've got here.

I'm open to writing a PR that makes this seamlessly interoperable with Dash (I can't speak to Zeal). So far as I can tell from skimming over the other issues, the current disconnect stems from the fact that Dash.app stores it's docsets in separate subdirectories while dasht places them all in one directory. For instance, in Dash.app, the NodeJS docset is stored in $DOC_ROOT/NodeJS/NodeJS.docset, while in dasht it is just inside $DOC_ROOT/NodeJS.docset.

One solution to this is to simply change the storage structure of dasht to match that of Dash. This would allow one to simply set the existing Dash directory as the docset storage root. This may also be a better long term solution for handling things like versioned docsets (stored in a common subdirectory).

Is this a solution you are open to? There doesn't look to be a great deal of code to change.

sunaku commented 4 years ago

Hi @smackesey, sure that would be great! :+1: I don't have direct experience with Dash.app since I don't use macOS. :penguin: Cheers.