Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

readme with examples

  • Loading branch information...
commit 81a9586e1c43b257d331fdbc3525fc3f069f5494 1 parent 875e360
@substack authored
Showing with 74 additions and 1 deletion.
  1. +73 −0 README.markdown
  2. +1 −1  bin/tube.js
View
73 README.markdown
@@ -0,0 +1,73 @@
+picture-tube
+============
+
+Render images on the terminal.
+
+example
+=======
+
+command
+-------
+
+![picture tube robot](http://substack.net/images/screenshots/picture_tube_robot_avatar.png)
+
+code
+----
+
+``` js
+var tube = require('picture-tube')
+```
+
+
+usage
+=====
+
+```
+Usage: picture-tube OPTIONS { file or uri }
+
+Options:
+ --cols number of columns to use for output
+
+```
+
+methods
+=======
+
+``` js
+var pictureTube = require('picture-tube');
+var tube = pictureTube();
+tube.pipe(process.stdout);
+
+var fs = require('fs');
+fs.createReadStream('robot.png').pipe(tube);
+```
+
+var tube = pictureTube(opts)
+----------------------------
+
+Return a readable/writable stream that reads png image data and writes ansi
+terminal codes.
+
+Set the number of columns to display the image as with `opts.cols`.
+
+Right now only png files work.
+
+install
+=======
+
+To install as a library, with [npm](http://npmjs.org) do:
+
+```
+npm install picture-tube
+```
+
+To install the command-line tool, with [npm](http://npmjs.org) do:
+
+```
+npm install -g picture-tube
+```
+
+license
+=======
+
+MIT
View
2  bin/tube.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
var argv = require('optimist')
- .usage('Usage: picture-tube OPTIONS file')
+ .usage('Usage: picture-tube OPTIONS { file or uri }')
.demand(1)
.describe('cols', 'number of columns to use for output')
.argv
Please sign in to comment.
Something went wrong with that request. Please try again.