Giter Club home page Giter Club logo

dasht's Introduction

Search API docs offline, in your terminal or browser

dasht is a collection of shell scripts for searching, browsing, and managing API documentation (in the form of 150+ offline documentation sets, courtesy of Dash for OS X) all from the comfort of your own terminal!

The name "dasht" is a portmanteau of Dash and the letter "t", for terminal. Etymologically, "dasht" is Persian for plain, as in an flat expanse of land, which aptly characterizes the terminal environment where everything is text.

Features

  • You never have to leave your terminal!

  • Local search engine for web browsers.

  • Keep Dash docsets anywhere you like.

Preview

Watch the "dasht in a terminal" and "dasht in a browser" screencasts.

In your terminal In your browser

Dependencies

Required:

  • POSIX environment (Linux, BSD, etc.)

Optional:

  • w3m to display dasht(1) search results
  • socat for dasht-server(1) search engine
  • gawk for dasht-server(1) search engine

Development:

  • binman and md2man to build manual pages

      gem install binman md2man
    

Installation

In Arch Linux:

In macOS using Homebrew:

brew install dasht

On any system:

  1. Download a stable release or clone this Git repository.

  2. Add the bin/ folder to your PATH environment variable:

    export PATH=$PATH:location_where_you_cloned_or_downloaded_dasht/bin
    
  3. Add the man/ folder to your MANPATH environment variable:

    export MANPATH=location_where_you_cloned_or_downloaded_dasht/man:$MANPATH
    

Vim integration

Use the vim-dasht plugin for (Neo)Vim.

ZSH integration

Source this file in ZSH to activate TAB completion for dasht:

source location_where_you_cloned_or_downloaded_dasht/etc/zsh/completions.zsh

Or simply add the completions/ directory to your ZSH $fpath if you've already set up ZSH's completion system elsewhere:

fpath+=location_where_you_cloned_or_downloaded_dasht/etc/zsh/completions/

Usage

First, install some docsets using dasht-docsets-install(1):

dasht-docsets-install bash

Next, perform a direct search from the terminal using dasht(1):

dasht 'c - x'

Then, repeat the search in a web browser using dasht-server(1):

dasht-server

You are now ready to use dasht! Read the manuals below to learn even more.

Manuals

  • You can browse the manuals online at https://sunaku.github.io/dasht/man/.

  • If you set $MANPATH or installed from a package manager, run man dasht.

  • Else, run man -M location_where_you_cloned_or_downloaded_dasht/man dasht.

Configuration

You may optionally configure the DASHT_DOCSETS_DIR environment variable, which defines the filesystem location where your Dash docsets are installed. If undefined, its value is assumed to be $XDG_DATA_HOME/dasht/docsets/ or, if XDG_DATA_HOME is also undefined, $HOME/.local/share/dasht/docsets/.

You may optionally configure the DASHT_CACHE_DIR environment variable, which defines the filesystem location where download links are cached. If undefined, its value is assumed to be $XDG_CACHE_HOME/dasht/ or, if XDG_CACHE_HOME is also undefined, $HOME/.cache/dasht/.

Development

If you make changes to the embedded manual pages found in the comment headers at the top of script files in the bin/ directory, then remember to run the binman-rake command afterward to regenerate UNIX manual pages for packaging.

License

Like my work? ๐Ÿ‘ Please spare a life today as thanks! ๐Ÿฎ๐Ÿท๐Ÿ”๐ŸŸ๐Ÿ™ŠโœŒ๏ธ๐Ÿ’ž

Copyright 2016 Suraj N. Kurapati https://github.com/sunaku

Distributed under the terms of the ISC license (see the LICENSE file).

dasht's People

Contributors

drselump14 avatar frodeaa avatar netei avatar shane4ster avatar sunaku 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.