개요
- runbox 스펙
v1
box 유형
| box |
입력 |
출력 |
lang 옵션 |
box 단위 식별 |
비고
|
| run |
단일 cell |
단일 출력 |
단일 lang 지원, 필수 |
불필요 |
-
|
| multi |
멀티 cell |
단일 출력 |
멀티 lang 지원, 생략가능 |
multi={id} |
파일명 없으면 runbox.{lang}
|
| notebook |
멀티 cell |
멀티 출력 |
단일 lang 지원, 필수 |
notebook={id} |
입력 출력 1:1
|
api 유형
| box |
lang |
api |
비고
|
| run
|
bash, c, cpp, csharp, go, java, kotlin, perl, php, python, r, ruby, sqlite3
|
run
|
|
| html, javascript
|
front
|
|
| tex, latex
|
tex
|
|
| multi
|
bash, c, cpp, csharp, go, java, kotlin, perl, php, python, r, ruby, sqlite3
|
multi
|
|
| html, javascript
|
TBD
|
|
| tex, latex
|
TBD
|
|
| notebook
|
python, r
|
notebook
|
|
기타 옵션
| 옵션 |
설명 |
영역 |
비고
|
| hide |
cell 숨김 |
cell |
multi/notebook
|
| filename |
파일명 지정 |
cell |
multi
|
| hideerr |
output에서 stderr 숨김 |
cell |
|
| outheight |
output의 height 지정 |
cell |
|
| outmaxheight |
output의 maxheight 지정 |
cell |
|
{
"cells": [
{
"filename": "a.sh",
"source": "echo Hello World1",
"main": 1
},
{
"filename": "b.sh",
"source": "echo Hello World2"
}
]
}
v2
wikitext form
<syntaxhighlight lang='python' run>
print('hello')
print('world')
</syntaxhighlight>
<syntaxhighlight lang='python' asciinema run='1'>
print('hello')
print('world')
</syntaxhighlight>
<syntaxhighlight lang='text' run='1'>
lorem
ipsum
</syntaxhighlight>
raw form
{
"raws": [
{
"lang": "python",
"type": "run",
"group": null,
"options": [],
"source": "print('hello')\nprint('world')"
},
{
"lang": "python",
"type": "run",
"group": "1",
"options": ["asciinema"],
"source": "print('hello')\nprint('world')"
},
{
"lang": "text",
"type": "run",
"group": "1",
"options": [],
"source": "lorem\nipsum"
}
]
}
frontend form
[
{
"cells": [
{
"type": "run",
"group": "run-a1c3e",
"lang": "python",
"filename": "runbox.py",
"source": "print('hello')\nprint('world')"
}
]
},
{
"cells": [
{
"type": "run",
"group": "run-1",
"lang": "python",
"filename": "runbox.py",
"main": true,
"source": "print('hello')\nprint('world')",
"options": {
"asciinema": false,
"fold": false,
"hideerr": false,
"outheight": "auto"
}
},
{
"type": "run",
"group": "run-1",
"lang": "text",
"filename": "noname1.txt",
"source": "lorem\nipsum"
}
]
}
]
backend form
{
"apiVersion": "v1",
"kind": "runnote",
"metadata": {
"name": "run-python-0-ac13eb57df"
},
"spec": {
"type": "run", // run | notebook
"lang": "python",
"asciinema": false
},
"cells": [
{
"lang": "python",
"filename": "runbox.py",
"main": true,
"source": [
"print('hello')",
"print('world')"
],
"outputs": []
},
{
"lang": "text",
"filename": "1.txt",
"source": [
"lorem",
"ipsum"
],
"outputs": []
}
]
}
같이 보기