diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/buzzfeed-haiku-generator.wsgi b/buzzfeed-haiku-generator.wsgi new file mode 100755 index 0000000..e37af5c --- /dev/null +++ b/buzzfeed-haiku-generator.wsgi @@ -0,0 +1,8 @@ +import os +import sys +sys.path.append('/var/www/buzzfeed-haiku-generator') + +import logging +logging.basicConfig(stream=sys.stderr) + +from app import app as application diff --git a/generate_poem.py b/generate_poem.py index fa2e773..62935d0 100644 --- a/generate_poem.py +++ b/generate_poem.py @@ -32,7 +32,7 @@ class PoemGenerator(): self.words = [] self.all_words = [] self.inflect_engine = inflect.engine() - with open('buzzfeed_facebook_statuses.csv', newline='') as statuses: + with open('/var/www/buzzfeed-haiku-generator/buzzfeed_facebook_statuses.csv', newline='', encoding='utf-8') as statuses: reader = csv.reader(statuses, delimiter=',') for row in reader: if 'via buzzfeed ' not in row[1].lower(): # only English diff --git a/templates/index.html b/templates/index.html index 974d0eb..e6cd30e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,10 +1,23 @@
-{{haiku}}