• Stars
    star
    803
  • Rank 54,474 (Top 2 %)
  • Language
    Shell
  • Created over 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ’ Search API docs offline, in terminal or browser

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 200+ offline documentation sets, courtesy of Dash for macOS) 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

Using a package manager:

Packaging status

Manually, 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! ๐Ÿ„๐Ÿ–๐Ÿ‘๐Ÿ”๐Ÿฃ๐ŸŸโœจ๐Ÿ™ŠโœŒ
Why? For ๐Ÿ’• ethics, the ๐ŸŒŽ environment, and ๐Ÿ’ช health; see link above. ๐Ÿ™‡

(the ISC license)

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

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

(the GPL license)

A small portion of the dasht-query-exec(1) script was derived from Zeal, which is licensed under the GNU General Public License. Refer to the bin/dasht-query-exec file for more information.

More Repositories

1

tamzen-font

๐Ÿ’Œ Bitmapped programming font, based on Tamsyn
Ruby
818
star
2

md2man

๐Ÿ“š Converts markdown into UNIX manual pages
Ruby
362
star
3

vim-shortcut

๐Ÿ’‡ Discoverable & searchable shortcuts for (Neo)Vim
Vim Script
185
star
4

tork

๐Ÿ’ž Tests your Ruby code, in parallel, as you change it
Ruby
181
star
5

vim-dasht

๐Ÿ’ (Neo)Vim plugin for dasht integration
Vim Script
131
star
6

home

๐Ÿก My $HOME directory (dot files & bin scripts)
Shell
128
star
7

.vim

โœŒ๏ธ A modular (Neo)Vim configuration
Vim Script
112
star
8

vim-ruby-minitest

Vim highlighting & completion for MiniTest
Vim Script
107
star
9

glove80-keymaps

Glove80 keymap: "Glorious Engrammer"
HTML
100
star
10

vim-unbundle

๐ŸŽ Fast, filetype-lazy loader of Vim scripts & plugins
Vim Script
97
star
11

wmiirc

Ruby configuration for WMII window manager
Ruby
81
star
12

tmux-navigate

๐Ÿฅ‚ Seamless tmux/vim navigation (over SSH too!)
Shell
50
star
13

engrammer

Arno's Engram layout for programmers
Makefile
42
star
14

vim-hicterm

๐ŸŒˆ Highlights terminal color code numbers (0-255)
Vim Script
41
star
15

vim-modusline

๐ŸŒˆ Mode-specific statusline colors
Vim Script
39
star
16

binman

๐Ÿค“ Creates manual pages from header comments
Ruby
36
star
17

wmii

My fork of the WMII window manager.
C
36
star
18

readably

๐Ÿ“š Static blogs: YAML + Slim โ†’ HTML5
Ruby
30
star
19

simple-ftp

My final project for CMPE-150 at UCSC during Spring 2004.
C
27
star
20

rumai

Ruby interface to 9P2000 protocol and WMII window manager
Ruby
21
star
21

bdf2fon

Convert X11 BDF fonts to Microsoft .FNT and .FON formats
C
15
star
22

ruby-vpi

Ruby interface to IEEE 1364-2005 Verilog VPI
Ruby
15
star
23

sunaku.github.io

๐ŸŒŸ My own little corner of the Web
HTML
10
star
24

.dwm

My dwm configuration with Ruby statusbar.
C
10
star
25

inochi

Infrastructure for Ruby projects
Ruby
10
star
26

ruby-coroutine-example

How to embed Ruby inside C coroutines.
C
9
star
27

ember

eRuby template processor
Ruby
8
star
28

sm4tik-font

BDF font of sm4tik's 8x8 XBM icons.
7
star
29

erbook

Write books, manuals, and documents in eRuby.
JavaScript
7
star
30

beakl15p

BEAKL-15p keyboard layout
7
star
31

kwalify

YAML schema validation for Ruby
7
star
32

swig-ruby-ffi

Ruby FFI language module for SWIG
C++
7
star
33

structy_record

๐ŸŽฉ Provides a Struct-like interface for Records
Elixir
6
star
34

detest

Assertion testing library for Ruby
Ruby
5
star
35

rassmalog

Static blogging with YAML and eRuby
Ruby
5
star
36

libixp

Mirror of 9P2000 library from WMII window manager.
C
5
star
37

babelfish

Ruby interface to Yahoo! BabelFish translation service.
Ruby
4
star
38

ofc2_to_png

Open Flash Chart 2 JSON to PNG converter
JavaScript
4
star
39

knights-tour

Knight's Tour algorithm in C, OpenGL, and Cg. This was my final project for CMPE-220 at UCSC during Winter 2007.
C
3
star
40

.dmenu

My dmenu configuration.
C
3
star
41

programming-elixir-issues

Sample project from the Programming Elixir book
Elixir
2
star
42

vim-ruby-shoulda-context

Vim highlighting & completion for shoulda-context.
Vim Script
2
star
43

firefox-tranquility

My fork of the Tranquility addon for Firefox
JavaScript
1
star
44

test-loop

MOVED TO sunaku/testr
1
star
45

kernel_hash

Adds a Kernel#Hash() method like Kernel#Array()
Ruby
1
star
46

redcarpet-manpage

renamed to md2man
1
star
47

test-unit-must

Selfish "must" assertions for Test::Unit
Ruby
1
star
48

ff-bash

For each File (GNU BASH)
Shell
1
star
49

opener

๐Ÿ‘ A 33-line alternative to Ruby's launchy gem
Ruby
1
star
50

testr

MOVED TO sunaku/tork
1
star
51

onig-5.9.2

My patches to Oniguruma 5.9.2
C
1
star
52

test-unit-must.vim

Vim syntax highlighting for test-unit-must assertions
Vim Script
1
star
53

equal_rights_for_hash

Adds Kernel#Hash() and generic #to_h() methods.
Ruby
1
star