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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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