Skip to content
Permalink
Browse files

Use not-so-old metadata format

  • Loading branch information
ralsina committed Aug 5, 2016
1 parent 0225f88 commit 9b4cdf019186b3ca69bdc429ee86cb64aecd2a03
Showing with 4 additions and 5 deletions.
  1. +4 −5 v7/planetoid/planetoid.py
@@ -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

0 comments on commit 9b4cdf0

Please sign in to comment.
You can’t perform that action at this time.