Thoughts on a Book AST - bast? #82
-
I have a stale project at libry.io that I was writing in Elixir. I was not familiar with unified or AST's in general at that time. I later realized I was essentially building a book AST in json. I was parsing (public domain) books either from project gutenberg or standard ebooks and turning them into what I was calling at the time a When I discovered unified I got excited by the potential to leverage the ecosystem. I think a bast implementation could change the way digital books are experienced online, referenced, highlighted, etc. Transforming to and from bast from the other unist-compatible trees could be fruitful. I'm curious what you think about a Book AST? I'm surely naive in a myriad of ways, including how to get started. I'm afraid its too similar to some of the other ASTs and I wouldn't want to "duplicate" nodes that are already in some of the other trees, but at the same time, some nodes like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Two ways of approaching it. First approach is if you want to create a new community project, go for it!
Are a few I know of off the top of my head I'm sure there are more. As long as your AST implements/extends https://github.com/syntax-tree/unist#readme Once you have an AST spec, https://github.com/orgs/syntax-tree/discussions/36 offers some ideas of next steps. Second approach if you want to work with an existing book format, for example EPUB. |
Beta Was this translation helpful? Give feedback.
Two ways of approaching it.
First approach is if you want to create a new community project, go for it!
Several other projects have:
Are a few I know of off the top of my head I'm sure there are more.
As long as your AST implements/extends https://github.com/syntax-tree/unist#readme
It should work well with unifiedjs tools.
Once you have an AST spec, https://github.com/orgs/syntax-tree/discussions/36 offers some ideas of next steps.
Second approach if you want to work with an existing book format, for example EPUB.
There ma…