Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Conversation

brenns10
Copy link

Hello! I saw your recent change which enabled the workaround for anchors in the doc plugin. Thank you for including that. The python docs now work so much better.

I have another patch that I've added on my builds of Albert. It's not "production quality" but I rely on it a lot. Many projects I care about don't have documentation included in the Zeal documentation list. I can generate docsets, but getting Albert to recognize them is not currently implemented: you can only select from the list downloaded from the Zeal API. You can contribute them to Dash, but as far as I can tell, the user contributed docsets don't make it into the list used by Zeal so that doesn't help here.

So this patch adds a very clunky means to add a custom_docsets.json file which, when detected, will add any locally installed docsets into the list, which users can then enable or disable as normal. You just need to create a JSON blob that looks the same as the ones returned by the API. Obviously this isn't a good user experience, and the code is pretty yucky, since I wanted to make the minimal amount of changes necessary to make it work.

Thus I wanted to ask -- how would you prefer to see something like this implemented? The best way would seem to be having a dialog box in the config section that prompts for the file/directory, a name, and the necessary icon info. It would be a learning experience, but I could try to do that. Alternatively, we could make it easier (no JSON) by automatically detecting any directory in the ~/.local/share/albert/docs/custom-docsets/ directory. The icon could be stored in a well-known filename, and the project name could be inferred from the directory name.

Thanks!

This is a bit gross in order to avoid changing the existing code and
indentation, so the patch will apply for longer. But essentially, once
we've read the network/cached docset list, we then open a custom list,
read and parse that, and re-run the logic so that we can add in the
custom docsets too.

Signed-off-by: Stephen Brennan <[email protected]>
@ManuelSchneid3r
Copy link
Member

hi brenns, if you did not notice, all plugins have been moved into separate plugins. please add the changes to https://github.com/albertlauncher/albert-plugin-docs. this repo will be archived. ill just keep it open to allow discussion on issues and prs

@ManuelSchneid3r
Copy link
Member

and sorry for the time you have to wait. maybe you can assume that theres lots of other stuff to do/discuss.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants