Skip to content

semantic notebook structure¤

sketches of semantic notebook structures considering cells as form inputs.

def jade(body):
    lines = body.splitlines(True)
    if body.startswith("```"):
        lines.pop(0)
    if body.rstrip().endswith("```"):
        lines.pop()
    return __import__("pyjade").process("".join(lines))
shape =\

jade main head section(role="feed") article(aria-posinset=1, aria-setsize=12) form(id, aria) fieldset(name=cell) legend input label(for="cell-input") div.source(id="cell-input", contenteditable="false", role="textbox"). some code that we will compute with fieldset(name="commands", form) legend commands button ⏪ button ⏹️ button ▶️ button ⏩ fieldset(name="metadata", form) legend information label in input(type="number", disabled="", value=2) label start input(type="time", disabled="", value="14:32") label stop input(type="time", disabled="", value="14:33") fieldset(name="tags") legend tags label slide fieldset(name="outputs", form) legend outputs fieldset.stderr label ⚠ output.warning samp warning fieldset.stderr label ✘ output.error samp error fieldset.stdout label ☑ output.stdout samp "hello world" fieldset.display-data fieldset(name="metadata") label out input(type="number", disabled="", value=2) output(markdown="true"). # some markdown to remember

...
<main>
<head></head>
<section role="feed">
<article aria-posinset="1" aria-setsize="12">
<form aria="aria" id="id">
<fieldset>
<legend>input</legend>
<label for="cell-input"></label>
<div class="source" contenteditable="false" id="cell-input" role="textbox">some code that we will 
compute with
          </div>
<fieldset form="form" name="commands">
<legend>commands</legend>
<button></button>
<button>⏹️</button>
<button>▶️</button>
<button></button>
</fieldset>
<fieldset form="form" name="metadata">
<legend>information</legend>
<label>in</label>
<input disabled="" type="number" value="2"/>
<label>start</label>
<input disabled="" type="time" value="14:32"/>
<label>stop</label>
<input disabled="" type="time" value="14:33"/>
<fieldset name="tags">
<legend>tags</legend>
<label>slide</label>
</fieldset>
</fieldset>
<fieldset form="form" name="outputs">
<legend>outputs</legend>
<fieldset class="stderr">
<label></label>
<output class="warning"><samp>warning</samp>
</output>
</fieldset>
<fieldset class="stderr">
<label></label>
<output class="error"><samp>error</samp>
</output>
</fieldset>
<fieldset class="stdout">
<label></label>
<output class="stdout"><samp>"hello world"</samp>
</output>
</fieldset>
<fieldset class="display-data">
<fieldset name="metadata">
<label>out</label>
<input disabled="" type="number" value="2"/>
</fieldset>
<output markdown="true"># some markdown 
to remember
              </output>
</fieldset>
</fieldset>
</fieldset>
</form>
</article>
</section>
</main>
input
some code that we will compute with
commands
information
tags
outputs
warning
error
"hello world"
# some markdown to remember