From 422051350751224ef6e3cca1013b292c75691eae Mon Sep 17 00:00:00 2001 From: Manfred Touron <94029+moul@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:16:17 -0400 Subject: [PATCH] chore: add misc/list-gnophers and .mailmap (#1265) ## Current Status ```console $ cd ./misc/list-gnophers $ ./main.sh ``` ```csv 1617467419,53785+jaekwon@users.noreply.github.com,./examples/gno.land/p/demo/flow/flow.gno 1651096034,94029+moul@users.noreply.github.com,./examples/gno.land/p/demo/grc/grc721/igrc721.gno 1673524438,hariom.verma@tendermint.com,./examples/gno.land/p/demo/grc/grc721/basic_nft.gno 1677669053,100383075+Jammyaa@users.noreply.github.com,./examples/gno.land/p/demo/grc/grc1155/basic_grc1155_token.gno 1678259597,350354+grepsuzette@users.noreply.github.com,./examples/gno.land/r/demo/deep/very/deep/render.gno 1678709422,pushkarshetye803@gmail.com,./examples/gno.land/r/demo/groups/group.gno 1684921090,contact@albttx.tech,./examples/gno.land/p/demo/merkle/merkle.gno 1687179019,nir1218@users.noreply.github.com,./examples/gno.land/r/x/nir1218_evaluation_proposal/category.gno 1687263124,zack.scholl@gmail.com,./examples/gno.land/p/demo/microblog/microblog.gno ``` ## Future Plans - Translate into GitHub usernames. - Share the gnopher list on `r/gh` (#1134). - Create a new `r/gnoland/gnophers` page with the following features: - Add a widget on `r/gnoland/home` displaying the "latest gnophers." - Create a helper function like `r/gnoland/gnophers.NumberByAddr("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq`) -> `(2 int)` to use this info on other meta profiles, such as the future "gnolinkedin" mixing facts and personal presentation (https://github.com/gnolang/game-of-realms/pull/5). - Create a `r/gnoland/gnophers:username` route that returns a badge with the username, gnopher number, "gnopher since ," and a `gnoface` (#690). - Stop checking and order t-shirts for the first 100 official gnophers. ### Example Gnopher Badges ```markdown # @jaekwon proudly became the 1st gnopher on Oct 3, 2021. ||||||| ////////\ | | | ~ . | )| X X |. | | | C | | | | __/ | | | \~~~~~~~/ Gnopher#1 ``` ```markdown # @moul proudly became the 2nd gnopher on May 24, 2022. ||||||| ////////\ | | | ~ . | )| X X |. | | | C | | | | __/ | | | \~~~~~~~/ Gnopher#2 ``` cc @gnolang/devrels Signed-off-by: moul <94029+moul@users.noreply.github.com> --- .mailmap | 12 ++++++++++++ misc/list-gnophers/main.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .mailmap create mode 100755 misc/list-gnophers/main.sh diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000000..2c81b9938ea --- /dev/null +++ b/.mailmap @@ -0,0 +1,12 @@ +# man 5 gitmailmap +# git log --mailmap --pretty=short | grep ^Author: | sort -u +Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon +Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon +Jae Kwon <53785+jaekwon@users.noreply.github.com> jaekwon +Jae Kwon <53785+jaekwon@users.noreply.github.com> Naut Jae +Thomas Bruyelle Thomas Bruyelle +Thomas Bruyelle Thomas Bruyelle +Miloš Živković Miloš Živković +Hariom Verma Hariom Verma +Giancarlos Salas Giancarlos Salas +Morgan Morgan diff --git a/misc/list-gnophers/main.sh b/misc/list-gnophers/main.sh new file mode 100755 index 00000000000..beb90d4c767 --- /dev/null +++ b/misc/list-gnophers/main.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +main() { + cd ../.. + for file in $(list_gno_files); do + extract_file_metadata $file + done > gno_file_commits.csv + echo + cat gno_file_commits.csv | sort_by_date | unique_by_author +} + +list_gno_files() { + # list .gno file in examples/, remove tests and unit tests + find ./examples -name "*.gno" | grep -v _filetest.gno | grep -v _test.gno | grep -v gno.land/r/demo/tests +} + +extract_file_metadata() { + file=$1 + # get the first commit date of the file + first_commit_date=$(git log --pretty=format:%ct --follow $file | tail -n 1) + # get the email of the first contributor of the file + email=$(git log --mailmap --pretty=format:%aE --follow $file | tail -n 1) + # print the file name, first commit date, and email + echo "$first_commit_date,$email,$file" +} + +sort_by_date() { + sort -t, -k1 +} + +unique_by_author() { + awk -F, '!seek[$2]++' +} + +main