diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..f53af0f --- /dev/null +++ b/.mailmap @@ -0,0 +1,8 @@ +JianXing Wu 吳建興 +fennecJ fennecJ <58484289+fennecJ@users.noreply.github.com> +fennecJ fennecj +Jim Huang Jim Huang +Jim Huang Jim Huang +linD026 linD026 <66012716+linD026@users.noreply.github.com> +linD026 linD026 <0086d026@email.ntou.edu.tw> +linD026 linzhien <0086d026@email.ntou.edu.tw> \ No newline at end of file diff --git a/contrib.tex b/contrib.tex new file mode 100644 index 0000000..5ee243f --- /dev/null +++ b/contrib.tex @@ -0,0 +1,33 @@ +2011eric, % <20110901eric@outlook.com> +25077667, % +Arush Sharma, % <46960231+arushsharma24@users.noreply.github.com> +asas1asas200, % +Benno Bielmeier, % <32938211+bbenno@users.noreply.github.com> +Brad Baker, % +ccs100203, % +Chih-Yu Chen, % <34228283+chihyu1206@users.noreply.github.com> +ChinYikMing, % +Cyril Brulebois, % +Daniele Paolo Scarpazza, % <> +David Porter, % <> +demonsome, % +Dimo Velev, % <> +Ekang Monyet, % +fennecJ, % +Francois Audeon, % <> +gagachang, % +Gilad Reti, % +Horst Schirmeier, % <> +Hsin-Hsiang Peng, % +Ignacio Martin, % <> +JianXing Wu, % +linD026, % +Marconi Jiang, % +RinHizakura, % +Roman Lakeev, % <> +Stacy Prowell, % +Tucker Polomik, % +VxTeemo, % +Wei-Lun Tsai, % +xatier, % +Ylowy. % <69316865+YLowy@users.noreply.github.com> diff --git a/lkmpg.tex b/lkmpg.tex index f28a5fb..316a30c 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -82,7 +82,11 @@ Jim Huang upgraded to recent kernel versions (v5.x) and revised the \LaTeX\ docu \subsection{Acknowledgements} \label{sec:acknowledgements} -The following people have contributed corrections or good suggestions: Ignacio Martin, David Porter, Daniele Paolo Scarpazza, Dimo Velev, Francois Audeon, Horst Schirmeier, and Roman Lakeev. +The following people have contributed corrections or good suggestions: + +\begin{flushleft} +\input{contrib} +\end{flushleft} \subsection{What Is A Kernel Module?} \label{sec:kernelmod} diff --git a/scripts/Contributors b/scripts/Contributors new file mode 100644 index 0000000..5968ebe --- /dev/null +++ b/scripts/Contributors @@ -0,0 +1,33 @@ +2011eric,<20110901eric@outlook.com> +25077667, +Arush Sharma,<46960231+arushsharma24@users.noreply.github.com> +asas1asas200, +Benno Bielmeier,<32938211+bbenno@users.noreply.github.com> +Brad Baker, +ccs100203, +Chih-Yu Chen,<34228283+chihyu1206@users.noreply.github.com> +ChinYikMing, +Cyril Brulebois, +Daniele Paolo Scarpazza,<> +David Porter,<> +demonsome, +Dimo Velev,<> +Ekang Monyet, +fennecJ,,<58484289+fennecJ@users.noreply.github.com> +Francois Audeon,<> +gagachang, +Gilad Reti, +Horst Schirmeier,<> +Hsin-Hsiang Peng, +Ignacio Martin,<> +JianXing Wu, +linD026,,<0086d026@email.ntou.edu.tw>,<66012716+linD026@users.noreply.github.com> +Marconi Jiang, +RinHizakura, +Roman Lakeev,<> +Stacy Prowell, +Tucker Polomik, +VxTeemo, +Wei-Lun Tsai, +xatier, +Ylowy,<69316865+YLowy@users.noreply.github.com> diff --git a/scripts/Exclude b/scripts/Exclude new file mode 100644 index 0000000..8514591 --- /dev/null +++ b/scripts/Exclude @@ -0,0 +1 @@ +Jim Huang, One of main author diff --git a/scripts/Include b/scripts/Include new file mode 100644 index 0000000..bc0cc00 --- /dev/null +++ b/scripts/Include @@ -0,0 +1,7 @@ +Daniele Paolo Scarpazza,<> +David Porter,<> +Dimo Velev,<> +Francois Audeon,<> +Horst Schirmeier,<> +Ignacio Martin,<> +Roman Lakeev,<> \ No newline at end of file diff --git a/scripts/list-contributors.sh b/scripts/list-contributors.sh new file mode 100755 index 0000000..6bbe963 --- /dev/null +++ b/scripts/list-contributors.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +FORMAT="%aN,<%aE>" #Set git output format in "Name," //Capital in aN and aE means replace str based on .mailmap +TARGET=(examples lkmpg.tex) #Target files we want to trace +DIR=`git rev-parse --show-toplevel` #Get root dir of the repo +TARGET=("${TARGET[@]/#/$DIR/}") #Concat $DIR BEFORE ALL elements in array TARGET + +#The str in each line should be Username, +function gen-raw-list() +{ + git log --pretty="$FORMAT" ${TARGET[@]} | sort -u +} + +function parse-list() +{ + > Contributors # Clear contributors' list (Overwrite with null) + while read -r line; do + User=`echo "$line" | awk -F "," '{print $1}'` + if [[ `grep -w "$User" Exclude` ]]; then + echo "[skip] $User" + continue; + fi + echo "[Add] $User" + MainMail=`echo "$line" | awk -F "[<*>]" '{print $2}'` + Emails=(`cat $DIR/.mailmap | grep -w "$User" | awk -F "[<*>]" '{print $4}' | sort -u`) + for Email in ${Emails[@]}; do + if [[ "$Email" != "$MainMail" ]]; then + line="$line,<$Email>"; + fi + done + echo "$line" >> Contributors + done <<< $(gen-raw-list) + cat Include >> Contributors +} + +function sort-list() +{ + if [[ `git diff Contributors` ]]; then + sort -f -o Contributors{,} + git add $DIR/scripts/Contributors + fi +} + +#For all lines before endline, print "name, % " +#For endline print "name. % " +function gen-tex-file() +{ + cat Contributors | awk -F "," \ + ' BEGIN{k=0}{name[k]=$1;email[k++]=$2} + END{ + for(i=0;i $DIR/contrib.tex \ No newline at end of file