Browse Source

It compiles! Ship it!

master
John ShaggyTwoDope Jenkins 5 years ago
parent
commit
d330aa22f4
100 changed files with 32734 additions and 7 deletions
  1. 2
    2
      drive/PKGBUILD
  2. BIN
      drive/drive-0.1.1-1-x86_64.pkg.tar.xz
  3. BIN
      drive/drive-0.1.1-1.src.tar.gz
  4. BIN
      drive/pkg/drive/.MTREE
  5. 5
    5
      drive/pkg/drive/.PKGINFO
  6. BIN
      drive/pkg/drive/usr/bin/drive
  7. BIN
      drive/v0.1.1.tar.gz
  8. 18
    0
      ghcal/PKGBUILD
  9. BIN
      ghcal/nodejs-ghcal-1.1.0-1-any.pkg.tar.xz
  10. BIN
      ghcal/nodejs-ghcal-1.1.0-1.src.tar.gz
  11. BIN
      ghcal/pkg/nodejs-ghcal/.MTREE
  12. 22
    0
      ghcal/pkg/nodejs-ghcal/.PKGINFO
  13. 1
    0
      ghcal/pkg/nodejs-ghcal/usr/bin/ghcal
  14. 5
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/.npmignore
  15. 21
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/LICENSE
  16. 78
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/README.md
  17. 23
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/bin/ghcal
  18. 132
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/lib/index.js
  19. 5
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/.npmignore
  20. 21
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/LICENSE
  21. 88
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/README.md
  22. 236
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/lib/index.js
  23. 63
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/package.json
  24. 59
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/test/image
  25. 19
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/test/index.js
  26. 5
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/.npmignore
  27. 21
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/LICENSE
  28. 114
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/README.md
  29. 94
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/index.js
  30. 4
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/.npmignore
  31. 21
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/LICENSE
  32. 96
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/README.md
  33. 98
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/index.js
  34. 6
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/.travis.yml
  35. 256
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/colors.json
  36. 5
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/example/charm.js
  37. 3
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/example/ix.js
  38. 3
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/example/raw.js
  39. 35
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/index.js
  40. 78
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/package.json
  41. 83
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/readme.markdown
  42. 36
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/test/id.js
  43. 57
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/package.json
  44. 26
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/test/index.js
  45. 57
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/package.json
  46. 24
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/test/index.js
  47. 10
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/.jshintrc
  48. 9
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/.npmignore
  49. 7
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/.travis.yml
  50. 47
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/CONTRIBUTING.md
  51. 482
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/History.md
  52. 36
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/Makefile
  53. 877
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/Readme.md
  54. 1
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/coverage.json
  55. 350
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/index.html
  56. 355
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/index.js.html
  57. 1558
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/api/attributes.js.html
  58. 676
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/api/css.js.html
  59. 389
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/api/index.html
  60. 1231
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/api/manipulation.js.html
  61. 1570
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/api/traversing.js.html
  62. 805
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/cheerio.js.html
  63. 389
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/index.html
  64. 580
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/parse.js.html
  65. 802
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/static.js.html
  66. 475
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/cheerio/lib/utils.js.html
  67. 376
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/index.html
  68. 1
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/prettify.css
  69. 1
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov-report/prettify.js
  70. 1652
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/coverage/lcov.info
  71. 11
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/index.js
  72. 416
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/api/attributes.js
  73. 118
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/api/css.js
  74. 303
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/api/manipulation.js
  75. 423
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/api/traversing.js
  76. 161
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/cheerio.js
  77. 86
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/parse.js
  78. 160
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/static.js
  79. 51
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/lib/utils.js
  80. 5
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/.travis.yml
  81. 11
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/LICENSE
  82. 57
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/README.md
  83. 67
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/browser_functions.js
  84. 54
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/index.js
  85. 178
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/attributes.js
  86. 8
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/basefunctions.js
  87. 84
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/compile.js
  88. 80
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/general.js
  89. 84
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/nth-check.js
  90. 338
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/pseudos.js
  91. 59
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/lib/sort.js
  92. 5
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/.travis.yml
  93. 11
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/LICENSE
  94. 182
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/index.js
  95. 70
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/package.json
  96. 46
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/readme.md
  97. 14664
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/tests/out.json
  98. 392
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/CSSwhat/tests/test.js
  99. 11
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/domutils/LICENSE
  100. 0
    0
      ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/cheerio/node_modules/CSSselect/node_modules/domutils/index.js

+ 2
- 2
drive/PKGBUILD View File

@@ -1,7 +1,7 @@
# Maintainer: John Jenkins <twodopeshaggy@gmail.com>

pkgname=drive
pkgver=0.1.0
pkgver=0.1.1
pkgrel=1
pkgdesc="Pull or push Google Drive files"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
@@ -10,7 +10,7 @@ license=('Apache')
makedepends=('go' 'git' 'mercurial')
options=('!strip' '!emptydirs')
source=("https://github.com/odeke-em/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('93f0c17d6a34fae1972e1d4c1b7eccc45c822bc1c0c99479c11787a38617c8f3')
sha256sums=('030229f03ba9ac35abe35b3b32807113c9cf41ced96c7c243c186139ed49d887')

prepare() {
mkdir -p "$srcdir/go"

BIN
drive/drive-0.1.1-1-x86_64.pkg.tar.xz View File


BIN
drive/drive-0.1.1-1.src.tar.gz View File


BIN
drive/pkg/drive/.MTREE View File


+ 5
- 5
drive/pkg/drive/.PKGINFO View File

@@ -1,13 +1,13 @@
# Generated by makepkg 4.2.0
# Generated by makepkg 4.2.1
# using fakeroot version 1.20.2
# Fri Feb 20 10:11:37 UTC 2015
# Tue Mar 3 16:57:13 UTC 2015
pkgname = drive
pkgver = 0.1.0-1
pkgver = 0.1.1-1
pkgdesc = Pull or push Google Drive files
url = http://github.com/odeke-em/drive
builddate = 1424427097
builddate = 1425401833
packager = Unknown Packager
size = 8543232
size = 8568832
arch = x86_64
license = Apache
makedepend = go

BIN
drive/pkg/drive/usr/bin/drive View File


BIN
drive/v0.1.1.tar.gz View File


+ 18
- 0
ghcal/PKGBUILD View File

@@ -0,0 +1,18 @@
# Maintainer: John Jenkins twodopeshaggy@gmail.com
_npmname=ghcal
pkgname=nodejs-ghcal
pkgver=1.1.0
pkgrel=1
pkgdesc="See the GitHub contributions calendar of a user in the command line."
arch=(any)
url="https://github.com/IonicaBizau/ghcal"
license=(MIT)
depends=('nodejs')

package() {
cd $srcdir
local _npmdir="$pkgdir/usr/lib/node_modules/"
mkdir -p "$_npmdir"
cd "$_npmdir"
npm install -g --prefix "$pkgdir/usr" $_npmname@$pkgver
}

BIN
ghcal/nodejs-ghcal-1.1.0-1-any.pkg.tar.xz View File


BIN
ghcal/nodejs-ghcal-1.1.0-1.src.tar.gz View File


BIN
ghcal/pkg/nodejs-ghcal/.MTREE View File


+ 22
- 0
ghcal/pkg/nodejs-ghcal/.PKGINFO View File

@@ -0,0 +1,22 @@
# Generated by makepkg 4.2.1
# using fakeroot version 1.20.2
# Thu Feb 26 22:35:26 UTC 2015
pkgname = nodejs-ghcal
pkgver = 1.1.0-1
pkgdesc = See the GitHub contributions calendar of a user in the command line.
url = https://github.com/IonicaBizau/ghcal
builddate = 1424990126
packager = Unknown Packager
size = 5646336
arch = any
license = MIT
depend = nodejs
makepkgopt = strip
makepkgopt = docs
makepkgopt = !libtool
makepkgopt = !staticlibs
makepkgopt = emptydirs
makepkgopt = zipman
makepkgopt = purge
makepkgopt = !upx
makepkgopt = !debug

+ 1
- 0
ghcal/pkg/nodejs-ghcal/usr/bin/ghcal View File

@@ -0,0 +1 @@
../lib/node_modules/ghcal/bin/ghcal

+ 5
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/.npmignore View File

@@ -0,0 +1,5 @@
*.swp
*.swo
*~
*.log
node_modules

+ 21
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/LICENSE View File

@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Ionică Bizău

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 78
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/README.md View File

@@ -0,0 +1,78 @@
![](http://i.imgur.com/yzElGZN.png)

# `$ ghcal`
See the GitHub contributions calendar of a user in the command line.

If you want to track all your git commits you make (even if don't push them anywhere), you should [check out the `git-stats` project](https://github.com/IonicaBizau/git-stats).

![](http://i.imgur.com/QmtGX5r.png)

## Installation

```sh
$ npm install -g ghcal
```

## Usage
### Default behavior
If you already created [`cli-github`](https://github.com/IonicaBizau/cli-github), then your GitHub
username is kept into `~/.github-config.json` and `ghcal` will use it if you don't pass another
username: `ghcal` will be the same with `ghcal <your-username>`.

```sh
$ ghcal
```

![](http://i.imgur.com/VmnibRQ.png)

### Passing the username

The first option is a GitHub username:

```sh
# Fetches the izuzak's contributions
$ ghcal izuzak
```

![](http://i.imgur.com/0r8QZyq.png)

### Themes
If you pass the `--light` option, then the light theme will be activated (the default theme is dark).

```sh
# jlord's contributions, light theme
$ ghcal jlord --light
```

![](http://i.imgur.com/cBHu7DD.png)

### No ANSI styles
The `--no-ansi` option disables any colors in the output. Unicode characters, without colors will be used.

```sh
$ ghcal pengwynn --no-ansi
```

![](http://i.imgur.com/2D0wxpv.png)

## Documentation
If you're planning to use it as module somewhere, then the following info is for you.

### `GhCal(username)`
Fetches the GitHub contributions calendar, converting it into ASCII art.

#### Params
- **String** `username`: The username.

## How to contribute
1. File an issue in the repository, using the bug tracker, describing the
contribution you'd like to make. This will help us to get you started on the
right foot.
2. Fork the project in your account and create a new branch:
`your-great-feature`.
3. Commit your changes in that branch.
4. Open a pull request, and reference the initial issue in the pull request
message.

## License
See the [LICENSE](./LICENSE) file.

+ 23
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/bin/ghcal View File

@@ -0,0 +1,23 @@
#!/usr/bin/env node

var GhCal = require("../lib")
, GhConfig = {}
, Ul = require("ul")
, Logger = require("bug-killer")
, GitStatsColors = require("git-stats-colors")
;

Logger.config.displayDate = false;

try {
GhConfig = require(Ul.USER_DIR + "/.github-config.json");
} catch (e) {}

GhConfig.username = process.argv[2] || GhConfig.username;
GhCal(GhConfig.username, function (err, data) {
if (err) { return Logger.log(err, "error"); }
if (process.argv.indexOf("--no-ansi") === -1) {
data = GitStatsColors(data, process.argv.indexOf("--light") === -1 ? "DARK" : "LIGHT");
}
console.log(data);
});

+ 132
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/lib/index.js View File

@@ -0,0 +1,132 @@
// Dependencies
var Cheerio = require("cheerio")
, Request = require("request")
, CliBox = require("cli-box")
, AnsiParser = require("ansi-parser")
;

// Constants
const LEVELS = {
"#eeeeee": "⬚"
, "#d6e685": "▢"
, "#8cc665": "▤"
, "#44a340": "▣"
, "#1e6823": "■"
}
, DAYS = [
"Sun"
, "Mon"
, "Tue"
, "Wed"
, "Thu"
, "Fri"
, "Sat"
]
, MONTHS = [
"Jan"
, "Feb"
, "Mar"
, "Apr"
, "May"
, "Jun"
, "Jul"
, "Aug"
, "Sep"
, "Oct"
, "Nov"
, "Dec"
]
;

/**
* GhCal
* Fetches the GitHub contributions calendar, converting
* it into ASCII art.
*
* @name GhCal
* @function
* @param {String} username The username.
* @return {undefined}
*/
var GhCal = module.exports = function (username, callback) {

if (!username) {
return callback(new Error("Invalid username."));
}

var url = "http://github.com/users/" + username + "/contributions";
Request(url, function (err, res, body) {
if (err) { return callback(err); }
if (res.statusCode === 404) {
return callback(new Error("User doesn't exist."));
}
if (res.statusCode !== 200) {
return callback(new Error("Cannot fetch data for this user."));
}

var $ = Cheerio.load(body)
, $g = $("g > g")
, $cRect = null
, $rect = null
, y = 0
, str = ""
, months = []
, cDate = ""
, cColor = ""
, cMonth = null
, monthHack = "MMM"
, eq = -1
;

for (; y < 7; ++y) {
str += DAYS[y] + " ";
$g.each(function (i) {
$rect = $("rect", this);
eq = y;
if (i === 0) {
eq = y - 7 + $rect.length
if (eq < 0) {
str += " ";
return;
}
}
$cRect = $rect.eq(eq);
cColor = $cRect.attr("fill");
cDate = $cRect.attr("data-date");
if (!cColor || !cDate) { return; }
str += LEVELS[cColor] + " ";
cMonth = parseInt(cDate.split("-")[1]) - 1;
if (months.indexOf(MONTHS[cMonth]) === -1) {
months.push(MONTHS[cMonth]);
}
});
str += "\n";
}

str = monthHack + months.join(" ") + "\n" + str;
str = new CliBox({
w: 10
, h: 10
, marks: {
nw: "╔"
, n: "═"
, ne: "╗"
, e: "║"
, se: "╝"
, s: "═"
, sw: "╚"
, w: "║"
, b: " "
}
}, {
text: str
, stretch: true
, hAlign: "left"
}).toString();

str = AnsiParser.removeAnsi(str);
str = str.replace(monthHack, new Array(monthHack.length + 1).join(" "));

callback(null, str);
});
};

+ 5
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/.npmignore View File

@@ -0,0 +1,5 @@
*.swp
*.swo
*~
*.log
node_modules

+ 21
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/LICENSE View File

@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Ionică Bizău

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 88
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/README.md View File

@@ -0,0 +1,88 @@
# ANSI Parser
Parse strings containing ANSI style characters.

# Example

```js
var AnsiParser = require("../lib/index.js");
console.log(AnsiParser.parse("\u001b[1m\u001b[38;5;231mHello\u001b[0m\u001b[22m World"));
```

# Documentation
## `parse(input)`
Parses the string containing ANSI styles.

### Params
- **String** `input`: The input string.

### Return
- **Array** An array of object like below:
```js
[
{
style: "\u00\u001b[1m\u001b[38;5;231",
content: "H"
},
{
style: "\u00\u001b[1m\u001b[38;5;231",
content: "e"
},
...
]
```

## `getAtIndex(input, noAnsi, index)`
Returns the content and ANSI style at known index.

### Params
- **String** `input`: The input string.
- **String** `noAnsi`: The input string without containing ansi styles.
- **Number** `index`: The character index.

### Return
- **Object** An object containing the following fields:
- `style` (String): The ANSI style at provided index.
- `content` (String): The content (character) at provided index.

## `removeAnsi(input)`
Removes ANSI styles from the input string.

### Params
- **String** `input`: The input string.

### Return
- **String** The string without ANSI styles.

## `stringify(arr)`
Stringifies an array of objects in the format defined by `AnsiParser`.

### Params
- **Array** `arr`: The input array.

### Return
- **String** The stringified input array.

## `addChar(arr, c, s, e)`
Adds a new char into array.

### Params
- **Array** `arr`: The input array.
- **String** `c`: The char to add.
- **String** `s`: ANSI start style.
- **String** `e`: ANSI end style.

# How to contribute
1. File an issue in the repository, using the bug tracker, describing the
contribution you'd like to make. This will help us to get you started on the
right foot.
2. Fork the project in your account and create a new branch:
`your-great-feature`.
3. Commit your changes in that branch.
4. Open a pull request, and reference the initial issue in the pull request
message.

# Changelog
See the [releases page](https://github.com/IonicaBizau/node-ansi-parser/releases).

# License
See the [LICENSE](./LICENSE) file.

+ 236
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/lib/index.js View File

@@ -0,0 +1,236 @@
// Constructor
var AnsiParser = module.exports = {};

/**
* parse
* Parses the string containing ANSI styles.
*
* @name parse
* @function
* @param {String} input The input string.
* @return {Array} An array of object like below:
*
* ```js
* [
* {
* style: "\u00\u001b[1m\u001b[38;5;231",
* content: "H"
* },
* {
* style: "\u00\u001b[1m\u001b[38;5;231",
* content: "e"
* },
* ...
* ]
* ```
*/
AnsiParser.parse = function (input) {

var i = 0;
if (Array.isArray(input)) {
var arr = [];
for (i = 0; i < input.length; ++i) {
arr.push(AnsiParser.parse(input[i]));
}
return arr;
}

if (typeof input !== "string") {
throw new Error("Input is not a string.");
}

var noAnsi = AnsiParser.removeAnsi(input);
if (input === noAnsi) {
return input.split("").map(function (c) {
return {
style: ""
, content: c
};
});
}

var result = []
, sIndex = 0
, cmatch
, color = []
;

i = 0;
while (sIndex < input.length) {
cmatch = input.substr(sIndex).match(/^(\u001B\[[^m]*m)/);
if (cmatch) {
if (cmatch[0] == '\x1B[0m') {
color = [];
} else {
if (/^\u001b\[38;5/.test(cmatch[0]) && /^\u001b\[38;5/.test(color.slice(-1)[0])) {
color.splice(-1);
}
color.push(cmatch[0]);
}
sIndex += cmatch[0].length;
} else {
result.push({
style: color.join("")
, content: noAnsi[i++]
});
++sIndex;
}
}

return result;
};

/**
* getAtIndex
* Returns the content and ANSI style at known index.
*
* @name getAtIndex
* @function
* @param {String} input The input string.
* @param {String} noAnsi The input string without containing ansi styles.
* @param {Number} index The character index.
* @return {Object} An object containing the following fields:
*
* - `style` (String): The ANSI style at provided index.
* - `content` (String): The content (character) at provided index.
*/
AnsiParser.getAtIndex = function (input, noAnsi, index) {

if (typeof noAnsi === "number") {
index = noAnsi;
noAnsi = AnsiParser.removeAnsi(input);
}

if (input === noAnsi) {
return {
style: ""
, content: noAnsi[index]
};
}

var sIndex = 0
, eIndex = index
, color=[]
, cmatch
;

while (sIndex < input.length) {
cmatch = input.substr(sIndex).match(/^(\u001B\[[^m]*m)/);
if (cmatch) {
if (cmatch[0] == '\x1B[0m') {
color = [];
} else {
if (/^\u001b\[38;5/.test(cmatch[0]) && /^\u001b\[38;5/.test(color.slice(-1)[0])) {
color.splice(-1);
}
color.push(cmatch[0]);
}
sIndex += cmatch[0].length;
} else {
if (!eIndex) {
break;
}
++sIndex;
--eIndex;
}
}

return {
style: color.join("")
, content: noAnsi[index]
};
};

/**
* removeAnsi
* Removes ANSI styles from the input string.
*
* @name removeAnsi
* @function
* @param {String} input The input string.
* @return {String} The string without ANSI styles.
*/
AnsiParser.removeAnsi = function (input) {
return input.replace(/\u001b\[.*?m/g, "");
};

/**
* stringify
* Stringifies an array of objects in the format defined by `AnsiParser`.
*
* @name stringify
* @function
* @param {Array} arr The input array.
* @return {String} The stringified input array.
*/
AnsiParser.stringify = function (arr) {

var str = ""
, cArr = null
, i = 0
;

if (arr && Array.isArray(arr[0])) {
for (; i < arr.length; ++i) {
str += AnsiParser.stringify(arr[i]) + "\n";
}
str = str.replace(/\n$/, "");
return str;
}

var lastStyle = ""
, cStyle = ""
, uStyle = ""
;

for (; i < arr.length; ++i) {
cArr = arr[i];
if (cArr === undefined) {
cArr = arr[i] = { style: "", content: " " };
}

cStyle = cArr.style;
if (cStyle === lastStyle) {
uStyle = "";
} else {
if (cStyle === "") {
uStyle = "\u001b[0m";
lastStyle = "";
} else {
uStyle = cStyle;
lastStyle = cStyle;
}
}

str += uStyle + cArr.content;
if (cArr.content === "\n") {
str += "\u001b[0m";
}
}

if (!/\u001b\[0m$/.test(str)) {
str += "\u001b[0m";
}

return str;
};

/**
* addChar
* Adds a new char into array.
*
* @name addChar
* @function
* @param {Array} arr The input array.
* @param {String} c The char to add.
* @param {String} s ANSI start style.
* @param {String} e ANSI end style.
* @return {undefined}
*/
AnsiParser.addChar = function (arr, c, s, e) {
arr.push({
start: s || ""
, content: c
, start: e || ""
});
};

+ 63
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/package.json View File

@@ -0,0 +1,63 @@
{
"name": "ansi-parser",
"version": "1.4.0",
"description": "Parse strings containing ANSI style characters.",
"main": "lib/index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "node test/index.js"
},
"author": {
"name": "Ionică Bizău",
"email": "bizauionica@gmail.com",
"url": "http://ionicabizau.net/"
},
"contributors": [
{
"name": "Unihedron",
"email": "vyfcalt@gmail.com"
},
{
"name": "Jongware http://stackoverflow.com/users/2564301/jongware"
}
],
"devDependencies": {
"couleurs": "2.0.0"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/IonicaBizau/node-ansi-parser.git"
},
"keywords": [
"ansi",
"parser"
],
"bugs": {
"url": "https://github.com/IonicaBizau/node-ansi-parser/issues"
},
"homepage": "https://github.com/IonicaBizau/node-ansi-parser",
"gitHead": "e5d48c2b39a483a370b23b757c08f7c8e003b62e",
"_id": "ansi-parser@1.4.0",
"_shasum": "9fbf1d7f48351da5a8ebc8a7ce65ac8a09e2e14a",
"_from": "ansi-parser@>=1.4.0 <2.0.0",
"_npmVersion": "1.4.28",
"_npmUser": {
"name": "ionicabizau",
"email": "bizauionica@yahoo.com"
},
"maintainers": [
{
"name": "ionicabizau",
"email": "bizauionica@yahoo.com"
}
],
"dist": {
"shasum": "9fbf1d7f48351da5a8ebc8a7ce65ac8a09e2e14a",
"tarball": "http://registry.npmjs.org/ansi-parser/-/ansi-parser-1.4.0.tgz"
},
"_resolved": "https://registry.npmjs.org/ansi-parser/-/ansi-parser-1.4.0.tgz",
"readme": "ERROR: No README data found!"
}

+ 59
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/test/image View File

@@ -0,0 +1,59 @@
CCCCCCCCCGCCCGCCCG0CCCCCCCC0GCCCCCCCC0LLLLLLLLLCLLLLGCLLLLLGGCCCCCCCLGCCCCCCCCCCCCCfffffffffffff0CCCCLLLLCCLLLLCCCCCCC
LLLCLLLLLLLLL0CLLLCCCCCCCCCCLLLLLCCCC0CCCCCCCCCGCCCLCLLLLLfGCCCCCCCCCGLLLLLLLLLLLLLffffffffffffLGLCCCCLCGGCCCCCCCCCCCC
CLCGCCCCCCCCG0GCCC0GCCCCCCGCLLLLLLLLfG0CCCCCCCCCCCCC0CLCCCG0GCCCG0GCGGCCCG0GGGGGGGGffffffffffffLCLLLLLLCCCCCCCCCCCCCCC
LLLLLLGLfffffffffLCLLLLLLC8GLCCCCCCCC0GLCCCCCCCCCCCC000CCCCLLLLLCGCLLLCCCG0CCCCCLG0ffffffffffffGCLLLLLLGGCCCCCCCCCCCCC
CCCCCCGCLLLLLLLLLLGGGGLLLCCCCCCG0CCCCCCCGG0GCCCCCCCCLGGLLLLLLLLLLLfLLLLLLfG0GGGGGGGCCGGCCCCCCCCGGCCCCCG0GCCCCCCCCCCCCC
LLLLLLLLCLC0GCCCCCCCCGfffffffffL0LLLLLLLLLCCLLLLLLLLLGGLLLLLLLLLLLfLLLLLLfCGCCCCCCCCCGGCCCCCCCCCGCCCCCCCCCGGCCCCGCCCCC
CCCCCCCCCLGCLLLLLLLLLGfffffffffL0LLLLLLLLLCCLLLLLLLCL0GLLLLLLLLLCLLLLLLLLfCGCCCCCCCCCCGCCCCCCCCCGLLLLLLLLLCCLLLLGCLCLL
LGGCCCCCCCCLttfLLLLLLGfffffffffL0LLLLLLLLLCCLCLLLLLLfLfffffffffffffffffLLfC0CCCCCCCCCGGCCCCCCCCCGCLLLLLfLLC0CCCG0LLLLL
LGGCCCCCCftLttttffLLLGfffffffffL0LLLLLLLLLGGLLffftttttttttttttttttttttttffLGCCCCCCCCCGGCCCCCCCCCGCLCftCtttCGLLLLCfffff
CCCLLGCCCLttttCft1tLCGfffffffffL0LLLLLLLLLLfttttttttttttttttttttttttttttttfLLCCCCCCCCGGCCCCCCCCCGCLLttttftfLLLLLCfffff
fffftLLLLfLtt11tt11fLCfffffffffL0CCCCLLftttttttttttttttttttttttttttttttttttttfLLCGGGCGGCCCCCCCCCGCfLLtt1Lft1tLLLGGCCCC
CCCCCGCLLt1111ttttffftfftffffffL0t111ttttttttttttttttttttttttttttttttttttttttttftt111G0CCCCCCCffLLf1tt111t11tLLLCLLLLL
CCCCCLffffttttffffftttfffffffffft;;;1tttttttttttttttttttttttttttttttttttttttttt1i;;;;1LLLLLLLLfftffttttftttfffLLCCLLLL
LLLLCffftttfffttffffffftttft111t;;itfttttttttttttttttttttttttttttttttttttttttttttti;;;1111ttfffftttfffffffffftffLCCCCL
CCCCLffftffffffi1fftfffLfff111tti1ftttttttttttttttttttttttttttttttttttttttttttttttt1;;1111tfttffffffff1tffftttffffffff
CCCLffttffffLt11111L0008@880Cftttftttttttttttttttttttttttttttttttttttttttttttttttttt1;i111tfffffftttt1itfffffftfffffff
CCCGCffffffLCt111C0@@@@888@@80ftttttttttttfttffL0880G00CG00GG00GLCLLCLftttttttttttttt1111111t1tt1iiiii11tfffffttfttfff
CGCLLffffffLLt1if@@888888888GLttttttttfLG880088@@@@@@@@@@@@@@@@@@@@@@@80000GCCLft1111tt1111111iii1111iiitLCLffffffCCCL
LCLfffffffffft1iC@88888@880GfttttLCGC08@@@@@@@8888888888888888888888888@@@@@@@@80GGGf111111111iiiiiiiii1fLLLLLLLLLLGCL
CGLfffffffffft1iL@8888@80GGCfffC08@@@@88888888888888888888888888888888888888888@@@@@@0GGCt11111iiiiiiii1tLCCCCCCCCLCGC
LLGLLLLLLLLLLt111G@@@880G088@88@@88888888888@@@@@@@@@@@@@@@@@@@@@@@@@@@@@88@888888888@@@@0ft1ii1iiiiiii1fLLLLLLLLLLfCC
LCGGGGGGGGGGGf111ifG000G08@888888888888@@@@@8G0GffCGCt1fLttCGGL1fLttCGCC8@88@@@8888888888@@80Cti1iiiiii1fLLLLLLLLLLLGC
CGCCCCCGGGGGCt1111i11tC8@8888888888@@@@80fii;;;;;;;;;;;;;;;;;;;;;;;;;;;;;i;;1t0@@@@@@8888888@@@fi1iiiiii1LCCCCCCCCCCCC
LLLLLLCCLLLLLt111111if8@88888888@@@880f;;itLCCGGGGGCCCCLLLLLLLLCCCCGGGGGCCLf1;;i11LC8@8888888888ti11iii1tfffffffffffff
CCCCCCGGCCCCCt111111i0@888888@@80Lfi;;;fG8880000000008888888888880000000000880Li;;;;i8@@@888888@01ii1iiitLLLLLLLCLLLLL
CCCCCCGLLLLLLf111111C888888@8800C;;;;1G80000888@8000000000000000000000888@800080f;;;;f808@@88888@0Cti1i1fLCCCCCL0GCCCC
CCCCCCGCLLLLLt1111it@@8888@8000@t;;;1000008@@@@G8@8000000000000000008@@@@G8@80008f;;;i88008@@8888@@81ii1tLCCCCCLGCLLLL
LLLLLLCCCCCCCf1111if@888888G0@@@t;;;G00000@88@0ff0@00000000000000000@88@0ff8@00000i;;i8@80G088888@@Ci1i1fLCCCCCCGCLLLL
LLGGCCGCLLCCCf1111118@@@@8G8@@8@8t;;000000@CfLfffL@80000000000000008@CfLfffC@00008t;10@8@@8GG08888Lii1i1tLCCCCCCGGCCCC
ffLCLLLLLLLLLf1iiiiitCGGCCCG00@88@C;G00000@0fffffC@00000000000000000@GtffffG@00000if@@8@80GCCCLt1iiiiii1tfffffffLLLfCC
LLGGCCCCLLLLLf1i11i1iiiii1tfG00888@Ct800008@0LLLG@8000000000000000008@GLLLG@80008Lf@88@80GCCLtiiiiiiiiii1tffftffffffCL
LLGCCCCCCCCCCftiiiiiiiii11111G88888@LC00000888008800000000LfG0000000088000880000Gf8888880t111iiiiiiiiii1fLLLCCCCCCCCGL
ffLGCCCCLffLLt111111111111tt1f@@8888@888000GGGGGGG0000888800888800000GGGGGGG00088@88888@L11111i111iiiiitfLfffffLLLLLCG
LLCCLLLLLLLLLLf111111111ttffttf8@8888@8@88000000000088@888@@888@880000000000088@@8888@@L111111iiiiiiiiifLLLLLLLLLLLLLG
CCGCLLLLLLLLLft11111111fffffttttG@@@8888888888888888@888@@88@@888888888888888888888@@0f1111111iiiiiiiii1tLLLLLCCCLLLCG
LLCCLLLLLLLCLt111111111tftfftt111tG8@@@88888888888@8888888888888888@88888888888@@@80f111111111iiiiiiiii1tfLLLLCCCCCCCC
ffffffffffffft1111111111tttt11fG8C1tfC08@@@@@@@888880000888888800088888@@@@@@@88GLt11111111111iiiiiiiii1tfffffCLLLLLLL
LLLLLLLLLLLLL111111111111111f8@0CLt1111tLCG000008@@@@@@@@@@@@@@@@@@@@880880GCLf111111111111111iiiiiiiiii1LCCCCGCCCCCCC
GGCCCCGCLCCCCf11111111111111fGfttttt1111111111fttfLLCCCCLLLLLLLCCCLLft1fLLt1111111111111111111iiiiiiiii1fCGGGCCCCCCGGL
CCCCCCCCLLLLLf11111111111111111tttttttt1ttttfffttttt1ttttt111ttttttttt1tfLfttt1111111111111111iiiiiii1itfLLLLLLLLLLLCL
CCCCCCCGGCCGCt111111111111tttt1ttttttttttfffttttttfttfffffttffffttftttt1ffffffffLftfftttttttt1iiiiiii1itfLLLLLLLLLLLGL
CCCCCCCCCCCCLff111111111tfffffffffttttttttttttttttt11iii1Cft1iiiiittttttfffffffLLLfffffffffffft11iiiiiitfLCCCCGGGGLLLL
LLCGLLLLLfCCLft1111111tfffffffffffft1ttttttttttttttttttttCfft1tt1tftttttfLLLLLLLLfffffffffffffft1i1iiiifLCCCCCCCLCffff
LLCCffffffCCLf1111111fffffffffffffft1tttfLffLLfttttt@@@@@8@@@8@@@@LtttttfffffLLLLffftttttttttttt11ii1iifLCCCCCCCLCffff
CCCCCCCCCG0CCf11111tfffffffffffffff1ttttffffffttttt1LLLLCCCCLLCCLfttttt1ttfffLLLftttfffLLLLLLLLLLLf1i1i1fLCCCCCCLGCLLL
CLLLCLCCLCGCCft111tftffffffffffffft1ttttttttttLfffftfLffffffCfffffLLffLLfttt1tft1tLLLLLLLLLLLLLLLLLftii1fLCCCCGCCCCCCC
CCCCCCCCLLLLLt11tfffttt1ttttttttt1111tttttttttG80880LG0000GCG00000000000Cfffft111LLLLLLLLLLLLLLLLLLLLf11fLLLLLCLLLLLLL
CCCCCCGLfffffftfLfffffttfttttttttttffttttttttt1i11iitiiii;1t;iii;tt;1iiiffffffftfLLLLLLLLLLLLLLLLLLLLLLttCGCCCGGC0GGGG
CCCCCCCCLLLL00LLLLLLLLCCLLLLLLLLLLffffCffffLftiii;;ttiiii;1t;iiii1fi;iii1fffffffCCLLLLCCCCCCCCCCCCCCCCCCGGGC0CCCCCCCCC
CCCGGGGGGCG0@0LLLLLLLLGLLLLLLLLfffffLGGCfffii;;iiitt1iiiiifL1iiiiitft1iiiiifCCCGLCGCCCLCCCCCCCCCCCCCCCCCCCLC8CLLLLLLLL
GGGGGGGGGGGGG8GLLLLLL8CLCCCCCCLLLLLCCLLCCLLttfttfL111iiitCCCCf1i;i1ifLLfffffLLLLLLLLCCCLGGGGCCCCCCCCCCCCGG0800GCCCCCCC
CCCCCCCCCCCCLG0CCCGG00GCCCLLLLfttttttttttttfffCGGCf1ttfLLLLLLLLftt1tLLLLLLLLLLLLLLLLLLLLCCCCCCCCGG00G000GGCLLLLLLLffff
CCCCCCCCCCCCC8@0GCLLffffffffffffttttttttttttttf0GLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLCCCCCCCCCCCCC0@0LfffffLLLLLLLLLL
CCCCCCCCCCCL88LffffffffffffffffffffftttttttttttGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLCCCCCCCCCCCCCCCLG8ffLLLLLLLLLLLLLLL
CCCCCCCCCCL0@LffffffffffffffffffffffffffftttttfGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLCCCCCCCCCCCCCCCCCCCCC0GfLLLLLLLLLLLLLLLL
CCCCCCCCCCL08fffffffffffffffffffffffffffffffffL8CLLLLLLLLLLLLLLLLLLLLCCCCCCCCCCCCCCCCCCCCCCCCCCCCCL0CfLLLLLLLLLLLLLLLL
CCCCCCCCCCCG@Lfffffffffffffffffffffffffffffffff8GCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0LLLLLLLLLLLLLLLLLL
CCCCCCCCCCCC@Gfffffffffffffffffffffffffffffffff0GCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0LLLLLLLLLLLLLLLLLL
CCCCCCCCCCCC08LffffffffffffffffffffffffffffffftG0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCG0fLLLLLLLLLLLLLLLLL

+ 19
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/ansi-parser/test/index.js View File

@@ -0,0 +1,19 @@
var AnsiParser = require("../lib/index.js")
, Fs = require("fs")
, Couleurs = require("couleurs")()
, tests = [
Couleurs.fg("Text with one color", 255, 0, 0)
, Couleurs.bold("Bold text", 255, 0, 0)
, "| " + Couleurs.fg("12", 255, 0, 0)
, Couleurs.fg("Hello", 255, 0, 0) + " World! " + Couleurs.fg("Isn't this cool?", 0, 255, 0)
, Fs.readFileSync(__dirname + "/image", "utf-8")
];
;


for (var i=0; i < tests.length; ++i) {
console.log(">>> Test " + (i + 1));
console.log(tests[i]);
var out = AnsiParser.stringify(AnsiParser.parse(tests[i]));
console.log(out);
}

+ 5
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/.npmignore View File

@@ -0,0 +1,5 @@
*.swp
*.swo
*~
*.log
node_modules

+ 21
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/LICENSE View File

@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Ionică Bizău

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 114
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/README.md View File

@@ -0,0 +1,114 @@
Bug Killer
==========
A colored way to find bugs and fix them.

# Example

```js
// Dependencies
var Debug = require("../index");

// Set log level
Debug.config.logLevel = 4;

// Test defaults
Debug
.log("A fancy error message", "error")
.log("Info messages are useful", "info")
.log("Hey, you've got a warning", "warn")
;

// Don't show date
Debug.config.displayDate = false;
Debug.log("Display date is disabled.", "info");

// Custom type
Debug.config.myType = {
color: [0, 255, 200]
, text: "custom"
};

Debug.log("This is a custom message type", "myType");
```

# Documentation

## Methods

### `getDate()`
Returns the stringified date. This method can be overrided for a custom date format.

#### Return
- **String** The date in HH:mm.ss - DD.MM.YYYY format.

### `log(message, type)`
Displays debug messages by providing the type.

#### Params
- **String** `message`: The debug message that should be displayed
- **String** `type`: The message type (e.g. "error", "info" etc)

#### Return
- **Object** BugKiller instance


## Other fields

### `config`
An object contaning the configuration of the module.
Default:

```js
// Config
BugKiller.config = {
error: {
color: [192, 57, 43]
, text: "error"
, level: 1
}
, warn: {
color: [241, 196, 15]
, text: "warn "
, level: 2
}
, info: {
color: [52, 152, 219]
, text: "info "
, level: 3
}
, displayDate: true
, logLevel: 2
};
```

It can be extended to accept any type of message (see example).

# How to contribute

1. File an issue in the repository, using the bug tracker, describing the
contribution you'd like to make. This will help us to get you started on the
right foot.
2. Fork the project in your account and create a new branch:
`your-great-feature`.
3. Commit your changes in that branch.
4. Open a pull request, and reference the initial issue in the pull request
message.

# Changelog

## `1.0.0`
- Removed almost useless if statement that was checking if `type` is valid. The programmer is responsible for that and should use existing message types.
- Updated `couleurs` dependency.
- Lowercase message types.
- `_config` becomes `config`
- `getDate` handler. Fixes #3.
- Use `process.stdout.isTTY` to handle redirected output. Fixes #2.

## `v0.1.1`
- Implemented log level

## `v0.1.0`
- Initial release

# License
See the [LICENSE](/LICENSE) file.

+ 94
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/index.js View File

@@ -0,0 +1,94 @@
// Dependencies
var Couleurs = require("couleurs")();

// Constructor
var BugKiller = module.exports = {};

// Config
BugKiller.config = {
error: {
color: [192, 57, 43]
, text: "error"
, level: 1
}
, warn: {
color: [241, 196, 15]
, text: "warn "
, level: 2
}
, info: {
color: [52, 152, 219]
, text: "info "
, level: 3
}
, displayDate: true
, logLevel: 2
};

/**
* getDate
* Returns the stringified date. This method can be overrided for a custom date format.
*
* @name getDate
* @function
* @return {String} The date in HH:mm.ss - DD.MM.YYYY format.
*/
BugKiller.getDate = function () {

var date = new Date()
, hour = date.getHours()
, min = date.getMinutes()
, sec = date.getSeconds()
, year = date.getFullYear()
, month = date.getMonth() + 1
, day = date.getDate()
;

hour = (hour < 10 ? "0" : "") + hour;
min = (min < 10 ? "0" : "") + min;
sec = (sec < 10 ? "0" : "") + sec;
month = (month < 10 ? "0" : "") + month;
day = (day < 10 ? "0" : "") + day;

return "[" + hour + ":" + min + "." + sec + " - " + day + "." + month + "." + year + "]";
};

/**
* log
* Displays debug messages by providing the type.
*
* @name log
* @function
* @param {String} message The debug message that should be displayed
* @param {String} type The message type (e.g. "error", "info" etc)
* @return {Object} BugKiller instance
*/
BugKiller.log = function (message, type) {

var logMessage = "";

// Get type from config
type = BugKiller.config[type];
if (type.level > BugKiller.config.logLevel) {
return BugKiller;
}

// Build message
logMessage += Couleurs.bold(Couleurs.rgb(type.text, type.color)) + " ";
if (BugKiller.config.displayDate) {
logMessage += BugKiller.getDate() + " ";
}

// Add message
logMessage += message;

// No fun when stdout is not TTY
if (!process.stdout.isTTY) {
logMessage = logMessage.replace(/\u001b\[.*?m/g, "");
}

// Print message
console.log(logMessage);

return BugKiller;
};

+ 4
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/.npmignore View File

@@ -0,0 +1,4 @@
*.swp
*~
*.log
node_modules

+ 21
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/LICENSE View File

@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Ionică Bizău

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 96
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/README.md View File

@@ -0,0 +1,96 @@
Couleurs
========
Add some color and styles to your Node.JS strings. :smile:

![](http://i.imgur.com/M83wW95.png)

## Example

### Without modifying `String.prototype`

```js
var Couleurs = require("couleurs")();

console.log(Couleurs.rgb("Red", [255, 0, 0]));
console.log(Couleurs.rgb("Yellow", 255, 255, 0));
console.log(Couleurs.rgb("Blue", "#2980b9"));
console.log(Couleurs.bold("Bold"));
console.log(Couleurs.italic("Italic"));
// etc
```

### Modifying `String.prototype`

```js
var Couleurs = require("couleurs")(true);

console.log("Underline".underline());
console.log("Inverse".inverse());
console.log("Strikethrough".strikethrough());

console.log("All combined"
.rgb("#d35400")
.bold()
.italic()
.underline()
.inverse()
.strikethrough()
);
```

## Documentation

### `Couleurs(setStringProto)`

#### Params
- **Boolean|undefined** `setStringProto`: If `true`, the prototype of String class will be modified.

#### Return
- **Object** An object containing the following methods:
- `rgb`
- `bold`
- `italic`
- `underline`
- `inverse`
- `strikethrough`

### `couleurs.rgb(str, r, g, b)` or `str.rgb(r, g, b)`
Creates a colored string providing the color.

#### Params
- **String** `str`: The input string.
- **String|Array|Number** `r`: If number, it will be the red value from RGB. If array, it should be an array of three numbers representing RGB values.
If String, it will be interpreted as HEX color.
- **Number** `g`: Green value
- **Number** `b`: Blue value

#### Return
- **String** Colored string

### `couleurs.<style>(str)` or `str.<style>()`
`<style>` can be: `bold`, `italic`, `underline`, `inverse`, `strikethrough`.

#### Params
- **String** `str`: The input string.

#### Return:
* **String** Styled string

## Changelog

### 1.1.0
- Do not modify the `String.prototype` object by default. Fixes #1.
- The module exports a function.
- ~~Do not add colors/styles if the output is not a terminal. Fixes #2.~~

### 1.0.0
- Handle other styles (**bold**, *italic*, ~~strikethrough~~ etc)

### v0.2.0
- Handle hex color codes

### v0.1.x
- Initial releases.

## License
See the [LICENSE](/LICENSE) file.

+ 98
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/index.js View File

@@ -0,0 +1,98 @@
// Dependencies
var x256 = require("x256")

// Constants
const map = {
bold: ["\x1B[1m", "\x1B[22m"]
, italic: ["\x1B[3m", "\x1B[23m"]
, underline: ["\x1B[4m", "\x1B[24m"]
, inverse: ["\x1B[7m", "\x1B[27m"]
, strikethrough: ["\x1B[9m", "\x1B[29m"]
};

/**!
* hexToRgb
* Converts a hex color code to rgb
*
* @name hexToRgb
* @function
* @param {String} hex The hex color value.
* @return {Array|null} An array containing `r`, `g`, `b` values. If the input is invalid, `null` will be returned.
*/
function hexToRgb (hex) {
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
return r + r + g + g + b + b;
});

var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? [
parseInt(result[1], 16),
parseInt(result[2], 16),
parseInt(result[3], 16)
] : null;
}

/**
* Couleurs
*
* @name Couleurs
* @function
* @param {Boolean|undefined} setStringProto If `true`, the prototype of String class will be modified.
* @return {Object} An object containing the following methods:
*
* - `rgb`
* - `bold`
* - `italic`
* - `underline`
* - `inverse`
* - `strikethrough`
*
*/
module.exports = function (setStringProto) {

/**
* rgb
* Creates a colored string providing the color.
*
* @name rgb
* @function
* @param {String} str The input string.
* @param {String|Array|Number} r If number, it will be the red value from RGB.
* If array, it should be an array of three numbers representing RGB values.
* If String, it will be interpreted as HEX color.
* @param {Number} g Green value
* @param {Number} b Blue value
* @return {String} Colored string
*/
function rgb(str, r, g, b) {
if (r[0] === "#") {
return rgb.call(this, str, hexToRgb(r));
}

return "\x1b[38;5;" + x256(r, g, b) + "m" + str + "\033[0m";
}

// Build couleurs object
var couleurs = { rgb: rgb };
for (var key in map) {
(function (style, styleId) {
couleurs[styleId] = function (str) {
return style[0] + str + style[1];
};
})(map[key], key)
}

// Modify String prototype
if (setStringProto === true) {
for (var meth in couleurs) {
(function (meth, func) {
String.prototype[meth] = function (r, g, b) {
return func.call(this, String(this), r, g, b);
};
})(meth, couleurs[meth]);
}
}

return couleurs;
};

+ 6
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/.travis.yml View File

@@ -0,0 +1,6 @@
language: node_js
node_js:
- 0.8
- "0.10"
before_install:
- npm install -g npm@~1.4.6

+ 256
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/colors.json View File

@@ -0,0 +1,256 @@
["000000",
"800000",
"008000",
"808000",
"000080",
"800080",
"008080",
"c0c0c0",
"808080",
"ff0000",
"00ff00",
"ffff00",
"0000ff",
"ff00ff",
"00ffff",
"ffffff",
"000000",
"00005f",
"000087",
"0000af",
"0000d7",
"0000ff",
"005f00",
"005f5f",
"005f87",
"005faf",
"005fd7",
"005fff",
"008700",
"00875f",
"008787",
"0087af",
"0087d7",
"0087ff",
"00af00",
"00af5f",
"00af87",
"00afaf",
"00afd7",
"00afff",
"00d700",
"00d75f",
"00d787",
"00d7af",
"00d7d7",
"00d7ff",
"00ff00",
"00ff5f",
"00ff87",
"00ffaf",
"00ffd7",
"00ffff",
"5f0000",
"5f005f",
"5f0087",
"5f00af",
"5f00d7",
"5f00ff",
"5f5f00",
"5f5f5f",
"5f5f87",
"5f5faf",
"5f5fd7",
"5f5fff",
"5f8700",
"5f875f",
"5f8787",
"5f87af",
"5f87d7",
"5f87ff",
"5faf00",
"5faf5f",
"5faf87",
"5fafaf",
"5fafd7",
"5fafff",
"5fd700",
"5fd75f",
"5fd787",
"5fd7af",
"5fd7d7",
"5fd7ff",
"5fff00",
"5fff5f",
"5fff87",
"5fffaf",
"5fffd7",
"5fffff",
"870000",
"87005f",
"870087",
"8700af",
"8700d7",
"8700ff",
"875f00",
"875f5f",
"875f87",
"875faf",
"875fd7",
"875fff",
"878700",
"87875f",
"878787",
"8787af",
"8787d7",
"8787ff",
"87af00",
"87af5f",
"87af87",
"87afaf",
"87afd7",
"87afff",
"87d700",
"87d75f",
"87d787",
"87d7af",
"87d7d7",
"87d7ff",
"87ff00",
"87ff5f",
"87ff87",
"87ffaf",
"87ffd7",
"87ffff",
"af0000",
"af005f",
"af0087",
"af00af",
"af00d7",
"af00ff",
"af5f00",
"af5f5f",
"af5f87",
"af5faf",
"af5fd7",
"af5fff",
"af8700",
"af875f",
"af8787",
"af87af",
"af87d7",
"af87ff",
"afaf00",
"afaf5f",
"afaf87",
"afafaf",
"afafd7",
"afafff",
"afd700",
"afd75f",
"afd787",
"afd7af",
"afd7d7",
"afd7ff",
"afff00",
"afff5f",
"afff87",
"afffaf",
"afffd7",
"afffff",
"d70000",
"d7005f",
"d70087",
"d700af",
"d700d7",
"d700ff",
"d75f00",
"d75f5f",
"d75f87",
"d75faf",
"d75fd7",
"d75fff",
"d78700",
"d7875f",
"d78787",
"d787af",
"d787d7",
"d787ff",
"d7af00",
"d7af5f",
"d7af87",
"d7afaf",
"d7afd7",
"d7afff",
"d7d700",
"d7d75f",
"d7d787",
"d7d7af",
"d7d7d7",
"d7d7ff",
"d7ff00",
"d7ff5f",
"d7ff87",
"d7ffaf",
"d7ffd7",
"d7ffff",
"ff0000",
"ff005f",
"ff0087",
"ff00af",
"ff00d7",
"ff00ff",
"ff5f00",
"ff5f5f",
"ff5f87",
"ff5faf",
"ff5fd7",
"ff5fff",
"ff8700",
"ff875f",
"ff8787",
"ff87af",
"ff87d7",
"ff87ff",
"ffaf00",
"ffaf5f",
"ffaf87",
"ffafaf",
"ffafd7",
"ffafff",
"ffd700",
"ffd75f",
"ffd787",
"ffd7af",
"ffd7d7",
"ffd7ff",
"ffff00",
"ffff5f",
"ffff87",
"ffffaf",
"ffffd7",
"ffffff",
"080808",
"121212",
"1c1c1c",
"262626",
"303030",
"3a3a3a",
"444444",
"4e4e4e",
"585858",
"606060",
"666666",
"767676",
"808080",
"8a8a8a",
"949494",
"9e9e9e",
"a8a8a8",
"b2b2b2",
"bcbcbc",
"c6c6c6",
"d0d0d0",
"dadada",
"e4e4e4",
"eeeeee"]

+ 5
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/example/charm.js View File

@@ -0,0 +1,5 @@
var x256 = require('../');
var charm = require('charm')(process.stdout);

var ix = x256(220,40,150);
charm.foreground(ix).write('beep boop');

+ 3
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/example/ix.js View File

@@ -0,0 +1,3 @@
var x256 = require('../');
var ix = x256(220,40,150);
console.log(ix);

+ 3
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/example/raw.js View File

@@ -0,0 +1,3 @@
var x256 = require('../');
var ix = x256(220,40,150);
console.log('\x1b[38;5;' + ix + 'mBEEEEEP');

+ 35
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/index.js View File

@@ -0,0 +1,35 @@
// colors scraped from
// http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
// %s/ *\d\+ \+#\([^ ]\+\)/\1\r/g

var colors = require('./colors.json')
.map(function (hex) {
var r = parseInt(hex.slice(0,2), 16);
var g = parseInt(hex.slice(2,4), 16);
var b = parseInt(hex.slice(4,6), 16);
return [ r, g, b ];
})
;

var x256 = module.exports = function (r, g, b) {
var c = Array.isArray(r) ? r : [ r, g, b ];
var best = null;
for (var i = 0; i < colors.length; i++) {
var d = distance(colors[i], c)
if (!best || d <= best.distance) {
best = { distance : d, index : i };
}
}
return best.index;
};
x256.colors = colors;

function distance (a, b) {
return Math.sqrt(
Math.pow(a[0]-b[0], 2)
+ Math.pow(a[1]-b[1], 2)
+ Math.pow(a[2]-b[2], 2)
)
}

+ 78
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/package.json View File

@@ -0,0 +1,78 @@
{
"name": "x256",
"description": "find the nearest xterm 256 color index for an rgb",
"version": "0.0.2",
"repository": {
"type": "git",
"url": "git://github.com/substack/node-x256.git"
},
"main": "index.js",
"keywords": [
"256",
"terminal",
"colors",
"xterm",
"ansi"
],
"directories": {
"test": "test"
},
"scripts": {
"test": "tape test/*.js"
},
"devDependencies": {
"tape": "^2.13.3"
},
"engines": {
"node": ">=0.4.0"
},
"license": "MIT",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8..latest",
"firefox/15",
"firefox/latest",
"firefox/nightly",
"chrome/15",
"chrome/latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
},
"gitHead": "ac236ad1384fde24f5d8cda6c4649e9bd5a72ada",
"bugs": {
"url": "https://github.com/substack/node-x256/issues"
},
"homepage": "https://github.com/substack/node-x256",
"_id": "x256@0.0.2",
"_shasum": "c9af18876f7a175801d564fe70ad9e8317784934",
"_from": "x256@>=0.0.1 <0.1.0",
"_npmVersion": "1.4.15",
"_npmUser": {
"name": "substack",
"email": "mail@substack.net"
},
"maintainers": [
{
"name": "substack",
"email": "mail@substack.net"
}
],
"dist": {
"shasum": "c9af18876f7a175801d564fe70ad9e8317784934",
"tarball": "http://registry.npmjs.org/x256/-/x256-0.0.2.tgz"
},
"_resolved": "https://registry.npmjs.org/x256/-/x256-0.0.2.tgz",
"readme": "ERROR: No README data found!"
}

+ 83
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/readme.markdown View File

@@ -0,0 +1,83 @@
# x256

return the nearest
[xterm 256 color code](http://www.frexx.de/xterm-256-notes/)
for rgb inputs.

[![testling badge](https://ci.testling.com/substack/node-x256.png)](https://ci.testling.com/substack/node-x256)

[![build status](https://secure.travis-ci.org/substack/node-x256.png)](http://travis-ci.org/substack/node-x256)

# example

You can just print the index:

``` js
var x256 = require('x256');
var ix = x256(220,40,150);
console.log(ix);
```

output:

```
162
```

or you can use raw ansi escape codes:

``` js
var x256 = require('x256');
var ix = x256(220,40,150);
console.log('\x1b[38;5;' + ix + 'mBEEEEEP');
```

output:

![x256 raw beep](http://substack.net/images/screenshots/x256_raw_beep.png)

or you can use [charm](https://github.com/substack/node-charm):

``` js
var x256 = require('x256');
var charm = require('charm')(process.stdout);

var ix = x256(220,40,150);
charm.foreground(ix).write('beep boop');
```

output:

![x256 charm beep boop](http://substack.net/images/screenshots/x256_charm_beep_boop.png)

# methods

```
var x256 = require('x256')
```

## x256(red, green, blue)

Return the nearest xterm 256 color code for the 24-bit `[red, green, blue]`
values.

`red`, `green`, and `blue` should each be integers from 0 through 255,
inclusive.

# attributes

## x256.colors

array of `[red,green,blue]` 24-bit color arrays indexed by xterm 256 color code

# install

With [npm](http://npmjs.org) do:

```
npm install x256
```

# license

MIT

+ 36
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/node_modules/x256/test/id.js View File

@@ -0,0 +1,36 @@
var test = require('tape');
var x256 = require('../');

function fudge (x) {
return Math.max(0, Math.min(255, Math.round(
x + Math.random() * 10 - 5
)));
}

test(function (t) {
t.plan(256 + 2);
t.equal(x256.colors.length, 256);
var missed = 0;
x256.colors.forEach(function (color, ix) {
var c = x256(color);
if (ix < 16 && c >= 16) {
t.same(x256.colors[c], x256.colors[ix]);
}
else {
t.equal(c, ix);
}
var i = x256([
fudge(color[0]),
fudge(color[1]),
fudge(color[2])
]);
if (i !== c && i !== ix) missed ++;
});
t.ok(missed < 10, 'missed=' + missed);
t.end();
});

+ 57
- 0
ghcal/pkg/nodejs-ghcal/usr/lib/node_modules/ghcal/node_modules/bug-killer/node_modules/couleurs/package.json View File

@@ -0,0 +1,57 @@
{
"name": "couleurs",
"version": "1.1.0",
"description": "Add some color and styles to your Node.JS strings.",
"main": "index.js",
"scripts": {
"test": "node test/index.js"
},
"repository": {
"type": "git",
"url": "https://github.com/IonicaBizau/couleurs"
},
"keywords": [
"colors",
"ascii",
"256",
"terminal"
],
"author": {
"name": "Ionică Bizău",
"email": "bizauionica@gmail.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/IonicaBizau/couleurs/issues"
},
"homepage": "https://github.com/IonicaBizau/couleurs",
"directories": {
"test": "test"
},
"dependencies": {
"x256": "~0.0.1"
},
"devDependencies": {},
"gitHead": "9f50716951ae54c2eb9e69a0f924eb7c37af38fd",
"_id": "couleurs@1.1.0",
"_shasum": "7ac5fc7e56959bf