Permalink
Browse files

Merge pull request #158 from getnikola/ralsina-patch-1

Use not-so-old metadata format
  • Loading branch information...
ralsina committed Aug 5, 2016
2 parents 0225f88 + 9d463d0 commit a53298a3bb53416e5fc16a2e19df1c12578d8949
Showing with 5 additions and 6 deletions.
  1. +1 −1 v7/planetoid/planetoid.plugin
  2. +4 −5 v7/planetoid/planetoid.py
@@ -4,7 +4,7 @@ Module = planetoid
[Documentation]
Author = Roberto Alsina
Version = 0.1
Version = 0.2
Website = http://plugins.getnikola.com/#planetoid
Description = Maintain a planet-like site
@@ -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 a53298a

Please sign in to comment.