|
@@ -20,6 +20,7 @@ from babel.dates import format_date, format_datetime, format_time
|
|
|
from markdown import markdown
|
|
|
from docutils import nodes
|
|
|
from docutils.parsers.rst import directives, Directive
|
|
|
+import six
|
|
|
|
|
|
from pelican import signals, generators
|
|
|
import jinja2
|
|
@@ -120,14 +121,14 @@ def get_talk_data(talkname):
|
|
|
data.setdefault('nooverlap', [])
|
|
|
if 'title' not in data:
|
|
|
logging.warn("Talk <{}> has no `title` field".format(talkname))
|
|
|
- data['title'] = unicode(talkname)
|
|
|
+ data['title'] = six.text_type(talkname)
|
|
|
else:
|
|
|
- data['title'] = unicode(data['title'])
|
|
|
+ data['title'] = six.text_type(data['title'])
|
|
|
if 'text' not in data:
|
|
|
logging.warn("Talk <{}> has no `text` field".format(talkname))
|
|
|
data['text'] = ''
|
|
|
else:
|
|
|
- data['text'] = unicode(data['text'])
|
|
|
+ data['text'] = six.text_type(data['text'])
|
|
|
if 'duration' not in data:
|
|
|
logging.info("Talk <{}> has no `duration` field (50min used)"
|
|
|
.format(talkname))
|
|
@@ -371,7 +372,7 @@ def talks_to_ics():
|
|
|
e = talk_to_ics(t)
|
|
|
if e is not None:
|
|
|
c.events.add(e)
|
|
|
- return unicode(c)
|
|
|
+ return six.text_type(c)
|
|
|
|
|
|
|
|
|
def talk_to_ics(talk):
|
|
@@ -379,7 +380,7 @@ def talk_to_ics(talk):
|
|
|
return None
|
|
|
e = ics.Event(
|
|
|
uid="%s@%d.hackmeeting.org" % (talk['id'],
|
|
|
- get_global_data()['startdate'].year),
|
|
|
+ get_global_data()['startdate'].year),
|
|
|
name=unidecode.unidecode(talk['title']),
|
|
|
begin=talk['time'],
|
|
|
duration=datetime.timedelta(minutes=talk['duration']),
|