如何将我的 Google Blogger 文件导入 Pelican 而不会出错?

How do I import my Google Blogger files into Pelican without getting errors?

我无法将 feed.atom 文件格式的 Blogger 文件导入到 Pelican 中,而不会出现某种 Python 错误。我安装了 BeautifulSoup4lxmlfeedparserpandoc,但我不断收到其他错误,例如以下错误:

[root@web blog]# pelican-import --feed -m MARKUP -o /var/www/blog/content/ /home/<user>/Blogger/Blogs/test/feed.atom
WARNING: Pandoc version unknown: FileNotFoundError: [Errno 2] No such file or directory: 'pandoc': 'pandoc'
WARNING: Feeds generated without SITEURL set properly may not be valid
WARNING: No timezone information specified in the settings. Assuming your timezone is UTC for feed generation. Check http://docs.getpelican.com/en/latest/settings.html#timezone for more information
Traceback (most recent call last):
  File "/usr/local/bin/pelican-import", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/pelican/tools/pelican_import.py", line 1019, in main
    attachments=attachments or None)
  File "/usr/local/lib/python3.7/site-packages/pelican/tools/pelican_import.py", line 780, in fields2pelican
    kind, in_markup) in fields:
  File "/usr/local/lib/python3.7/site-packages/pelican/tools/pelican_import.py", line 567, in feed2fields
    if hasattr(entry, 'updated_parsed') else None)
AttributeError: 'time.struct_time' object has no attribute 'strftime'

I 运行 a RedHat derivative 如果有帮助的话。我也不确定在调用解析我的 feed.atom Blogger 文件时是否应该使用 --feed--blogger 参数。

这似乎是 pelican-import 中的错误。 feedparser 的 date/time 解析器 returns the result of datetime.utctimetuple() which is time.struct_time instance while pelican-import expects 具有 .strftime() 方法的对象。

将错误报告给 the Pelican tracker