aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2012-12-30 21:46:32 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2012-12-30 21:46:32 +0100
commitd73f2d6ae43a4bcafdbcc2cb24503001ef41769e (patch)
tree706c80efb36aff0912aa5045dd596683badab46c /source
parentRemoved useless print(). (diff)
downloadnewspipe-d73f2d6ae43a4bcafdbcc2cb24503001ef41769e.tar.gz
newspipe-d73f2d6ae43a4bcafdbcc2cb24503001ef41769e.tar.bz2
newspipe-d73f2d6ae43a4bcafdbcc2cb24503001ef41769e.zip
Removed strip_accents function.
Diffstat (limited to 'source')
-rwxr-xr-xsource/utils.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/source/utils.py b/source/utils.py
index f6cd93d1..b37ecb8b 100755
--- a/source/utils.py
+++ b/source/utils.py
@@ -116,19 +116,6 @@ def unescape(text):
return text # leave as is
return re.sub("&#?\w+;", fixup, text)
-def not_combining(char):
- return unicodedata.category(char) != 'Mn'
-
-def strip_accents(text, encoding):
- """
- Strip accents.
-
- >>> print strip_accents("déjà", "utf-8")
- deja
- """
- unicode_text= unicodedata.normalize('NFD', text)
- return filter(not_combining, unicode_text)
-
def normalize_filename(name):
"""
Normalize a file name.
@@ -137,7 +124,6 @@ def normalize_filename(name):
file_name = re.sub("[\s.]", "_", file_name)
file_name = file_name.strip('_')
file_name = file_name.strip('.')
- #file_name = strip_accents(file_name, "utf-8")
return os.path.normpath(file_name)
def load_stop_words():
bgstack15