Skip to content

Commit 7105d00

Browse files
authored
chore: add misc/list-gnophers and .mailmap (gnolang#1265)
## Current Status ```console $ cd ./misc/list-gnophers $ ./main.sh ``` ```csv 1617467419,[email protected],./examples/gno.land/p/demo/flow/flow.gno 1651096034,[email protected],./examples/gno.land/p/demo/grc/grc721/igrc721.gno 1673524438,[email protected],./examples/gno.land/p/demo/grc/grc721/basic_nft.gno 1677669053,[email protected],./examples/gno.land/p/demo/grc/grc1155/basic_grc1155_token.gno 1678259597,[email protected],./examples/gno.land/r/demo/deep/very/deep/render.gno 1678709422,[email protected],./examples/gno.land/r/demo/groups/group.gno 1684921090,[email protected],./examples/gno.land/p/demo/merkle/merkle.gno 1687179019,[email protected],./examples/gno.land/r/x/nir1218_evaluation_proposal/category.gno 1687263124,[email protected],./examples/gno.land/p/demo/microblog/microblog.gno ``` ## Future Plans - Translate into GitHub usernames. - Share the gnopher list on `r/gh` (gnolang#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 (gnolang/game-of-realms#5). - Create a `r/gnoland/gnophers:username` route that returns a badge with the username, gnopher number, "gnopher since <date>," and a `gnoface` (gnolang#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 <[email protected]>
1 parent 7dee385 commit 7105d00

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.mailmap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# man 5 gitmailmap
2+
# git log --mailmap --pretty=short | grep ^Author: | sort -u
3+
4+
5+
6+
7+
Thomas Bruyelle <[email protected]> Thomas Bruyelle <[email protected]>
8+
Thomas Bruyelle <[email protected]> Thomas Bruyelle <[email protected]>
9+
Miloš Živković <[email protected]> Miloš Živković <[email protected]>
10+
Hariom Verma <[email protected]> Hariom Verma <[email protected]>
11+
Giancarlos Salas <[email protected]> Giancarlos Salas <[email protected]>
12+

misc/list-gnophers/main.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
3+
main() {
4+
cd ../..
5+
for file in $(list_gno_files); do
6+
extract_file_metadata $file
7+
done > gno_file_commits.csv
8+
echo
9+
cat gno_file_commits.csv | sort_by_date | unique_by_author
10+
}
11+
12+
list_gno_files() {
13+
# list .gno file in examples/, remove tests and unit tests
14+
find ./examples -name "*.gno" | grep -v _filetest.gno | grep -v _test.gno | grep -v gno.land/r/demo/tests
15+
}
16+
17+
extract_file_metadata() {
18+
file=$1
19+
# get the first commit date of the file
20+
first_commit_date=$(git log --pretty=format:%ct --follow $file | tail -n 1)
21+
# get the email of the first contributor of the file
22+
email=$(git log --mailmap --pretty=format:%aE --follow $file | tail -n 1)
23+
# print the file name, first commit date, and email
24+
echo "$first_commit_date,$email,$file"
25+
}
26+
27+
sort_by_date() {
28+
sort -t, -k1
29+
}
30+
31+
unique_by_author() {
32+
awk -F, '!seek[$2]++'
33+
}
34+
35+
main

0 commit comments

Comments
 (0)