Skip to content

feat: update for v3.4.0 release #269

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 15 commits into from
Mar 28, 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
os: ['ubuntu-latest', 'ubuntu-24.04-arm']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: canonical/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1.3.0
id: snapcraft-build
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
# Changelog

## 3.4.0 (03/28/2025)

### Breaking

* Drop support for EOL Python 3.8 version.

### Bugfixes

* Fix broken `--render` option (thanks [@acuteenvy](https://github.com/acuteenvy))
* Fix duplicate platform information shown in pages like `du`, `cd`, `w` (thanks [@sellisd](https://github.com/sellisd))
* Only install `colorama` dependency in Windows (thanks [@hukkin](https://github.com/hukkin))

### Features

* Add support for displaying pages with long/short option placeholders using `--long-options`/`--short-options` flags or [TLDR_OPTIONS variable](https://github.com/tldr-pages/tldr-python-client#command-options) (thanks [@Managor](https://github.com/Managor))
* Add `--clear-cache`/`-k` option to clear tldr's local cache (thanks [@patricedenis](https://github.com/patricedenis) and [@vitorhcl](https://github.com/vitorhcl))
* Add support to stylize text inside backticks when appearing in example descriptions (thanks [@kyluca](https://github.com/kyluca))
* Add support for specifying a certificate bundle with [TLDR_CERT variable](https://github.com/tldr-pages/tldr-python-client#ssl-inspection) (thanks [@jtcbrule](https://github.com/jtcbrule), [@CleanMachine1](https://github.com/CleanMachine1), and [@vitorhcl](https://github.com/vitorhcl))
* Package build for the project has been migrated from using `setup.py` (with `setuptools` backend) to `pyproject.toml` (with Hatch backend) (thanks [@kbdharun](https://github.com/kbdharun))
* Update package metadata in `pyproject.toml` (thanks [@kbdharun](https://github.com/kbdharun))
* Add trusted publisher support to securely publish `tldr` package to PyPI directly from the repository's confined environment (thanks [@kbdharun](https://github.com/kbdharun))
* Add support for [Client Specification v2.3](https://github.com/tldr-pages/tldr/releases/tag/v2.3)

## 3.3.0 (06/29/2024)

## Breaking
### Breaking

* Drop support for EOL versions Python 3.6 and Python 3.7.

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![CodeQL](https://github.com/tldr-pages/tldr-python-client/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/tldr-pages/tldr-python-client/actions/workflows/github-code-scanning/codeql)
[![Snap Release](https://snapcraft.io/tldr/badge.svg)](https://snapcraft.io/tldr)

Python command-line client for [tldr pages](https://github.com/tldr-pages/tldr).
🐍 Official Python command-line client for [tldr pages](https://github.com/tldr-pages/tldr) 📚.

![Tldr Python client displaying the tar page](https://raw.github.com/tldr-pages/tldr-python-client/main/images/tldr-dark.png)

Expand Down Expand Up @@ -123,6 +123,7 @@ tldr --clear-cache
```bash
# bash
tldr --print-completion bash | sudo tee "$BASH_COMPLETION_COMPAT_DIR"/tldr

# zsh (it is recommended to check where zsh/site-functions directory is located)
## for macOS:
tldr --print-completion zsh | sudo tee /usr/local/share/zsh/site-functions/_tldr
Expand Down Expand Up @@ -196,4 +197,4 @@ can either use the `--source` flag when using tldr or by specifying the followin

### Command options

Pages might contain `{{[*|*]}}` patterns to let the client decide whether to show shortform or longform versions of options. This can be configured with `TLDR_OPTIONS`, which accepts values `short`, `long` and `both`
Pages might contain `{{[*|*]}}` patterns to let the client decide whether to show shortform or longform versions of options. This can be configured with `TLDR_OPTIONS`, which accepts values `short`, `long` and `both`.
19 changes: 17 additions & 2 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" "Jun 29, 2024" "" "tldr"
.TH "TLDR" "1" "Mar 28, 2025" "" "tldr"
.SH NAME
tldr \- tldr 3.3.0
tldr \- tldr 3.4.0
.sp
Python command line client for tldr

Expand Down Expand Up @@ -61,6 +61,11 @@ Update the local cache of pages and exit
.sp
Default: False
.TP
.B \-k, \-\-clear\-cache
Delete the local cache of pages and exit
.sp
Default: False
.TP
.B \-p, \-\-platform
Possible choices: android, freebsd, linux, netbsd, openbsd, osx, sunos, windows, common
.sp
Expand Down Expand Up @@ -92,6 +97,16 @@ Just print the plain page file.
.sp
Default: False
.TP
.B \-\-short\-options
Display shortform options over longform
.sp
Default: False
.TP
.B \-\-long\-options
Display longform options over shortform
.sp
Default: False
.TP
.B \-\-print\-completion
Possible choices: bash, zsh, tcsh
.sp
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "hatchling.build"
[project]
name = "tldr"
dynamic = ["version"]
description = "Python command line client for tldr."
description = "Official Python command line client for tldr pages."
readme = "README.md"
license = "MIT"
requires-python = "~=3.9"
Expand Down
12 changes: 2 additions & 10 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: tldr
base: core24
version: '3.3.0'
version: '3.4.0'
summary: tldr python client
description: Python command-line client for tldr pages.
description: Official Python command-line client for tldr pages.

grade: stable
confinement: strict
Expand Down Expand Up @@ -31,14 +31,6 @@ parts:
build-environment:
- PATH: ${CRAFT_PART_INSTALL}/bin:${PATH}
- PYTHONPATH: ${CRAFT_PART_INSTALL}/lib/python3.12/site-packages
override-pull: |
craftctl default
override-build: |
craftctl default
cd $CRAFT_PART_SRC/docs
make man
mkdir -p $CRAFT_PART_INSTALL/share/man/man1
cp -r $CRAFT_PART_SRC/docs/man/tldr.1 $CRAFT_PART_INSTALL/share/man/man1/tldr.1
python-packages:
- Sphinx
- sphinx-argparse
Expand Down
2 changes: 1 addition & 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.3.0"
__version__ = "3.4.0"
__client_specification__ = "2.3"

REQUEST_HEADERS = {'User-Agent': 'tldr-python-client'}
Expand Down