<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
This script will collect the contributors to friendica and its translations from
  * the git log of the friendica core and addons repositories
  * the translated messages.po from core and the addons.
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 and doubled entries.

Initially written by <NAME> for the Friendica Project. Released under
the terms of the AGPL version 3 or later, same as Friendica.
"""

from sys import argv
import os, glob, subprocess

#  a list of names to not include, those people get into the list by other names
#  but they use different names on different systems and automatical mapping does
#  not work in some cases.
dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m',
               'leberwurscht', 'abinoam', 'fabrixxm', 'FULL NAME', '<NAME>',
               '<NAME>', 'michal_s', '<NAME>', 'rabuzarus', '<NAME>']


#  this script is in the /util sub-directory of the friendica installation
#  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
path = os.path.abspath(argv[0].split('util/make_credits.py')[0])
print('> base directory is assumed to be: '+path)
#  a place to store contributors
contributors = ["<NAME>", "<NAME> 'v6ak'"]
#  get the contributors<commit_msg>add Ratten to the special contributors who are not found in git and messages.po files<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
This script will collect the contributors to friendica and its translations from
  * the git log of the friendica core and addons repositories
  * the translated messages.po from core and the addons.
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 and doubled entries.

Initially written by <NAME> for the Friendica Project. Released under
the terms of the AGPL version 3 or later, same as Friendica.
"""

from sys import argv
import os, glob, subprocess

#  a list of names to not include, those people get into the list by other names
#  but they use different names on different systems and automatical mapping does
#  not work in some cases.
dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m',
               'leberwurscht', 'abinoam', 'fabrixxm', 'FULL NAME', '<NAME>',
               '<NAME>', 'michal_s', '<NAME>', 'rabuzarus', '<NAME>']


#  this script is in the /util sub-directory of the friendica installation
#  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
path = os.path.abspath(argv[0].split('util/make_credits.py')[0])
print('> base directory is assumed to be: '+path)
#  a place to store contributors
contributors = ["<NAME>", "Ratten", "<NAME> 'v6ak'"]
#  get the contributors
{'fraction_non_alphanumeric': 0.09482758620689655, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 4.068642745709829, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1836300', 'n_tokens_mistral': 948, 'n_tokens_neox': 929, 'n_words': 450}