consolemark
Advanced tools
Comparing version
#! /usr/bin/env node | ||
var util = require('util'), | ||
var path = require('path'), | ||
util = require('util'), | ||
consolemark = require('../index.js'); | ||
@@ -8,5 +9,12 @@ | ||
if (argv[2] === '-v') { // version | ||
if (argv[2] === '-v' || argv[2] === '--version') { // version | ||
util.puts(consolemark.version); | ||
} else if (argv[2] === '-h') { // help | ||
} else if (argv[2] === '-h' || argv[2] === '--help') { // help | ||
var help = path.join(__dirname, '../doc/help.cmk'); | ||
consolemark.render(help, function(err, colorful) { | ||
if (err) {throw err;} | ||
colorful.forEach(function(c) { | ||
util.print(c); | ||
}); | ||
}); | ||
} else { // a path to file | ||
@@ -13,0 +21,0 @@ consolemark.render(argv[2], function(err, colorful) { |
###v0.0.1, 2011-04-14### | ||
1, support basic color tags. | ||
###v0.0.2, 2011-04-14### | ||
1, support all ansi style tag. | ||
###v0.0.3, 2011-04-15### | ||
1, now support all tags! | ||
###v0.0.4, 2011-04-16### | ||
1, added help |
{ | ||
"name":"consolemark", | ||
"description":"try parse to something console con display.", | ||
"version":"0.0.3", | ||
"version":"0.0.4", | ||
"author":"Guan 'kuno' Qing <neokuno AT gmail DOT com>", | ||
@@ -6,0 +6,0 @@ "contributors":[], |
@@ -10,6 +10,11 @@ Use ansi color to render the output on console screen; | ||
###File format | ||
Consolemark can parse any text file, no matter its filename extension. | ||
But for convenience reason, I recommend that you name the file with '.cmk' extension. | ||
###Tags | ||
Similar to html tag: | ||
Consolemark uses tags to render text, it is similar to html tag: | ||
@@ -16,0 +21,0 @@ <yellow>text1</yellow> <bold>text2</bold> <white>text3</white> |
18040
5.02%15
7.14%131
6.5%57
9.62%