tldr-pages / tldr-python-client

Python command-line client for tldr pages
https://pypi.org/project/tldr/
MIT License
592 stars 92 forks source link

Notice other versions of the same page #208

Closed Jaimepas77 closed 2 months ago

Jaimepas77 commented 1 year ago

Fixes #193

This PR changes the way pages are searched so that it can find multiple versions of the same page. Therefore, every time a page is searched, every possible platform is checked even if a previous valid one was found. If more than one page is found, the next platform in the priority list is noticed to the user.

It doesn't search in every page if the platform was determined by the user parameters.

The PR implements this specification.

Bugs: it wont find multiple versions of the page if the cache only contains one of them. As it's much faster to search on the cache, this bug was not resolved.

vitorhcl commented 6 months ago

I ran black on the script

vitorhcl commented 6 months ago

I reverted black formatting to not conflict with other PRs for now. We can maybe run it in another PR