bcat -- pipe to browser utility

# |bcat

### pipe to browser utility

README, INSTALLING, COPYING, CONTRIBUTING

#### Manuals

bcat(1), btee(1)
  browser `cat` and browser `tee`.
a2h(1)
  VT100/ANSI escape sequence to HTML converter.

#### Examples

With build tools:

    make test |bcat
    rake test |bcat

As a clipboard viewer:

    pbpaste  |bcat   # macos
    xclip -o |bcat   # X11

For previewing HTML:

    markdown README.md |bcat
    redcloth README.textile |bcat
    erb -T - template.erb |bcat
    mustache < template.mustache |bcat
    pygmentize -Ofull,style=colorful -f html main.c |bcat

As a simple man pager:

    export MANPAGER='col -b |bcat'
    man grep

With git, selectively:

    git log -p --color |bcat
    git diff --color HEAD@{5d} HEAD |bcat

With git, as the default PAGER:

    export GIT_PAGER=bcat
    git log -p
    git diff HEAD@{5d} HEAD

As a log viewer:

    tail -n 1000 -f /var/log/messages |bcat
    tail -f $RAILS_ROOT/log/development.log |bcat

Or, a remote log viewer:

    ssh example.org 'tail -n 1000 -f /var/log/syslog' |bcat

#### Vim and vi Examples

Preview current buffer as HTML:

    :!markdown % |bcat
    :!ronn -5 --pipe % |bcat

Create keymappings:

    :map ,pm :!markdown % \|bcat
    :map ,pp :!pygmentize -Ofull,style=colorful -f html % \|bcat

Use with `makeprg`:

    :set makeprg=make\ \\\|bcat
    :set makeprg=markdown\ %\ \\\|bcat
    :set makeprg=testrb\ %\ \\\|bcat

#### See Also

- Chris Wanstrath's `browser` program pipes standard input to a browser using a temporary file. It's many fewer lines of code than `bcat`.

- This excellent introduction to TextMate's HTML output features can be thought of as a `bcat` feature roadmap. It should one day be possible to do all of those things with `bcat`.

- uzbl is a graphical web browser (X11+gtk only) that adheres to the UNIX philosophy.

Copyright © 2010 Ryan Tomayko