Commit 050cdf4c authored by Christoph Miebach's avatar Christoph Miebach

Improved git log searcher script. The special cases (names) are found on 2.0.x tree

parent fe6e7e3d
......@@ -6,18 +6,78 @@
# To be copied and run in the git directory for having "git shortlog -sn po/" find the logs.
# It will generate a subdirectory temp_update_AUTHORS
# The last version before modifying AUTHORS with this kind of script. Important, since the script shall not remove anyone.
# Not even the manual editings delete anyone.
# 4f696a88ec9544b98e22ee45e010869717608bd2 here did j-b start using the script
if [ -f $OLD_AUTHORS ]; then
echo "Starting with credits from $OLD_AUTHORS ..."
echo "You need an old AUTHORS file. Only if you know what you are doing, you can use the current AUTHORS."
echo "Aborting..."
mkdir -p temp_update_AUTHORS
echo "Checking all git logs"
git shortlog -sn > temp_update_AUTHORS/all_git.txt
git shortlog -sn -- > temp_update_AUTHORS/all_git.txt
echo "Checking "po only" git logs"
git shortlog -sn po extras/package/win32/languages/ share/ > temp_update_AUTHORS/po_git.txt
# Now, not only po/ is checked. This way, translators are identified better and we save some lines in coders (some translators-only are removed)
#git shortlog -sn po/ > temp_update_AUTHORS/po_git.txt
# This modified command identified more translators, leading to the removal of existing entries in AUTHORS, impossible by design.
# So, start with a AUTHORS version with validated entries.
# Only if the script is not modified (wrt finding translators) you can use the current AUTHORS
git shortlog -sn -- po extras/package/win32/languages/ share/ share/vlc.desktop share/applications/vlc.desktop extras/package/win32/ > temp_update_AUTHORS/po_git_previous.txt
# Some typical (ancient) l10n files:
sed -n '{
s/.*Song Ye Wen.*//
s/.*Florian Hubold.*//
s/.*Sveinung Kvilhaugsvik.*//
s/.*Julien Humbert.*//
/^$/ !p
' <temp_update_AUTHORS/po_git_previous.txt >temp_update_AUTHORS/po_git.txt
# Checking the logs, this ^^ persons did not do l10n
# commited to share/vlc.desktop, but this seems to be media types, not l10n things.
# Florian Hubold
# share/applications/vlc.desktop
# Sveinung Kvilhaugsvik
# commited to extras/package/win32/ and include/vlc_interface.h
# Julien Humbert
# comitted to po/
# Song Ye Wen
# TODO: add this newly discovered translators
# czech translator
# Radek Vybiral <>
# zh_TW
# Thanks to Hsi-Ching Chao
# Thanks to Ruei-Yuan Lu <>
# there are some artwork designers in git log, too. If one of them wants to be mentioned in "Programmers" also, remove here:
echo "Damien Erambert" > temp_update_AUTHORS/artwork_git.txt
echo "Daniel Dreibrodt" >> temp_update_AUTHORS/artwork_git.txt
echo "Dominic Spitaler" >> temp_update_AUTHORS/artwork_git.txt
echo "reading AUTHORS"
sed -n '/Programming/,/^$/ s/[^-].*/&/p' < AUTHORS | sed '1 d' > temp_update_AUTHORS/programmers_part.txt
sed -n '/Programming/,/^$/ s/[^-].*/&/p' < $OLD_AUTHORS | sed '1 d' > temp_update_AUTHORS/programmers_part.txt
# The part of AUTHORS between Programming and the first empty line, without the ---- line
......@@ -31,6 +91,11 @@ echo "Removing translators from the git log"
cat temp_update_AUTHORS/all_git.txt temp_update_AUTHORS/po_git.txt|sort|uniq -u |sed 's/[0-9 \t]*\(.*\)/\1/g' | sort|uniq> temp_update_AUTHORS/coders_only.txt
#For script tuning: Are there other files the translators modified? =>probably l10n files
cat temp_update_AUTHORS/all_git.txt temp_update_AUTHORS/po_git.txt|sort|uniq -u| sed 's/[0-9 \t]*\(.*\)/\1/g' | sort|uniq -d> temp_update_AUTHORS/both_sides.txt
# Similar effect with second sed run:
# Remove translators. I remove every line containing the name. Maybe the .* before and after the last \1 should be removed (i.e. for contributors "Firstname Secondname aka something_you_want_to_keep"
#cat temp_update_AUTHORS/all_git.txt temp_update_AUTHORS/po_git.txt|sort|uniq -D|uniq|sed 's/[0-9 \t]*\(.*\)/\1/g' |sed 's:[0-9 \t]*\(.*\):s^.*\1.*^^g:' > temp_update_AUTHORS/remove_translators_gen
......@@ -80,12 +145,13 @@ do
# grep "$LINE" temp_update_AUTHORS/new_coders_only.txt >> temp_update_AUTHORS/ordering_log.txt
grep "$LINE" temp_update_AUTHORS/coders_only.txt >> temp_update_AUTHORS/ordering_log.txt
# grep "$LINE" temp_update_AUTHORS/coders_only.txt >> temp_update_AUTHORS/ordering_log.txt
# I want to keep the $? (it removes some broken names) but I could send the output to /dev/null
# If someone's name is a prefix to some other's name, this diff will show it:
# diff temp_update_AUTHORS/ordering_log.txt temp_update_AUTHORS/ordered_by_commits.txt
# AFAIK this will not effect the output, since we don't use the grep output but only the git output
if [ $? = "0" ]; then
echo "$LINE" >> temp_update_AUTHORS/ordered_by_commits.txt
grep "$LINE" temp_update_AUTHORS/artwork_git.txt || echo "$LINE" >> temp_update_AUTHORS/ordered_by_commits.txt
done < $FileName
......@@ -104,6 +170,9 @@ sed 's/\(.*\)/\1 ---XXX---NEW/g' < temp_update_AUTHORS/new_coders_
echo "For the lazy ones: Have a look at temp_update_AUTHORS/final.txt"
echo "Contains all git code commiters (the translators are stored somewhere else) sorted by commits, and the pre-git commiters"
echo 'For the lazy and brave (stupid?) ones: "cp new_AUTHORS AUTHORS" and check "git diff AUTHORS"'
echo "Programming" > temp_update_AUTHORS/final.txt
echo "-----------" >> temp_update_AUTHORS/final.txt
cat temp_update_AUTHORS/ordered_by_commits.txt temp_update_AUTHORS/pre-git.txt >> temp_update_AUTHORS/final.txt
......@@ -134,6 +203,11 @@ echo "If something was listed here you should probably modify .mailmap"
#done < $FileName
cp temp_update_AUTHORS/final.txt .
rm -rf temp_update_AUTHORS/
sed -n '1,2 p' < AUTHORS > temp_update_AUTHORS/new_AUTHORS
cat temp_update_AUTHORS/final.txt >> temp_update_AUTHORS/new_AUTHORS
echo >>temp_update_AUTHORS/new_AUTHORS
sed -n '/Artwork/,$ p' < AUTHORS >> temp_update_AUTHORS/new_AUTHORS
cp temp_update_AUTHORS/new_AUTHORS .
#rm -rf temp_update_AUTHORS/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment