Move credits out of util/

This commit is contained in:
Hypolite Petovan 2018-11-28 22:59:06 -05:00
parent 9102a37b37
commit b42760b0e6
3 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@
This script will collect the contributors to friendica and its translations from This script will collect the contributors to friendica and its translations from
* the git log of the friendica core and addons repositories * the git log of the friendica core and addons repositories
* the translated messages.po from core and the addons. * the translated messages.po from core and the addons.
The collected names will be saved in /util/credits.txt which is also parsed from The collected names will be saved in CREDITS.txt which is also parsed from
yourfriendica.tld/credits. yourfriendica.tld/credits.
The output is not perfect, so remember to open a fresh (re)created credits.txt file The output is not perfect, so remember to open a fresh (re)created credits.txt file
@ -26,7 +26,7 @@ dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m'
'Michal Supler', 'michal_s', 'Manuel Pérez', 'rabuzarus', 'Alberto Díaz'] 'Michal Supler', 'michal_s', 'Manuel Pérez', 'rabuzarus', 'Alberto Díaz']
# this script is in the /util sub-directory of the friendica installation # this script is in the /bin/dev directory of the friendica installation
# so the friendica path is the 0th argument of calling this script but we # so the friendica path is the 0th argument of calling this script but we
# need to remove the name of the file and the name of the directory # need to remove the name of the file and the name of the directory
path = os.path.abspath(argv[0].split('bin/dev/make_credits.py')[0]) path = os.path.abspath(argv[0].split('bin/dev/make_credits.py')[0])
@ -101,7 +101,7 @@ print(' > found %d translators' % (n3-n2))
print('> found a total of %d contributors and translators' % n3) print('> found a total of %d contributors and translators' % n3)
contributors.sort(key=str.lower) contributors.sort(key=str.lower)
f = open(path+'/util/credits.txt', 'w') f = open(path+'/CREDITS.txt', 'w')
f.write("\n".join(contributors)) f.write("\n".join(contributors))
f.close() f.close()
print('> list saved to util/credits.txt') print('> list saved to CREDITS.txt')

View file

@ -12,7 +12,7 @@ use Friendica\Core\Renderer;
function credits_content() function credits_content()
{ {
/* fill the page with credits */ /* fill the page with credits */
$credits_string = file_get_contents('util/credits.txt'); $credits_string = file_get_contents('CREDITS.txt');
$names = explode("\n", htmlspecialchars($credits_string)); $names = explode("\n", htmlspecialchars($credits_string));
$tpl = Renderer::getMarkupTemplate('credits.tpl'); $tpl = Renderer::getMarkupTemplate('credits.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [