Skip to main content

A python client for tldr: simplified and community-driven man pages.

Project description

Latest Version Build Status Coverage Status Python Versions

Yet another python client for tldr.

Intro

tldr.py is a python client for tldr: simplified and community-driven man pages. Instead of the long man pages:

tar-man-page

tar-man-page

tldr will give you several simple yet powerful examples:

tar-tldr-page

tar-tldr-page

The command examples are not good? Don’t worry, you can set up your own ‘tldr’! They are just markdown files and you can modify them at your ease. Don’t forget to Share them with the community!

One more thing, tldr is just a simple version for the man page, it’s NOT an alternative. Sometimes, you should read the man pages patiently ;)

Features highlight

  • use local file, fast.

  • support custom the output color.

  • support fetch the latest tldr pages.

  • support rebuild the index.

Install

$ (sudo) pip install tldr.py

Usage

Initialize

  1. clone the tldr repo to somewhere(e.g. ~/code/tldr). We will use it when we look for a command usage.

    $ cd ~/code
    $ git clone git@github.com:tldr-pages/tldr.git
  2. init the configuration file, the default location for the configuration file is your home directory, you can use the TLDR_CONFIG_DIR environment variable to point it to another folder(e.g. $HOME/.config)

    $ tldr init
    Input the tldr repo path(absolute path): (e.g. /home/lord63/code/tldr/)
    Input your platform(linux, osx or sunos): (e.g. linux)
    Initializing the config file at ~/.tldrrc

and you configuration file should look like this:

colors:
   command: cyan
   description: blue
   usage: green
platform: linux
repo_directory: /home/lord63/code/tldr

Don’t worry about the colors option, it is for the output when you look for a command, you can custom it by yourself.(Note that the color should be in [‘black’, ‘red’, ‘green’, ‘yellow’, ‘blue’, ‘magenta’, ‘cyan’, ‘white’])

Use tldr

look for a command usage:

$ tldr find {{command}}

check for updates(so that we can get the latest man pages):

$ tldr update

locate the command man page:

::

$ tldr locate {{command}}

Or you can use tldr --help to get the help message.

FAQ

Q: I want to add some custom command usages to a command, how to do it?

A: Find the location of the command page; add the command usages; done.

Q: I want to add some custom command pages, how?

A: Add the comand pages to the right folder(e.g. /tldrrepo/pages/linux); rebuild the index; done.

Q: I don’t like the default color theme, how to change it?

A: Edit the tldr configuration file at ~/.tldrrc; modify the color until you’re happy with it.

Q: I faided to update the tldr pages, why?

A: Actually, tldr.py just tries to pull the latest tldr pages for you, no magic behinds it. So the reason why you faided to update is that tldr.py failed to pull the latest upstream, check the failing output and you may know the reason, e.g. you make some changes and haven’t commit them yet. You can pull the pages by hand so you can have a better control on it.

Contributing

  • It sucks? Why not help me improve it? Let me know the bad things.

  • Want a new feature? Feel free to file an issue for a feature request.

  • Find a bug? Open an issue please, or it’s better if you can send me a pull request.

Contributions are always welcome at any time! :sparkles: :cake: :sparkles:

License

MIT.

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

tldr.py-0.5.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

tldr.py-0.5.0-py2.py3-none-any.whl (10.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: tldr.py-0.5.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tldr.py-0.5.0.tar.gz
Algorithm Hash digest
SHA256 307689959df5fc42cde10612b195c0245ea1a3e056ae7689673509f4bf3d2ce9
MD5 d42bf0551f7d9ad48efb03f22114f3d6
BLAKE2b-256 cd384235d34db900e18a15464ccae234fc13fa5795b9bb9dd14738ee5f786b89

See more details on using hashes here.

File details

Details for the file tldr.py-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tldr.py-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1442adbeb388de7c3d39480208c8091c027362e12b3a15b00fbedec4e5d721d9
MD5 3226ce8ee5b484ea36a1b7e8f5f407c7
BLAKE2b-256 b121bbafe57e235a78b0bbd653e7df03d4a2f145a44134949ea6d3077f8554ec

See more details on using hashes here.

Supported by

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