Kajero

交互式 JavaScript 笔记本与巧妙的图形化。(Interactive JavaScript notebooks with clever graphing)

  • 所有者: JoelOtter/kajero
  • 平台: Linux, Mac, Web browsers, Windows
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Kajero

交互式 JavaScript 笔记本与巧妙的图形。

你可以在这里查看笔记本的样本。

特性

  • 这只是一个 Markdown - 一个 Kajero 笔记本只是一个附加了脚本的 Markdown 文档。
  • 每个笔记本都可以在浏览器中完全编辑,并且可以保存为 Markdown 或 HTML。
  • 笔记本也可以作为 Gists 发布,为你的笔记本生成一个独特的 URL。
  • JavaScript 代码块可以被执行。它们被视为函数,其返回值也是可视化的。Kajero 可以可视化数组和对象,类似于 Chrome 的对象检查器。
    • 代码块可以被设置为在笔记本加载时自动运行。它们也可以被设置为隐藏,因此只有结果是可见的。
  • 可以定义数据源。这些数据源将在笔记本加载时自动获取,并在代码块中使用。
  • 包含 Reshaper,用于结构化数据的自动重塑。
  • 包括 D3、NVD3 和 Jutsu,这是一个非常简单的图形库,它使用 Reshaper 将任意数据转化为可以绘制的形式。

相关项目

  • Reshaper -- 重塑数据以匹配模式。
  • Smolder -- 一个试图使用 Reshaper 重塑进入你的函数的数据的库包装器。
  • Jutsu -- 一个简单的图形库,支持Smolder。

贡献

欢迎提出问题和 PR 请求。

命令行工具

Kajero 包含了一些简单的命令行工具,对于不想使用内嵌式编辑器创建笔记本的用户来说,这些工具可以帮助他们创建笔记本。

安装方法

npm install -g kajero,或者克隆这个仓库。

你可以通过运行 npm install,然后运行 gulp 来构建 JS 库。对于生产版本,NODE_ENV=production gulp

命令

你可以直接从 Markdown 文件生成新的笔记本,而不需要使用网页编辑器。

kajero html [file.md]

将输出生成的新笔记本的HTML。你可以像这样用管道将其输出到一个文件中。

kajero html [file.md] > output.html
kajero publish [file.md]

将把你的笔记本发布为一个 gist,并返回一个独特的 URL 到你的新笔记本。你不需要构建 JS 库,这些脚本就可以工作。

运行测试

用 npm test 运行单元测试。

对于覆盖率报告,使用 npm run test-cov 运行。请注意,覆盖率可能并不完全正确--这是因为伊斯坦布尔是在编译后的 ES5 代码上运行的,而不是 ES6 源代码。


(The first version translated by vz on 2020.09.16)

主要指標

概覽
名稱與所有者JoelOtter/kajero
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台Linux, Mac, Web browsers, Windows
許可證Other
所有者活动
創建於2016-04-01 14:31:41
推送於2017-06-27 15:30:46
最后一次提交2016-06-27 14:26:54
發布數0
用户参与
星數1.9k
關注者數47
派生數106
提交數111
已啟用問題?
問題數58
打開的問題數12
拉請求數1
打開的拉請求數0
關閉的拉請求數3
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Kajero

npm Join the chat at https://gitter.im/JoelOtter/kajero

Interactive JavaScript notebooks with clever graphing.

You can view a sample notebook here.

Features

  • It's just Markdown - a Kajero notebook is just a Markdown document with a script attached.
  • Every notebook is fully editable in the browser, and can be saved as Markdown or HTML.
  • Notebooks can also be published as Gists, generating a unique URL for your notebook.
  • JavaScript code blocks can be executed. They're treated as functions, with their return value visualised. Kajero can visualise arrays and objects, similar to the Chrome object inspector.
    • Code blocks can be set to run automatically when the notebook loads. They can also be set to hidden, so that only the result is visible.
  • Data sources can be defined. These will be automatically fetched when the notebook is loaded, and made available for use inside code blocks.
  • Includes Reshaper, for automatic reshaping of structured data.
  • Includes D3, NVD3 and Jutsu, a very simple graphing library which uses Reshaper to transform arbitrary data into a form that can be graphed.
  • Reshaper - reshape data to match a schema
  • Smolder - a library wrapper that attempts to reshape data going into your functions, using Reshaper
  • Jutsu - a simple graphing library, with support for Smolder

Contributing

Issues and Pull Requests are both extremely welcome!

Command-line tools

Kajero includes a couple of simple command-line tools for users who don't want to use the inline editor to create their notebooks.

Installation

npm install -g kajero, or clone this repository.

You can build the JS library by running npm install, followed by gulp. For a production build, NODE_ENV=production gulp.

Commands

You can generate new notebooks directly from Markdown files without using the web editor.

  • kajero html [file.md]

Will output generated HTML of a new notebook. You can pipe it to a file like this:

kajero html [file.md] > output.html

  • kajero publish [file.md]

Will publish your notebook as a gist, and return a unique URL to your new notebook. You don't need to build the JS library for these scripts to work.

Running tests

Run the unit tests with npm test.

For coverage reporting, run with npm run test-cov. Note that the coverage percentages may not be exactly correct - this is because Istanbul runs over the compiled ES5 code, rather than the ES6 source.