Closed mebeim closed 3 years ago
Ah, great idea @mebeim!
Shouldn't the URL be https://tldr.sh/assets/index.json
/ https://assets/tldr.zip
?
The client spec should probably be updated too. Could you open a PR for that please?
@sbrl you're right about the URL, changed it. About the tldr.sh
domain, should that be used instead of tldr-pages.github.io
? I was unsure about which one to use.
As for the PR, well sure, once the above question is answered though, don't want to link the wrong domain :')
Yeah, we can use tldr.sh. It is a CF front for tldr-pages.github.io.
@agnivade noted, thanks.
Just a note, tldr-php and tldr-chrome don't use the ZIP file at the moment.
For tldr-php
, we have BrainMaestro/tldr-php#6 and BrainMaestro/tldr-php#7 open for updating it to use the ZIP, so I guess when those are done, we can update straight to use this new file format. 👍
@pxgamer If that's the case then those two clients can be already checked. Thank you. :+1:
I looked around all client repositories and to my surprise I found out that very few of them use the /pages/index.json
file inside the ZIP. Most of the clients directly request each page or directly clone this repo's main branch. Most of the clients which download the ZIP just browse it manually and maybe even build a different index by theirself. Others use the index file at tldr.sh/assets/index.json
. I also saw a couple which just have a static local copy of all the pages, LOL.
So, basically as you can see I only had to open 4 issues (3 on GitHub, 1 on GitLab), of which one was already resolved and closed. This means only three clients with an open issue remain right now, and that one client which does not have a source listed anywhere for me to look into (though I believe it directly queries each page).
Pretty nice I'd say :nerd_face:
Gosh! Interesting. It's actually in the new client spec that clients should be using index.json
and the archives on tldr.sh :thinking:
I'm not sure it would be possible for the Chrome extension. But for the PHP client, I might make a PR when I'm back home.
@pxgamer well I don't think that the spec should be taken that literally for every client. Clearly it is a good guideline to follow, but doesn't fit all scenarios.
Just sent an email to DistroWatch's contact email address, just in case.
Update: They've replied with the following:
Thanks for letting us know. We actually pull directly from the git repository to get new page versions, but I appreciate knowing the index file has moved.
All the best, Jesse
Looks like DistroWatch is absolutely fine, and we don't need to worry about them. I've updated the list in the original issue.
Nice! Thank you @sbrl.
Should I have kept this open until all clients are okay @sbrl?
I think this is fine as is. We used this to mainly track clients before applying the change. It was useful before as an indicator to know if or how much we needed to wait, but now that the change is applied, keeping this up until the last client updates their code does not really have any advantage.
As stated in #2862, I'm opening this to keep track of clients' compliance with the small change to the ZIP generation, that is, adding a top-level
/index.json
as replacement for/pages/index.json
. Right now, both files are present since some clients rely on/pages/index.json
to work, but the goal is to completely remove it and only keep the top-level/index.js
.As a consequence of this, I'm going to open issues on repositories of clients which rely on
/pages/index.json
being in the generated ZIP to alert them of the new change. Look at the bottom to see what I'll be mostly copy-pasting around for this purpose.List of up-to-date clients
Checked box == up-to-date.
Text of the issue I'll be opening on client repositories: