Permalink
Browse files

Merge branch 'pr-190'

  • Loading branch information...
2 parents 9562b8f + 8c6e78b commit 2d724c3e373058e77dcffeb0bb4d40878b75837b @posativ committed Nov 28, 2013
Showing with 9 additions and 3 deletions.
  1. +6 −3 acrylamid/tasks/imprt.py
  2. +3 −0 docs/commands.rst
@@ -86,7 +86,7 @@ def convert(data, fmt='markdown', pandoc=False):
else:
cmds = []
- p = ['pandoc', '--normalize', '-f', 'html', '-t', fmt, '--strict', '--no-wrap']
+ p = ['pandoc', '--normalize', '-f', 'html', '-t', fmt, '--strict', '--no-wrap', '--parse-raw']
cmds.insert(0, p) if pandoc or fmt == 'rst' else cmds.append(p)
if fmt == 'html':
@@ -339,7 +339,9 @@ def create(defaults, item):
if item.get('author') != defaults.get('author'):
f.write(u'author: %s\n' % (item.get('author') or defaults.get('author')))
f.write(u'date: %s\n' % item['date'].strftime(conf['date_format']))
- f.write(u'filter: %s\n' % item['filter'])
+ #f.write(u'filter: %s\n' % item['filter'])
+ if 'draft' in item:
+ f.write(u'draft: %s\n' % item['draft'])
if 'tags' in item:
f.write(u'tags: [%s]\n' % ', '.join(item['tags']))
if 'permalink' in item:
@@ -375,7 +377,8 @@ def create(defaults, item):
if options.keep:
m = urlsplit(item['link'])
- item['permalink'] = m.path if m.path != '/' else None
+ if m.path != '/':
+ item['permalink'] = m.path
item['content'], item['filter'] = convert(item.get('content', ''),
options.fmt, options.pandoc)
View
@@ -147,6 +147,9 @@ stupid <br />-foo to allow conversion back to Markdown/reStructuredText. It is
not recommended to import WordPress blogs without any reconversion due to the
broken HTML.
+If you import your existing posts without reconversion, make sure you add the
+HTML filter: `acrylamid import -a filter: HTML ...`.
+
.. _html2text: http://www.aaronsw.com/2002/html2text/
.. _html2rest: http://pypi.python.org/pypi/html2rest
.. _pandoc: http://johnmacfarlane.net/pandoc/

0 comments on commit 2d724c3

Please sign in to comment.