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

How to keep pages up to date easily and user friendly #5937

Closed
CleanMachine1 opened this issue May 11, 2021 · 21 comments
Closed

How to keep pages up to date easily and user friendly #5937

CleanMachine1 opened this issue May 11, 2021 · 21 comments
Labels
question Questions related to tldr-pages.

Comments

@CleanMachine1
Copy link
Member

Hi, how can I keep my pages up to date.
Currently my way is to run

cd ./.tldr/tldr
git pull

however I don't feel the average user downloading from an apt repo is going to keep them up to date.

@marchersimon marchersimon added the question Questions related to tldr-pages. label May 11, 2021
@marchersimon
Copy link
Collaborator

If you are using the Node.js or Python client, simply use tldr --update or tldr -u.

@CleanMachine1
Copy link
Member Author

Whatever is in the apt repo.

the first longer command seems to fetch while the -u gives this

Invalid option `-u'

Did you mean one of these?
    -h
    -v

Usage: tldr [-v|--version] [--update] COMMAND
  tldr Client program

@marchersimon
Copy link
Collaborator

Seems like the client in the apt repo doesn't support -u. --update should work however.

@CleanMachine1
Copy link
Member Author

it does,

tldr -v
0.4.0.1
is that any use?

@bl-ue
Copy link
Contributor

bl-ue commented May 11, 2021

The Haskell client (https://github.com/psibi/tldr-hs) is what's in the apt repository. That client has --update/-u, as seen in their readme:

$ tldr --help
tldr - Simplified and community-driven man pages

Usage: tldr [-v|--version] ((-u|--update) | [-p|--platform PLATFORM]
           [-L|--language LOCALE] COMMAND | (-a|--about))
 tldr Client program

Available options:
 -h,--help                Show this help text
 -v,--version             Show version
 -u,--update              Update offline cache of tldr pages
 -p,--platform PLATFORM   Prioritize specfic platform while searching. Valid
                          values include linux, osx, windows, sunos
 -L,--language LOCALE     Preferred language for the page returned
 COMMAND                  name of the command
 -a,--about               About this program
 --auto-update-interval DAYS
                          Perform an automatic update if the cache is older
                          than DAYS

But, unfortunately (and this has come up many, many times!), the version of tldr-hs that's on apt is version 0.4.0 (released over 2 years ago), while the latest one is version 0.9.0 (released 7 months ago). That's because @psibi isn't the one who manages the apt repository, and the ones who do haven't updated.

You could try the Python client (apt install tldr-py) which is at version 1.2.1, or the Node.js client (npm install -g tldr) which is at version 3.3.7.

Just a note: these versions of the clients have absolutely nothing to do with one another.

@CleanMachine1
Copy link
Member Author

oh, ok.

Can we do anything about that since the Ubuntu apt repo which is probably the most used has that old version

@bl-ue
Copy link
Contributor

bl-ue commented May 11, 2021

I know, you're right about that. You possibly could — I've never managed any packages on Linux package repositories, but it would probably be easy. You'd also help a lot of users because I've encountered users that've been tripped up by this problem many a time.

@CleanMachine1
Copy link
Member Author

CleanMachine1 commented May 11, 2021

It seems pretty easy, but having access to editing the Ubuntu repo seems out of my reach but I'll look into it

If I do find a solution which version would be used?

Python or _____

@bl-ue
Copy link
Contributor

bl-ue commented May 11, 2021

I use the Node.js one. If it's not too much work, I'd recommend it to you as well. But the Python one is very easy to install since it's on apt and you don't need npm to install it.

Both of them are actively maintained by the @tldr-pages team.

@CleanMachine1
Copy link
Member Author

While I would want to help I feel the best solution is to contact

https://github.com/psibi/tldr-hs
as see what he can do, I'll create an issue over there

@bl-ue
Copy link
Contributor

bl-ue commented May 11, 2021

(for future reference: psibi/tldr-hs#37)

@patricedenis
Copy link
Collaborator

I've left some comments on the referenced issue about Ubuntu and Debian packages.
I'll go checking if there's a repository on salsa.

@patricedenis
Copy link
Collaborator

All right so I checked and there a repo on Salsa for tldr-py, but I saw nothing for tldr (haskell client).
https://salsa.debian.org/python-team/packages/tldr-py

May be we can have some other news contacting the Debian Haskell Group :
[email protected]

I would be happy to help as well with this one, but I don't know Haskell at all and I also have never packaged a program even if I would like to.

@bl-ue
Copy link
Contributor

bl-ue commented May 11, 2021

https://salsa.debian.org/python-team/packages/tldr-py is not actually the official Python client, it's an unofficial (not to mention rather unmaintained) Python client: https://github.com/lord63/tldr.py

@patricedenis
Copy link
Collaborator

patricedenis commented May 11, 2021

@bl-ue I didn't say that it is the official Python client. I just said that it is the official Debian package for the Python client but I think yes it seems up to date with the upstream version as it claims to sync with the upstream version v0.7.0.

Am I wrong?

https://tracker.debian.org/pkg/tldr-py

@bl-ue
Copy link
Contributor

bl-ue commented May 11, 2021

No, you're right. The latest version of https://github.com/lord63/tldr.py is https://github.com/lord63/tldr.py/releases/tag/v0.7.0, which what the apt package is.

I never knew this though. I was under the impression that the tldr-py apt package was the official Python client. I know that the official client is in the ArchLinux repositories, because @felixonmars, who created the official Python client, maintains a lot of AUR and put the Python client there in the first place.

I wish that we could put the official Python client on apt, and remove that unofficial one, but... 🤷🏻‍♂️

@patricedenis
Copy link
Collaborator

patricedenis commented May 11, 2021

  1. As far as I know, every one is encouraged to participate in packaging softwares in the Debian repos. So we could try to make one and them upload it to the official repos. It would then be included in all Debian and Ubuntu based distros.

What a nice project !

  1. I feel I would like to try to do that but I'm steel feeling uncomfortable for it now (due to the overall process of packaging for Debian). I've read all the prerequisites but the docs are overwhelming me because I found so much ways to do the process that I feel lost with it. The present approach using Salsa Debian (official Debian Gitlab platform) is living in parallel with the package tracker, and I did not get it right. Again I'm a little bit lost.

  2. Also, I don't know if we can remove the already present Python client as it could be seen as another legitimate Python client.
    There is also the "tldr" package that redirects to the haskell client. I think, this one should be prioritized as when people install tldr with apt, they are more likely to install this particular package due to its simple and direct name.
    What do you think of that?

because @felixonmars, who created the official Python client, maintains a lot of AUR and put the Python client there in the first place.

I'm sorry, I'm not familiar with this acronym. What does AUR stands for please?

@CleanMachine1
Copy link
Member Author

CleanMachine1 commented May 11, 2021

3 Answer

I completely agree, the apt tldr should be focused on since most users will assume to just run sudo apt install tldr

just like I did!

Arch Linux User Repo

@patricedenis
Copy link
Collaborator

Thanks for the answer @CleanMachine1

@sbrl
Copy link
Member

sbrl commented May 14, 2021

Yeah, we really need the help of a Debian packager there. From my very brief look at the process, there's a ton of documentation to read before you're to package something for the official Debian repos. I'd suggest we should open a dedicated issue about getting the tldr package fixed, as it's likely to be quite the ordeal.

@marchersimon
Copy link
Collaborator

Since the original question is answered and we now have an issue for the Debian package, I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to tldr-pages.
Projects
None yet
Development

No branches or pull requests

5 participants