Skip to content

chore: 3.4.1 release, fallback to common if page doesn't exist on platform #284

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

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 3.4.1 (04/29/2025)

### Bugfixes

* Fix manpage path in `pyproject.toml` (thanks [@kbdharun](https://github.com/kbdharun))

### Features

* Fallback to `common` if a platform is specified using `-p` flag, but a page doesn't exist for that platform (thanks [@kbdharun](https://github.com/kbdharun))

## 3.4.0 (03/28/2025)

### Breaking
Expand Down
20 changes: 10 additions & 10 deletions docs/man/tldr.1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "TLDR" "1" "Mar 28, 2025" "" "tldr"
.TH "TLDR" "1" "Apr 29, 2025" "" "tldr"
.SH NAME
tldr \- tldr 3.4.0
tldr \- tldr 3.4.1
.sp
Python command line client for tldr

Expand Down Expand Up @@ -59,12 +59,12 @@ Search for a specific command from a query
.B \-u, \-\-update, \-\-update_cache
Update the local cache of pages and exit
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-k, \-\-clear\-cache
Delete the local cache of pages and exit
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-p, \-\-platform
Possible choices: android, freebsd, linux, netbsd, openbsd, osx, sunos, windows, common
Expand All @@ -74,38 +74,38 @@ Override the operating system [android, freebsd, linux, netbsd, openbsd, osx, su
.B \-l, \-\-list
List all available commands for operating system
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-s, \-\-source
Override the default page source
.sp
Default: \(dq\X'tty: link https://raw.githubusercontent.com/tldr-pages/tldr/main/pages'\fI\%https://raw.githubusercontent.com/tldr\-pages/tldr/main/pages\fP\X'tty: link'\(dq
Default: \fB\(aqhttps://raw.githubusercontent.com/tldr\-pages/tldr/main/pages\(aq\fP
.TP
.B \-c, \-\-color
Override color stripping
.TP
.B \-r, \-\-render
Render local markdown files
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-L, \-\-language
Override the default language
.TP
.B \-m, \-\-markdown
Just print the plain page file.
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-\-short\-options
Display shortform options over longform
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-\-long\-options
Display longform options over shortform
.sp
Default: False
Default: \fBFalse\fP
.TP
.B \-\-print\-completion
Possible choices: bash, zsh, tcsh
Expand Down
6 changes: 5 additions & 1 deletion tldr.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import shtab
import shutil

__version__ = "3.4.0"
__version__ = "3.4.1"
__client_specification__ = "2.3"

REQUEST_HEADERS = {'User-Agent': 'tldr-python-client'}
Expand Down Expand Up @@ -251,6 +251,10 @@ def get_page_for_every_platform(
"""Gives a list of tuples result-platform ordered by priority."""
if platforms is None:
platforms = get_platform_list()
else:
# When platform is explicitly specified, ensure 'common' is included as fallback
if 'common' not in platforms and len(platforms) > 0:
platforms = platforms + ['common']
if languages is None:
languages = get_language_list()
# only use cache
Expand Down
Loading