Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Instructions #33

Open
richardeigenmann opened this issue Feb 23, 2025 · 1 comment
Open

Missing Instructions #33

richardeigenmann opened this issue Feb 23, 2025 · 1 comment

Comments

@richardeigenmann
Copy link

Please add a section on using the parser. Together with an AI I was able to download the repo, compile the Rust program, get wasm installed and get the playground to work. It worked surprisingly well but I would have liked an install section. (FYI I use OpenSuSE)

I have not yet figured out how to use the parser on the command line. How can I call it to take a cooklang file (with syntax extensions) and translate it into an intermediary format like those in the playground web server? I would like to have a go at writing my own renderer and don't want to reinvent the parser step.

@dubadub
Copy link
Member

dubadub commented Feb 23, 2025

The parser itself is a library, not cli. It's not supposed to be build, but rather used in other project. (I think) It is well documented https://docs.rs/cooklang/latest/cooklang/. You can use something like https://github.com/Zheoni/cooklang-chef as a command line tool. It supports all extensions and can output recipe in a different formats like json or yaml or even markdown.

I'm not sure what you're exactly building, but if you want to use this parser in JS world, you would need wasm version of the parser, which doesn't exist. I don't need it myself at the moment, but previously attempted to do that here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants