GithubHelp home page GithubHelp logo

yakiyo / tldart Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.08 MB

A fast cli for tldr.sh implemented in Dart

Home Page: https://pub.dev/packages/tldart

License: MIT License

Dart 100.00%
cli dart tldr tldr-client tldr-pages

tldart's Introduction

tldart

CI Pub Package

Fast tldr client written in dart.

screenie

Installation

  • Installing it through the Dart SDK [Recommended]
$ dart pub global activate tldart

This will add the tldr executable to your path.

  • Manual installation

Simple binaries for windows, macos and linux are available in zip files in the release section. You can download the zip file, extract the tldr.exe (or tldr depending on your platform) and add the directory to your path.

Usage

Tldart follows the tldr client specifications, so it should be the same as any other tldr client if you've used any before.

tldart stores a local copy of tldr-pages in your ~/.tldr directory. If its missing, the app will prompt you to update the cache directory.

Search for a page

$ tldr man # to search for `man`

$ tldr git log # to search for `git-log`

$ tldr -p linux mv # to search for `mv` for linux platform

$ tldr -l ar chrome # to search for `chrome` in arabic lang

You can specify the language with the --language or -l flag.

Platform can be specified with --platform or -p flag. (One of 'linux', 'macos', 'windows', 'sunos', 'osx', 'android'). By default the platform used is the user's current platform, if the query is not available for the platform, the app switches to the common platform. You can view the raw markdown using the --raw or -r flag.

Render custom file

To render a custom markdown file not within the cache directory, use the --render or -f flag.

$ tldr -f path/to/file.md

The -l and -p flag are completely useless in this case but the -r (raw) flag will work. If the markdown contains any line that does not match the tldr format, it is silently ignored.

Listing all commands

$ tldr --list

Lists all the available command in your local cache

Updating local cache

$ tldr --update
# or
$ tldr -u

This downloads the tldr archive, unzips it and stores it in your ~/.tldr/cache directory. This might take a few seconds or minutes as the archive file is big and unzipping it takes a bit of time.

The app emits some debug logs internally. This can be viewed by setting the DEBUG env variable to anything, as long as its not empty. For example in bash:

$ DEBUG=1 tldr -u

To see a short help, run

$ tldr tldr

For any problems, queries or bugs, feel free to open a new issue.

Credits

This project was heavily inspired by dbrgn's tealdeer.

Author

tldart © Yakiyo. Authored and maintained by Yakiyo.

Released under MIT License

tldart's People

Contributors

yakiyo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.