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

Support downloading & caching of a subset of languages by clients #10545

Closed
adamazing opened this issue Jul 25, 2023 · 4 comments · Fixed by #10555
Closed

Support downloading & caching of a subset of languages by clients #10545

adamazing opened this issue Jul 25, 2023 · 4 comments · Fixed by #10555
Labels
clients Issues pertaining to a particular client or the clients as whole.

Comments

@adamazing
Copy link
Contributor

Re: tealdeer-rs/tealdeer#335

Paraphrased user story: "As a user with limited/metered bandwidth and/or limited storage, I want my tldr client to only download the languages I care about."

I think this would be in line with the spirit of the caching section in the client specification:

Caching SHOULD be done according to the user's language configuration (if any), as to not waste unneeded space for unused languages. Additionally, clients MAY automatically update the cache on a regular basis.

I'm happy to have a go at a PR to enable this use case for clients if it's something the project would like to support?

@kbdharun kbdharun added the clients Issues pertaining to a particular client or the clients as whole. label Jul 25, 2023
@kbdharun
Copy link
Member

kbdharun commented Jul 25, 2023

Hi, I am pretty sure our official clients only cache the correct locales in your system. Is it missing from any of our official clients (in the org here)?

@adamazing
Copy link
Contributor Author

Hi, I am pretty sure our official clients only cache the correct locales in your system. Is it missing from any of our official clients (in the org here)?

Apologies for the confusion, the key improvement would be the ability to be able to download only the pages required.

Having checked the node cli -- quickly from my phone in the middle of my night, so I'm sorry if I've misunderstood something -- it looks like the method there (as with tealdeer) is to download the zip file containing all languages.

Zipping and publishing languages' subdirectories in build.sh/deploy.sh might be one way to allow clients to avoid downloading all languages.

@kbdharun
Copy link
Member

kbdharun commented Jul 25, 2023

Zipping and publishing languages' subdirectories in build.sh/deploy.sh might be one way to allow clients to avoid downloading all languages.

If possible, can you start a discussion regarding this in our chatroom?

As this is kinda a breaking change for our existing clients, so I want to hear what other maintainers think about this proposal.

@adamazing
Copy link
Contributor Author

adamazing commented Jul 25, 2023

As this is kinda a breaking change for our existing clients, so I want to hear what other maintainers think about this proposal.

I don't believe it would have to be.

One approach, the one I had considered implementing, would be that the complete archive would still be published for clients that chose to download the complete archive. They would see no change. The complete archive would still be available at the current location.

BUT separate lang-specific archives would also exist, e.g. pages.zip/tldr-pages.zip/pages.base.zip & pages.ar.zip/tldr-pages.ar.zip (TBD).

If possible, can you start a discussion regarding this in our chatroom?

I'll endeavour to do so later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clients Issues pertaining to a particular client or the clients as whole.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants