Skip to content

Commit

Permalink
Use not-so-old metadata format
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Aug 5, 2016
1 parent 0225f88 commit 9b4cdf0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions v7/planetoid/planetoid.py
Expand Up @@ -253,11 +253,10 @@ def generate_post(entry):
meta_path = os.path.join('posts', unique_id + '.meta')
post_path = os.path.join('posts', unique_id + '.txt')
with codecs.open(meta_path, 'wb+', 'utf8') as fd:
fd.write('%s\n' % entry.title.replace('\n', ' '))
fd.write('%s\n' % unique_id)
fd.write('%s\n' % entry.date.strftime('%Y/%m/%d %H:%M'))
fd.write('\n')
fd.write('%s\n' % entry.link)
fd.write(.. title: '%s\n' % entry.title.replace('\n', ' '))
fd.write('.. slug: %s\n' % unique_id)
fd.write('.. date: %s\n' % entry.date.strftime('%Y/%m/%d %H:%M'))
fd.write('.. link: %s\n' % entry.link)
with codecs.open(post_path, 'wb+', 'utf8') as fd:
fd.write('.. raw:: html\n\n')
content = entry.content
Expand Down

0 comments on commit 9b4cdf0

Please sign in to comment.