tldr-pages / tldr-pages/tldr-python-client
Pages that are only in common, always force an https connection
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 749
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
common vs specific platform
Take for example the command: tldr tldr on linux (Let's assume I already have the file common/tldr.md in my cache directory and it is newer than TLDR_CACHE_MAX_AGE).
One might reasonably assume that no https requests will be made. But in fact, the program first looks for linux/tldr.md, since it's not in the cache, it first requests it from
PAGES_SOURCE_LOCATION/linux/tldr.md
which returns a 404. then after all this, it looks for common/tldr.md and shows the contents.
Solution
I suggest checking the common cache directory before making an https connection for platform specific files. Or to avoid changing default behavior, at least put this behavior behind an option like
--common-before-net
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tldr tldr command flow on Linux and trace how the cache is checked before requests to PAGES_SOURCE_LOCATION/linux/tldr.md. Verify the existing common/tldr.md cache case described in the issue. Done means a fresh common cached page is shown without an HTTPS request for the platform-specific page, while the existing behavior remains defined for other cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100