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

json or text output endpoint to allow for cli usage #178

Open
swarnimarun opened this issue Jan 24, 2023 · 1 comment
Open

json or text output endpoint to allow for cli usage #178

swarnimarun opened this issue Jan 24, 2023 · 1 comment
Labels
help-wanted Help especially wanted. needs-discussion Dicussion & feedback particularly wanted! type: infrastructure Issues related to building / maintaining this sheet.

Comments

@swarnimarun
Copy link

This is something I was thinking about which would be nice if had json or text output endpoint similar to cheat.sh.

We can directly generate and host this as a static page as well, doesn't need any dynamic content to my knowledge. I will probably look into it once I have some time, or if someone else wants to pick this up would also be willing to help, if needed.

Let me know if this sounds like a good idea. Would be very useful for terminal users.

@ralfbiedert ralfbiedert added type: infrastructure Issues related to building / maintaining this sheet. needs-discussion Dicussion & feedback particularly wanted! help-wanted Help especially wanted. labels Jan 24, 2023
@ralfbiedert
Copy link
Owner

I could see this being useful.

  • The actual entries should be generated from the existing tables, either by parsing Markdown (preferred), or HTML. Most information is encoded as a one-liner in some table | {sigil or keyword } | { explanation } | under some section ## XXX (number of columns and header level can vary), with the heading having a linkable HTML target.
  • Upstream links (the book, reference) and common symbols (e.g., "experimental", "outdated") could be extracted as tags.
  • A JSON is probably more useful for other projects. The JSON should be generated offline when deploying, which means there needs to be some tool that runs with deploy.sh
  • Alternatively, I could see an API-style interface work too extending the current api.cheats.rs providing Rusty syntax search (e.g., if you search for 'b it might return an entry for 'a), but this could easily get out of hand; like, why not re-implement or recycle a Rust grammar and do "part of speech" tagging (dunno how this is called in language design lingo) on snippets. I'm not really suggesting this; it's just an idea that was been floating through my head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Help especially wanted. needs-discussion Dicussion & feedback particularly wanted! type: infrastructure Issues related to building / maintaining this sheet.
Projects
None yet
Development

No branches or pull requests

2 participants