8000 Provide a way to install the generated docset · Issue #4 · Robzz/cargo-docset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Provide a way to install the generated docset #4

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

Open
Robzz opened this issue Aug 29, 2019 · 8 comments
Open

Provide a way to install the generated docset #4

Robzz opened this issue Aug 29, 2019 · 8 comments
Assignees
Labels
T: enhancement New feature or request
Milestone

Comments

@Robzz
Copy link
Owner
Robzz commented Aug 29, 2019

It's a bit of a pain to install docsets manually. Some quick thoughts on automating this:

  • Simply copy/pasting the docset directory works, but Zeal needs to be restarted to pick up the new docset. Doing that and killing/restarting Zeal if it's open is a possibility... The heim crate sounds like the good place to check but it may lack the needed functionality. We'll see.
  • Needs to figure out the docset directory. For Zeal, it seems to be stored in an ini like file called Zeal.conf. The dirs crate can probably be used to locate the config file and/or docset directory. Or we use that method as a fallback, and build on Read generation options from toml file #5 and specify it either in the toml file, or in a global toml file (~/.config/cargo-docset.toml or something ?)
@Robzz Robzz self-assigned this Aug 29, 2019
@Robzz Robzz added this to the v0.2.0 milestone Aug 29, 2019
@Robzz Robzz added the T: enhancement New feature or request label Aug 29, 2019
@Robzz
Copy link
Owner Author
Robzz commented Sep 5, 2019

Also, if anyone passing by happens to run dash and can share any insight: does dash need to be restarted to pick up the new docset after replacing it? I would think so, but I don't own a mac to try it.

@LovingMelody
Copy link

The documentation for dash doesn't mention that a restart is needed, I will try this on my mac later.

@Robzz
Copy link
Owner Author
Robzz commented Oct 15, 2019

Thank you!

I just realized the issue description does not fully describe my concern. So, to be clear, the part I'm worried about is whether dash detects the new SQLite database after copying a new version of an existing docset, or if it's just loaded at startup and kept in memory. In other words, if you copy an updated docset containing new entries (as opposed to just updating the contents of previously existing pages), are these new entries detected when searching from within dash without restarting it.

@LovingMelody
Copy link

Sorry it took so long, just got the chance to do this. Tested it with one crate, edited the documentation of the main package, and reloading was only required when I navigated away and back to that section.

@Robzz
Copy link
Owner Author
Robzz commented Oct 16, 2019

Sorry it took so long

No problem, that was actually pretty darn quick 😄 In any case, I won't be working on this right away, hopefully next week, so there really is no rush.

Thank you for the testing! So if I understand correctly, Dash does behave the same as Zeal here, and needs a restart before it can use the updated SQLite database, correct ? If so, then we can treat Dash and Zeal pretty much the same in cargo-docset. And if that's the case, then, excellent, the less platform/doc browser specific code, the better.

@LovingMelody
Copy link

Sorry it took so long ...

@Robzz No restart, just need to navigate away and back, sorry I didn’t word that well.

@saskenuba
Copy link

To make things a little faster I hacked up a little shell script to automate the creation/installation of a docset on Zeal with cargo-docset, might be useful: gist link

@Robzz Robzz modified the milestones: v0.2.0, v0.3.0 Jun 21, 2020
@xxchan
Copy link
xxchan commented Oct 6, 2023

I build the docset for the project I worked on in GHA, and created a RSS feed, which contains all dependencies' docs. It can be subscribed via an url like dash-feed://https%3A%2F%2Frisingwavelabs.github.io%2Frisingwave%2FRisingWave.xml 😄

https://github.com/risingwavelabs/risingwave/blob/461c4eb131eb83fb7b916b00215288abab29c354/.github/workflows/doc.yml#L37-L47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants
0