From 9ebcd19fdea54171d6a9551db6be8efcc8b2c7fd Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 12 Mar 2024 19:12:16 +1100 Subject: [PATCH] [#120] Replaced logo with a statically generated logo. --- README.md | 2 +- init.sh | 12 +++++++++++- logo.png | Bin 0 -> 6442 bytes tests/scaffold/_assert_init.bash | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 logo.png diff --git a/README.md b/README.md index 73c0e4e..14cb6c6 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ - Release asset packaging and upload - [PR auto-assign](.github/workflows/assign-author.yml) - **Documentation** - - [Readme with badges](README.dist.md) + - [Readme with badges](README.dist.md) and [generated logo](logo.png) - [Scaffold](docs) for the documentation site using [Just the Docs theme](https://just-the-docs.com/) - [Terminalizer](assets/terminalizer.yml) configuration file diff --git a/init.sh b/init.sh index b749620..c75bf69 100755 --- a/init.sh +++ b/init.sh @@ -252,6 +252,16 @@ remove_docs() { remove_string_content_line "\/docs" ".gitattributes" } +process_readme() { + mv README.dist.md "README.md" >/dev/null 2>&1 || true + + curl "https://placehold.jp/000000/ffffff/200x200.png?text=${1// /+}&css=%7B%22border-radius%22%3A%22%20100px%22%7D" >logo.tmp.png || true + if [ -s "logo.tmp.png" ]; then + mv logo.tmp.png "logo.png" >/dev/null 2>&1 || true + fi + rm logo.tmp.png >/dev/null 2>&1 || true +} + process_internal() { local namespace="${1}" local project="${2}" @@ -413,7 +423,7 @@ main() { [ "${use_renovate}" != "y" ] && remove_renovate [ "${use_docs}" != "y" ] && remove_docs - mv README.dist.md "README.md" >/dev/null 2>&1 || true + process_readme "${project}" process_internal "${namespace}" "${project}" "${author}" diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c27afb9cb11a2ad00808815e91e091b4c3969325 GIT binary patch literal 6442 zcmW+*Wmptl8wQq+Wf3Ho25C?UVd;|aX0JVSo^wBU%q&7fU4aOn8XpY}jYvsRP765pJq}!K;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WQTb?XS3v?THggGS7^QxdyhY|a!u~vA6F+>2C*X@che;pkN zSM3GEyqE3jto7q7j*&%QK5}c*XkCLGx~HkLDkgT-akU*jMKx@~DNQX^IF3r{s41er zD9N9=%x^dH_T#yY%&_w-3Ap8{sA^tUlQM?KfU+^wW5P_Hi-a{4Xb&nZ%fH+op0wp5 zg%f3b-iD>#ang`f4hwyhWWk2M6e-zlN=`FeE22sOlOd#W)M7oediGR1Yzy&bcYDNM z9EGwHUnWu*|#*yXL{ Z>_3Gv&=y`a@aG4b(rb0ODjBoz{{c6phjRb` literal 0 HcmV?d00001 diff --git a/tests/scaffold/_assert_init.bash b/tests/scaffold/_assert_init.bash index 43f5c2d..b34928c 100644 --- a/tests/scaffold/_assert_init.bash +++ b/tests/scaffold/_assert_init.bash @@ -16,6 +16,8 @@ assert_files_present_common() { assert_file_not_contains ".gitignore" "/coverage" assert_file_exists "README.md" assert_file_not_exists "README.dist.md" + assert_file_exists "logo.png" + assert_file_not_exists "logo.tmp.png" assert_file_not_exists "LICENSE" assert_file_not_exists ".github/workflows/test-scaffold.yml"