X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=util%2Fmake_credits.py;h=eacb8707f463eaff31d41bfdcf30f25e572d5ddf;hb=eed55664fc61a0e285dcf5c814b39496537c7039;hp=fb4a909b77d459baa583ec9ebcb2bf10025ba759;hpb=3be34f82eeedab9df1884d42e33d9982aef73272;p=friendica.git diff --git a/util/make_credits.py b/util/make_credits.py index fb4a909b77..eacb8707f4 100755 --- a/util/make_credits.py +++ b/util/make_credits.py @@ -9,7 +9,7 @@ The collected names will be saved in /util/credits.txt which is also parsed from yourfriendica.tld/credits. The output is not perfect, so remember to open a fresh (re)created credits.txt file -in your fav editor to check for obvious mistakes. +in your fav editor to check for obvious mistakes and doubled entries. Initially written by Tobias Diekershoff for the Friendica Project. Released under the terms of the AGPL version 3 or later, same as Friendica. @@ -46,17 +46,20 @@ for i in c: n1 = len(contributors) print(' > found %d contributors' % n1) # get the contributors to the addons -os.chdir(path+'/addon') -# get the contributors -print('> getting contributors to the addons') -p = subprocess.Popen(['git', 'shortlog', '--no-merges', '-s'], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) -c = iter(p.stdout.readline, b'') -for i in c: - name = i.decode().split('\t')[1].split('\n')[0] - if not name in contributors and name not in dontinclude: - contributors.append(name) +try: + os.chdir(path+'/addon') + # get the contributors + print('> getting contributors to the addons') + p = subprocess.Popen(['git', 'shortlog', '--no-merges', '-s'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + c = iter(p.stdout.readline, b'') + for i in c: + name = i.decode().split('\t')[1].split('\n')[0] + if not name in contributors and name not in dontinclude: + contributors.append(name) +except FileNotFoundError: + print(' > no addon directory found ( THE LIST OF CONTRIBUTORS WILL BE INCOMPLETE )') n2 = len(contributors) print(' > found %d new contributors' % (n2-n1)) print('> total of %d contributors to the repositories of friendica' % n2)