Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strftime error while importing Atom feed #274

Closed
tsangiotis opened this issue Oct 4, 2016 · 5 comments
Closed

strftime error while importing Atom feed #274

tsangiotis opened this issue Oct 4, 2016 · 5 comments

Comments

@tsangiotis
Copy link

I am trying to import my current atom feed but I get an undefined methodstrftime' for nil:NilClass` error.

Here is the call with the --trace option. It looks similar to #194.

$ jekyll import rss --source "http://tsangiotis.com/posts.atom" --trace
/Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/jekyll-import-0.11.0/lib/jekyll-import/importers/rss.rb:40:in `block in process': undefined method `strftime' for nil:NilClass (NoMethodError)
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/jekyll-import-0.11.0/lib/jekyll-import/importers/rss.rb:39:in `each'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/jekyll-import-0.11.0/lib/jekyll-import/importers/rss.rb:39:in `process'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/jekyll-import-0.11.0/lib/jekyll-import/importer.rb:23:in `run'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/jekyll-import-0.11.0/lib/jekyll-import.rb:26:in `block (3 levels) in add_importer_commands'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.2.1/exe/jekyll:13:in `<top (required)>'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/bin/jekyll:23:in `load'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/bin/jekyll:23:in `<main>'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tsangiotis/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
@parkr
Copy link
Member

parkr commented Oct 5, 2016

@parkr parkr added the bug label Oct 18, 2016
@lws-team
Copy link

lws-team commented Dec 9, 2016

This is a problem about Atom vs RSS. Jekyll itself produces atom.xml, but this cannot parse it.

Users can work around it by screwing with the atom file, what kinda worked for me was

Original Atom Munged
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"> <?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel>
<updated <pubDate
</updated </pubDate
<entry <item
</entry </item
<updated <pubDate
</updated </pubDate
</feed> </channel></rss>

I guess it's not hard to fix. But although it produced _posts/ with the content, it was not markupized, just left as html.

Being able to recover a Jekyll blog from just the deployed html would be good. This problem the Jekyll importer not being able to eat Jekyll's own atom.xml makes that needlessly painful and mysterious.

@parkr
Copy link
Member

parkr commented Dec 9, 2016

Unfortunately translating HTML to Markdown is not a feature we currently offer.

I think however that we should be able to read both regular RSS and Atom feeds. The fact that it appears not to seems like a bug to me!

@lws-team
Copy link

lws-team commented Dec 9, 2016

Unfortunately translating HTML to Markdown is not a feature we currently offer.

Just as a FYI, it seems it is something that people have wanted non-officially and striven to do something about.

https://www.npmjs.com/package/jekyll-html-md
https://github.com/postmodern/jekyll-static-import

I'm not sure if I need it or not... what was written will probably almost entirely stay written. But the tags and such did not get reborn (they are not in the html / atom).

Anyway I appreciate it could regenerate something useful just from the rendered site. Maybe it's a good general principle though to render ALL the source material into the HTML; when it's directly generated then just the generated will do. But metadata going in a comment wouldn't hurt and would be very useful if you ever found yourself in the situation all you had was the rendered site.

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyll jekyll locked and limited conversation to collaborators Apr 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants