This is a bash script which uses jq
and sed
to replace contributors list in
a file. It's meant to be used in GitHub actions.
Place these HTML comments to delimit the contributors list in README.md:
<!-- start_contributors -->
anything
<!-- end_contributors -->
Please note that markers should not contain any spaces before them.
A few different modes are available:
- bullet: provide a MarkDown list of username's handles. This is the default.
- tombinoscope: provide a HTML list of username's pictures.
- figure: provide a HTML list of username's pictures and handles.
- bubble: provide a MarkDown list of username's rounded pictures. This is the one used below.
To set a different mode, add the mode:modename
attribute after
start_contributors
, e.g. <!-- start_contributors mode:bullet -->
.
Run the script (./update-contributors.sh
) to insert the contributors list
between these markers.
If you trust this script, you can run it directly in a directory with
wget -O - https://raw.githubusercontent.com/epfl-dojo/contributors-trombinoscope/main/update-contributors.sh | bash
The file contributors.yml provides an example to use it as GitHub actions. This is how it is done for this README.md
An easy way to test the result is to use pandoc:
pandoc -s -f gfm -t html5 -o output.html README.md
- add more modes, as an HTML table
- manage the GitHub API error, such a rate limit
- add examples of all mode
- provide ways to sort the list (number of contributions, alphabetically, etc.)
Contributions are very welcomed, either on the documentation or on the code.
We ❤️ issues, forks and pull requests! Also, feel free to become a stargazer ⭐ .