Nimib Speaking Hours - Fri December 29th 10AM CET #226
pietroppeter
announced in
Nimib speaking hours
Replies: 1 comment
-
meeting notes:
pyscript
refactoring of NbBlockimport json, tables
import jsony
type
Placeholder = object
NbBlock = ref object of RootObj
NbDataBlock = object # using to serialize and deserialize
name: string
data: JsonNode
NbCodeBlock = ref object of NbBlock
lang, source, output: string
NbTextBlock = ref object of NbBlock
text: string
NbContainerBlock = ref object of NbBlock
blocks: seq[NbBlock]
blk: NbBlock
NbDoc = ref object of NbBlock
head: NbContainerBlock
body: NbContainerBlock
data: JsonNode
NbContext = object
filename: string
# ...
doc: NbDoc
NbRenderFunc = proc (blk: NbDataBlock): string
NbBackend = ref object of RootObj
renderTable: Table[string, NbRenderFunc]
NbHtmlBackend = ref object of NbBackend
partials: Placeholder
# ...
echo $NbCodeBlock
let blk = NbCodeBlock()
echo blk.toJson
# {"lang":"","source":"","output":""}
# how to serialize it back to the correct block?
# do we need to?
let blocks = @[NbCodeBlock(), NbTextBlock(), NbContainerBlock()]
echo blocks.toJson
# [{},{},{}] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Organized last minute, tomorrow me and @HugoGranstrom will meet on jitsi to discuss recent and future nimib activities. Anyone is welcome to join and chat with us: https://calndr.link/event/pjXgpnkITQ
Beta Was this translation helpful? Give feedback.
All reactions