diff --git a/src/delojza.py b/src/delojza.py index 6dc76b9..a41890a 100755 --- a/src/delojza.py +++ b/src/delojza.py @@ -28,6 +28,7 @@ import telegram import youtube_dl from mutagen.easyid3 import EasyID3 from telegram.ext import Updater, CommandHandler, MessageHandler +from unidecode import unidecode from youtube_dl import DownloadError from youtube_dl.version import __version__ as YTDL_VERSION @@ -760,7 +761,7 @@ class MarkovBlabberer: with open(filepath) as f: text = f.read() - self.markov = markovify.NewlineText(text.lower()) + self.markov = markovify.NewlineText(unidecode(text.lower())) self.logger.info("Sentence of the day: " + self.make_sentence()) def make_sentence(self, tries=100): diff --git a/src/requirements.in b/src/requirements.in index 89b7c9e..dd3aeea 100644 --- a/src/requirements.in +++ b/src/requirements.in @@ -5,4 +5,5 @@ filetype mutagen pyacoustid pytumblr -markovify \ No newline at end of file +markovify +unidecode \ No newline at end of file diff --git a/src/requirements.txt b/src/requirements.txt index 0f2ad13..3a4ec2e 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --upgrade +# pip-compile # asn1crypto==0.24.0 # via cryptography audioread==2.1.8 # via pyacoustid @@ -23,6 +23,6 @@ pytumblr==0.0.8 requests-oauthlib==1.2.0 # via pytumblr requests==2.22.0 six==1.12.0 # via cryptography -unidecode==1.0.23 # via markovify +unidecode==1.0.23 urllib3==1.25.3 # via requests youtube-dl==2019.5.20