waka-readme-stats icon indicating copy to clipboard operation
waka-readme-stats copied to clipboard

FEAT: Generate stats in HTML

Open aaditkamat opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. My GitHub README was cluttered because of the different features I had included. So I rewrote it using HTML to include each section under the respective <details> tag. This will ensure that the sections can be opened and closed on demand. However, since GitHub Flavoured Markdown does not render properly within HTML, the current template does not allow me to organize the content into sections.

Describe the solution you'd like I'd like to provide an additional flag INPUT_RENDER_HTML that can be set so that the README stats are generated with HTML markup instead of Markdown. This way a user like me can add a specific HTML section for these stats.

aaditkamat avatar Jan 02 '21 11:01 aaditkamat

I think this requuires further consideration: maybe we should add an option for output generation in html file completely?
Will this be required for any other purpose apart from the one you described?

In general I think that since this action is about MD we should keep MD syntax whenever it's possible.

pseusys avatar Mar 01 '23 00:03 pseusys

Agree that this action is intended for file used by github to create your profile. HTML format for global might be needed in some cases but the approach seems too generic to me.

Format to enhance that profile should be within the limits of gihub flavoured syntax used in readme. For example if stats can be represented with a diagram then using Mermaid to draw a diagram and update it based on stats should be first choice.

The FLAG input render html is too generic and I would rather introduce specific feature based format flags so you can specify if you want to have your projects section in html or md format you can set FORMAT_PROJECTS flag to certain format value.

These flags are not just true and false then we can have values like

FORMAT_PROJECTS: "MD | HTML | Mermaid"

Then if we have finished testing FORMAT_* flags for all sections we can introduce FORMAT = "MD | HTML" Flag. Which then simply set a group of format variables to html instead of md.

My inspiration is based on Locale flag which allows people to use stats in their own language.

mfsbo avatar Mar 22 '23 16:03 mfsbo

@mfsbo For now if you are familiar with these diagram drawing features, you are welcomed to suggest a markdown-based solution for diagrams generation instead of current matplotlib-based. I think this could've simplify the project by a lot and also resolve many potential bugs and issues.

pseusys avatar Mar 22 '23 20:03 pseusys