Skip to content

Commit

Permalink
Merge pull request #158 from getnikola/ralsina-patch-1
Browse files Browse the repository at this point in the history
Use not-so-old metadata format
  • Loading branch information
ralsina committed Aug 5, 2016
2 parents 0225f88 + 9d463d0 commit a53298a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion v7/planetoid/planetoid.plugin
Expand Up @@ -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

Expand Down
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 a53298a

Please sign in to comment.