Skip to main content

New Python client for tldr pages

Project description

Py-tldr

License: MIT test

Py-tldr is a new Python client for tldr pages based on Click.

Installation

pip install py-tldr

Usage

$ tldr --help

Usage: tldr [OPTIONS] [COMMAND]...

  Collaborative cheatsheets for console commands.

  For subcommands such as `git commit`, just keep as it is:

      tldr git commit

Options:
  -v, --version                   Show version info and exit.
  --edit-config                   Open config file with an editor.
  -p, --platform [android|common|linux|osx|sunos|windows]
                                  Override current operating system.
  -L, --language TEXT             Specify language of the page(with no
                                  fallbacks), e.g. `en`.
  -u, --update                    Update local cache with all pages.
  -h, --help                      Show this message and exit.

Config file should be located as ~/.config/tldr/config.toml, you can use --edit-config to create a default one, which will contain the following content:

page_source = "https://raw.githubusercontent.com/tldr-pages/tldr/main/pages"
language = "en"
platform = 'linux'
proxy_url = ""

[cache]
enabled = true
timeout = 24
download_url = "https://tldr.sh/assets/tldr.zip"

Cache is enabled implicitly, with 24 hours as expiration time by default.

A proxy url can be set for convenience, proxy envs such as HTTP_PROXY will also work.

Support

Python: >=3.7

OS: Not tested on Windows.

Changelog

See CHANGELOG

License

MIT

Credits

This package was created with cookiecutter and iamgodot/create-python-app project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-tldr-0.9.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

py_tldr-0.9.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file py-tldr-0.9.0.tar.gz.

File metadata

  • Download URL: py-tldr-0.9.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for py-tldr-0.9.0.tar.gz
Algorithm Hash digest
SHA256 9a53d556d668ee73ae31addfd1ccd183a1c9e9acd6abdcbe0f0b8e7df4a5109e
MD5 87655d5ba4451bd0c00d4f59a36149bf
BLAKE2b-256 4444392280f77799e9ec8673643486cf389e7b4251dc890a656c491a5932af3b

See more details on using hashes here.

File details

Details for the file py_tldr-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: py_tldr-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for py_tldr-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4684e8824e4b6a805acdc8a3dff19f99efcd6c279b07c45a9a9b62789e4566d9
MD5 3770a2cb6795512fb84de9e31cbcab6e
BLAKE2b-256 d957662e902cbc1e78d1b98a8691947c0aac6b44d3bf77a579fad5bb779debd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page