diff --git a/resources/text/CMakeLists.txt b/resources/text/CMakeLists.txt index ce27b010..239b6042 100644 --- a/resources/text/CMakeLists.txt +++ b/resources/text/CMakeLists.txt @@ -9,7 +9,7 @@ add_custom_target( ) execute_process( - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get_contributors.sh + COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/get_contributors.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ #COMMAND_ERROR_IS_FATAL ANY ) diff --git a/resources/text/get_contributors.py b/resources/text/get_contributors.py new file mode 100644 index 00000000..4f83f425 --- /dev/null +++ b/resources/text/get_contributors.py @@ -0,0 +1,16 @@ +import subprocess + +git_output = subprocess.run( + ["git", "shortlog", "-sn", "--no-merges"], capture_output=True, text=True +) +lines = git_output.stdout.splitlines() +names = [line.partition("\t")[-1] for line in lines] + +text = '
' +for name in names: + text = text + name + "\n" +text = text + "
" + +file = open("gen_contributors.html", "w") +file.write(text) +file.close() diff --git a/resources/text/get_contributors.sh b/resources/text/get_contributors.sh deleted file mode 100755 index 58ba6cf1..00000000 --- a/resources/text/get_contributors.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -eo pipefail - -git shortlog -sn --no-merges \ -| awk '{ \ - printf ""; \
- for (i=2; i