blob: 1b44e1e75b4c15cd3893092867e6f2df43930093 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env python3
# Please prefer the email-gravatar.lua using lua: as a prefix over this script. This
# script is very slow, in comparison.
#
# 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)
|