1
0
Fork 0
forked from github/pelican
pelican-theme/pelican/tools
Steve Schwarz 8a6d96b289 pelican_import fix for bs4
Quick fix for this traceback:
$ pelican-import --wpfile ~/Downloads/mysite.wordpress.2013-02-24.xml 
Traceback (most recent call last):
  File "/Users/me/.virtualenvs/pelican/bin/pelican-import", line 8, in <module>
    load_entry_point('pelican==3.2', 'console_scripts', 'pelican-import')()
  File "/Users/me/.virtualenvs/pelican/src/pelican/pelican/tools/pelican_import.py", line 363, in main
    disable_slugs=args.disable_slugs or False)
  File "/Users/me/.virtualenvs/pelican/src/pelican/pelican/tools/pelican_import.py", line 238, in fields2pelican
    for title, content, filename, date, author, categories, tags, in_markup in fields:
  File "/Users/me/.virtualenvs/pelican/src/pelican/pelican/tools/pelican_import.py", line 37, in wp2fields
    if item.fetch('wp:status')[0].contents[0] == "publish":
TypeError: 'NoneType' object is not callable

I'm a BeautifulSoup novice but these changes allowed me to import two of my wordpress.xml files.
2013-03-03 21:17:42 -08:00
..
templates make develop_server.sh notify/cleanup when pelican or server don't start 2013-03-03 21:08:28 -08:00
__init__.py move tools in pelican.tools and add the pelican.tools package to setup.py 2012-03-16 18:53:08 +00:00
pelican_import.py pelican_import fix for bs4 2013-03-03 21:17:42 -08:00
pelican_quickstart.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
pelican_themes.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00