You can generate your credits by creating this file somewhere on your computer:
generate-md-credits.php
:
<?php
// Take in input the "composer fund --format=json" and generate
// a simple list of donations link in Markdown.
$stdin = file_get_contents('php://stdin', 'r');
$entries = json_decode($stdin);
foreach ($entries as $entry => $links) {
foreach ($links as $link => $deps) {
foreach ($deps as $dep) {
echo "* [Donate to **$entry - $dep**]($link)\n";
}
}
}
Then using this command from your command line:
composer fund --format=json | php generate-md-credits.php
(If you are not in GNU/Linux or similar environments, please add a comment to share how you do this in one command...)
It generates something like this this (rendered in Markdown):
So the script easily generates some Markdown, and from time to time you can easily update your README. You can also automate this a bit more, but it's still something.
I'm glad to see more solutions thought. Thanks for sharing.