anmol098 / waka-readme-stats

This GitHub action helps to add cool dev metrics to your github profile Readme
MIT License
3.28k stars 537 forks source link

FEAT: Generate stats in HTML #157

Open aaditkamat opened 3 years ago

aaditkamat commented 3 years ago

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.

pseusys commented 1 year ago

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.

mfsbo commented 1 year ago

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.

pseusys commented 1 year ago

@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.