{"id":26795,"date":"2015-01-19T17:18:26","date_gmt":"2015-01-19T08:18:26","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=26795"},"modified":"2015-01-19T17:18:27","modified_gmt":"2015-01-19T08:18:27","slug":"blessed-contrib","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/blessed-contrib\/","title":{"rendered":"blessed-contrib - \u30bf\u30fc\u30df\u30ca\u30eb\u306b\u30af\u30fc\u30eb\u306a\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8868\u793a"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/Inode.png\" alt=\"Node\" title=\"node.png\" border=\"0\" width=\"546\" height=\"397\" \/><\/p>\n<p>\u300c<a href=\"https:\/\/github.com\/yaronn\/blessed-contrib\">blessed-contrib<\/a>\u300d\u306f\u30a2\u30b9\u30ad\u30fc\u30c6\u30ad\u30b9\u30c8\u3068javascript\u3092\u4f7f\u3063\u3066\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30d7\u30ed\u5411\u3051\u30c4\u30fc\u30eb\u3067\u3059\u3002node.js\u3067\u4f5c\u3089\u308c\u305fcurses\u98a8\u306e\u30e9\u30a4\u30d6\u30e9\u30ea<a href=\"https:\/\/github.com\/chjj\/blessed\">blessed<\/a>\u3092\u3001<a href=\"https:\/\/github.com\/madbence\/node-drawille\">drawille<\/a>\u3084\u305d\u306e\u4ed6\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3067\u62e1\u5f35\u3057\u305f\u3082\u306e\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u306e\u30ed\u30b0\u3084\u3001\u30de\u30b7\u30f3\u306e\u60c5\u5831\u306a\u3069\u81ea\u5206\u306e\u5fc5\u8981\u306a\u60c5\u5831\u3092\u30b5\u30af\u30c3\u3068\u8868\u793a\u3067\u304d\u308b\u4fbf\u5229\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002<br \/>\n<!--more--><\/p>\n<h3>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u307e\u305a\u3069\u3093\u306a\u3082\u306e\u304b\u96f0\u56f2\u6c17\u3092\u4f7f\u3046\u305f\u3081\u306b\u30c7\u30e2\u3092\u52d5\u304b\u3057\u3066\u307f\u308b\u306e\u304c\u624b\u3063\u53d6\u308a\u65e9\u3044\u3067\u3057\u3087\u3046\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>\ngit clone https:\/\/github.com\/yaronn\/blessed-contrib.git\ncd blessed-contrib\nnpm install\nnode .\/examples\/dashboard.js\n<\/pre>\n<p>\u3059\u308b\u3068\u6700\u521d\u306e\u753b\u9762\u306e\u3088\u3046\u306a\u30c7\u30e2\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u5404\u7a2e\u30c1\u30e3\u30fc\u30c8\u3001\u4e16\u754c\u5730\u56f3\u3001\u30ed\u30b0\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u60c5\u5831\u306a\u3069\u304c\u305d\u308c\u3063\u307d\u304f\u8868\u793a\u3055\u308c\u3066\u3068\u3066\u3082\u30ab\u30c3\u30b3\u30a4\u30a4\u3067\u3059\u3002<\/p>\n<h3>\u4f7f\u7528\u53ef\u80fd\u306a\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8<\/h3>\n<p>\u4f7f\u7528\u53ef\u80fd\u306a\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u3082\u306e\u304c\u6319\u3052\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage80.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"546\" height=\"270\" \/><\/p>\n<p>\u2191\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage81.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"459\" height=\"307\" \/><\/p>\n<p>\u2191\u68d2\u30b0\u30e9\u30d5\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage82.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"546\" height=\"263\" \/><\/p>\n<p>\u2191\u4e16\u754c\u5730\u56f3\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage83.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"309\" height=\"156\" \/><\/p>\n<p>\u2191\u30d7\u30ed\u30b0\u30ec\u30b9\u30d0\u30fc\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage84.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"309\" height=\"303\" \/><\/p>\n<p>\u2191\u30ed\u30b0\u8868\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage85.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"309\" height=\"156\" \/><\/p>\n<p>\u2191\u30b9\u30d1\u30fc\u30af\u30e9\u30a4\u30f3\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/01\/INewImage86.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"459\" height=\"306\" \/><\/p>\n<p>\u2191\u30c6\u30fc\u30d6\u30eb<\/p>\n<p>\u3053\u308c\u3089\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u3046\u307e\u304f\u7d44\u5408\u305b\u3066\u914d\u7f6e\u3057\u3001\u81ea\u5206\u306e\u5f79\u306b\u7acb\u3064\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"javascript\">var blessed = require('blessed')\n     , contrib = require('blessed-contrib')\n     , screen = blessed.screen()\n     , grid = new contrib.grid({rows: 1, cols: 2})\n\n   grid.set(0, 0, contrib.line, \n     { style: \n       { line: \"yellow\"\n       , text: \"green\"\n       , baseline: \"black\"}\n     , xLabelPadding: 3\n     , xPadding: 5\n     , label: 'Stocks'})\n\n   grid.set(0, 1, contrib.map, {label: 'Servers Location'})\n\n   grid.applyLayout(screen)\n\n   var line = grid.get(0, 0)\n   var map = grid.get(0, 1)\n\n   var lineData = {\n      x: ['t1', 't2', 't3', 't4'],\n      y: [5, 1, 7, 5]\n   }\n\n   line.setData(lineData.x, lineData.y)\n\n   screen.key(['escape', 'q', 'C-c'], function(ch, key) {\n     return process.exit(0);\n   });\n\n   screen.render()\n<\/code><\/pre>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u666e\u6bb5\u304b\u3089\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u4f7f\u3063\u3066\u3044\u308b\u958b\u767a\u8005\u3084\u30b5\u30fc\u30d0\u30fc\u7ba1\u7406\u8005\u306a\u3089\u3070\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u4f7f\u3063\u305f\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u6709\u52b9\u6d3b\u7528\u3067\u304d\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u898b\u305f\u76ee\u304c\u30ab\u30c3\u30b3\u30a4\u30a4\u306e\u3067\u4f7f\u3044\u3053\u306a\u305b\u308c\u3070\u5468\u56f2\u304b\u3089\u4e00\u76ee\u7f6e\u304b\u308c\u308b\u3053\u3068\u306f\u9593\u9055\u3044\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cblessed-contrib\u300d\u306f\u30a2\u30b9\u30ad\u30fc\u30c6\u30ad\u30b9\u30c8\u3068javascript\u3092\u4f7f\u3063\u3066\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30d7\u30ed\u5411\u3051\u30c4\u30fc\u30eb\u3067\u3059\u3002node.js\u3067\u4f5c\u3089\u308c\u305fcurses\u98a8\u306e\u30e9\u30a4\u30d6\u30e9\u30eablessed\u3092\u3001d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":26787,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[2921,655,1787],"class_list":["post-26795","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-blessed","tag-javascript","tag-node-js"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/26795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=26795"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/26795\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/26787"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=26795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=26795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=26795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}