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 image badge with result percentage or text block #280

Open
rdmueller opened this issue Aug 25, 2020 · 5 comments
Open

create image badge with result percentage or text block #280

rdmueller opened this issue Aug 25, 2020 · 5 comments
Assignees
Labels
enhancement hacktoberfest This is a nice ticket for the hacktoberfest help-needed

Comments

@rdmueller
Copy link
Collaborator

over at docToolchain a user asked if there is something resulting fomr an htmlSanityCheck which could be included in the docs.

docToolchain/docToolchain#456

A badge could be the easiest solution to be included in docs, but I guess not easy to create.

A text snippet which reports the percentage of green text could help to create a status like the one proposed in the ticket mentioned above:

last updated 2020-08-06 08:17:52 htmlSanitycheck reports an status of <97%>

@ascheman ascheman added the hacktoberfest This is a nice ticket for the hacktoberfest label Sep 7, 2024
@pujakarakoti07
Copy link

I want to work on this issue, please assign this to me.

@ascheman
Copy link
Member

ascheman commented Oct 4, 2024

Thanks a lot, @pujakarakoti07, I am happy that you apply to implement this new feature.

Did you already check the mentioned docToolchain/docToolchain#456 issue of @arcusbude? It should be a starting point to implement this.
If you look into the HSC HTML report, the output could be extended to generate at least an HTML document/fragment to the report directory with the mentioned status line. This HTML could later be integrated (e.g., iframe) with the docToolchain generated HTML (this is up to that project).

If you have more ideas they are welcome. A graphical badge like the ones provided by https://img.shields.io/ would be great.

Are you on (the Hacktoberfest) Discord? You can reach out to me (gerdaschemann) so we could have a chat if you run into problems (or if you need any other support).

@rdmueller
Copy link
Collaborator Author

As stated on the docToolchain issue, we have a two step process:

  • build html by executing generateHTML or generateSite in docToolchain
  • check the generated HTML through htmlSanityCheck

The question is, what is the best way to integrate the result into the already generated HTML?

Here are several ideas:

HSC could generate a button which will be included in the HTML. The AsciiDoc source could reference a dummy image which gets replaced later. This way, the image would not generate a warning by HSC

We could also setup an iFrame in AsciiDoc with a pass-through block. This could then later show the HSC results. This would not work for PDF generation

Another approach could be to create a marker or placeholder in the document (something like %%HSC-RESULTS%%) which can be replaced later with the HSC report

What do you think could be the best approach? Do you need help to setup a test environment?
Do not hesitate to ask questions over here or via email (see my profile)

@ascheman
Copy link
Member

ascheman commented Oct 4, 2024

I would hope that we will see the final solution in HSC as well 😊.
The generate-pages script in HSC will create the full documentation microsite (based on docToolchain). It can be viewed locally in public/index.html afterwards. Hence, we do have a test bed already. We should embed the generated banner there.

@rdmueller
Copy link
Collaborator Author

and it would also be great if we also use it over at docToolchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hacktoberfest This is a nice ticket for the hacktoberfest help-needed
Projects
None yet
Development

No branches or pull requests

3 participants