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

chore: download proper tldr archive #213

Closed

Conversation

invakid404
Copy link
Contributor

According to the tldr client specifications, downloading https://tldr.sh/assets/tldr.zip is preferred over directly downloading an archive of the master branch.

To achieve this, I've replaced the flate2 crate with the zip crate, and have changed the download URL accordingly. Also, instead of wiping the entire cache dir, I've made Cache::clear() only delete directories that are known to contain a tldr-pages archive, i.e. tldr-master (the old dir) and tldr-pages (the new dir). In the future, we could/should drop the part which deals with the old directory.

This PR also includes changes from @dbrgn's cache refactoring branch.

@dbrgn
Copy link
Collaborator

dbrgn commented Oct 16, 2021

I see what you did to those commit IDs 😂

Copy link
Collaborator

@dbrgn dbrgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @invakid404!

dbrgn added a commit that referenced this pull request Oct 16, 2021
Download tldr pages from proper archive URL.
@dbrgn
Copy link
Collaborator

dbrgn commented Oct 16, 2021

Merged in f7da0b0

@dbrgn dbrgn closed this Oct 16, 2021
dbrgn added a commit that referenced this pull request Oct 16, 2021
It's unused since #213.
@invakid404 invakid404 deleted the use-proper-tldr-archive branch October 16, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants