-
Notifications
You must be signed in to change notification settings - Fork 26
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
Versioned Docsets #15
Comments
Try the issue-15 branch which searches However, note that |
Fixed ability to use ^ anchors in docset name regexps now! 😺 |
That is really cool. Just tried it and it works. 👏 By the way, I think too many users take the work of project owners/maintainers for granted. I don't. Thanks a lot for the short response time and more importantly, thanks a lot for this amazing project. I think people don't say this enough. |
Thanks for your kind words. 😺 I'm glad to help and to hear that it worked correctly. This feature needs more refactoring before I can release it, maybe next weekend. 🎁 |
Hey @RobertAudi, I noticed that this approach slows down dasht on my low-powered system. 🐌 So I want to try creating a Would this be an acceptable solution for this problem? |
As far as I'm concerned, any working solution would be acceptable. However, when I think of "the end user", I think an acceptable solution would be one that is transparent, or at least seemless. In that sense, I believe that the location of existing docsets can often be inferred, and thus the whole symlinking process can be transparently taken care of. What I mean by inferred is the following: IF there are any existing docsets, then they are likely to have been installed by either Dash (on OS X) or Zeal (on *nix and Windows). Those two applicantions install (by default) docsets in specific locations which, as I said before, can be inferred. The inference would only take place when installing new docsets, it would just be (virtually) additional docsets "repositories". The way I see it, it's similar to the way "taps" work in Homebrew, or PPAs in Debian-based systems, except that the "repositories" are local. And this could potentially be a gateway to a much more powerful docsets packaging system. (Sorry for the formatting and the lack of emojis, I'm writing this on my iPhone :/ ) |
As a follow-up, I know that my last comment is more relevant to #4 than versioned docsets per-say, but the lookup logic is the same in my opinion: Versioned docsets (essentially legacy/archived official docsets) ARE third party docsets. |
Hey @RobertAudi, thanks for your feedback. 📞 After much consideration, I decided to implement the symlink approach because it requires the least amount of changes to the codebase. 🚶 Please try the new "inherit" branch instead of the old "issue-15" branch. 🎅 |
@RobertAudi Please try the issue-15-try3 branch, which introduces a new environment variable:
You can set it to include all locations that contain export DASHT_DOCSETS_PATH=$(
find "$HOME/Library/Application Support/Dash/" -type d -name '*.docset' |
sed 's|[^/]*$||' | sort -u | tr '\n' :
) Let's get this long awaited issue moving again! 👷♂️ 🚀 ✨ |
@sunaku Sorry for the super slow response time, I finally tried the issue-15-try3 branch. It does partially work. Here is a list of remaining problems. ProblemsBroken linksSome docsets are present in the form of an archive with the name Unlisted docsetsThe only docsets listed by the Distinct seasch results with the same nameIf a search result is found in two different versioned docsets, they will appear under the same name (including the docset name). For example, searching for sample will show results from all the Ruby docsets (among others), but there will be no indication of the diffence between each result (namely the version of Ruby). That is because the docset name is actually the same, but is located under a directory specifying the actual version. Suggested solutionsTaking into account the problems above, I came up with a couple of simple solutions:
This would not change any of the existing |
Hey @RobertAudi, thanks for your detailed feedback and sorry about the long delay in my response. 😓 After much thought, I feel most confident about the symlink creation approach 🔗 (see the To customize the names of docsets during/after installation (also requested in PR #19), I have an idea. 💡 Stay tuned. 🏃♂️ |
Crude but effective:
Presumes Mac OS directory structures of course. Inspiration: https://unix.stackexchange.com/questions/45644/flatten-directory-but-preserve-directory-names-in-new-filename |
This is related to #4. In Dash, there is the possibility to install a specific version of a docset (e.g.: Ruby 2.2.4 docset). Looking into the docset feeds, I can see that there is a
<other-versions>
tag in (some) docset files (e.g.: the Ruby 2 docset), but I couldn't figure out how to retrieve pre-built specific versions.One workaround – which would apply to #4 as well – would be to be able to import local docsets by looking in common places.
For instance, on OS X, Dash docsets are in
"$HOME/Library/Application Support/Dash"
, and in there there is a"Versioned DocSets"
directory:Or maybe an additional configuration variable could be available to specify additional lookup paths.
The text was updated successfully, but these errors were encountered: