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

create github action #10

Closed
nlf opened this issue Oct 17, 2023 · 4 comments · Fixed by #12
Closed

create github action #10

nlf opened this issue Oct 17, 2023 · 4 comments · Fixed by #12
Assignees
Labels

Comments

@nlf
Copy link
Contributor

nlf commented Oct 17, 2023

this action should be able to find a threatdown block, comment it out and replace it with either an embedded svg file or the mermaid code (behind an option)

we have a few possibilities for implementation here. one option is looking at remark to see how difficult it might be to implement as a plugin. this would give us the greatest flexibility and i think is the direction we should ultimately head.

given our short timeline my backup plan, which is much less graceful, is to hack it directly into threatdown with some one-off functions to just regex the heck out of it.

whatever route we take, we want the ability to:

  1. accept a path to a markdown file (a glob probably would be best)
  2. read all found markdown files
  3. search for code blocks tagged threatdown (triple backtick start and end, with the word threatdown being present immediately after the start triple backtick)
  4. generate an svg from the contents of each code block
  5. comment out the code blocks in the original markdown file
  6. insert an image reference to the relevant svg where the code block was
@Simon-Busch Simon-Busch linked a pull request Oct 24, 2023 that will close this issue
6 tasks
@Simon-Busch
Copy link
Member

Info:

Linking this PR as the md converting functionality will be developed here

@Simon-Busch Simon-Busch self-assigned this Oct 24, 2023
@Simon-Busch
Copy link
Member

Once the mentionned PR will land, I will create the action here: https://github.com/threatdown/threatdown-converter-action and then make the repo public

@nlf nlf closed this as completed in #12 Oct 26, 2023
@Simon-Busch
Copy link
Member

I re-open the issue as this is only partly done, I need to create the action here now: https://github.com/threatdown/threatdown-converter-action

@Simon-Busch Simon-Busch reopened this Oct 27, 2023
@Simon-Busch
Copy link
Member

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

Successfully merging a pull request may close this issue.

2 participants