forked from boyska/sito-hackit-17
FIX utf8 su ICS
This commit is contained in:
parent
0659b13813
commit
1625352228
1 changed files with 2 additions and 2 deletions
|
@ -262,7 +262,7 @@ class TalkGridDirective(Directive):
|
||||||
|
|
||||||
|
|
||||||
def talks_to_ics():
|
def talks_to_ics():
|
||||||
content = 'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:pelican\n'
|
content = u'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:pelican\n'
|
||||||
for t in all_talks():
|
for t in all_talks():
|
||||||
content += talk_to_ics(t)
|
content += talk_to_ics(t)
|
||||||
content += 'END:VCALENDAR\n'
|
content += 'END:VCALENDAR\n'
|
||||||
|
@ -308,7 +308,7 @@ class TalksGenerator(generators.Generator):
|
||||||
shutil.rmtree(outdir)
|
shutil.rmtree(outdir)
|
||||||
shutil.copytree(self.talks[talkname]['resources'], outdir)
|
shutil.copytree(self.talks[talkname]['resources'], outdir)
|
||||||
with open(os.path.join(self.output_path, TALK_ICS), 'w') as buf:
|
with open(os.path.join(self.output_path, TALK_ICS), 'w') as buf:
|
||||||
buf.write(talks_to_ics())
|
buf.write(talks_to_ics().encode('utf8'))
|
||||||
|
|
||||||
|
|
||||||
def add_talks_option_defaults(pelican):
|
def add_talks_option_defaults(pelican):
|
||||||
|
|
Loading…
Reference in a new issue