#!/usr/bin/env python3 # This script may be used with the email-filter or repo.email-filter settings in cgitrc. # # The following environment variables can be used to retrieve the configuration # of the repository for which this script is called: # CGIT_REPO_URL ( = repo.url setting ) # CGIT_REPO_NAME ( = repo.name setting ) # CGIT_REPO_PATH ( = repo.path setting ) # CGIT_REPO_OWNER ( = repo.owner setting ) # CGIT_REPO_DEFBRANCH ( = repo.defbranch setting ) # CGIT_REPO_SECTION ( = section setting ) # CGIT_REPO_CLONE_URL ( = repo.clone-url setting ) # # This simply receives text on stdin and replaces any occurrence of "@" by # " _ " to obfuscate emails. Not the most sophisticated algorithm (for now), # but laziness and time are two important factors. # It still helps with receiving email only from the wealthy Nigerian princes. # I need to make money, too. from sys import stdin text = stdin.read().strip() text=text.replace("@", " _ ") print(text)