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

Infer feed title from page title? #144

Closed
singpolyma opened this issue Apr 12, 2018 · 5 comments
Closed

Infer feed title from page title? #144

singpolyma opened this issue Apr 12, 2018 · 5 comments

Comments

@singpolyma
Copy link
Contributor

@singpolyma singpolyma commented Apr 12, 2018

https://granary.io/url?input=html&output=atom&url=https%3A%2F%2Fsingpolyma.net%2Fcategory%2Ftech%2F

The atom:title is just the entire text of the webpage... seems probably not the desired outcome ;)

@snarfed
Copy link
Owner

@snarfed snarfed commented Apr 12, 2018

hah, funny. that's just mf2util.interpret_feed(parsed, url).get('name'). i'll take a look at what it's doing.

title=mf2util.interpret_feed(parsed, url).get('name'),

@snarfed
Copy link
Owner

@snarfed snarfed commented Apr 25, 2018

whee, looks like this is actually implied name parsing and mf2py again. if an h-feed has no p-name, mf2py returns its entire text, including children, in the name property. ugh.

i guess i'll just ellipsize it.

@singpolyma
Copy link
Contributor Author

@singpolyma singpolyma commented Apr 25, 2018

In this case there is no h-feed and that's being implied as well. What's the right place to raise issues about h-feed design in this case? Probably should have a "use page title" fallback rule

@singpolyma
Copy link
Contributor Author

@singpolyma singpolyma commented Apr 25, 2018

This particular case is technically a bug in mf2py, since implied name shouldn't be used for backcompat: http://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties

But even a page with top-level h-entry will have this issue

@singpolyma
Copy link
Contributor Author

@singpolyma singpolyma commented Apr 25, 2018

Oh, it's here:

If no "h-feed" nor "hfeed" element is found, however multiple top-level h-entry elements (explicit or backcompat) are found, implementations may use:

top level h-entry elements as items in a synthetic h-feed.
<title> of the page or the URL of the page as p-name

http://microformats.org/wiki/h-feed#Parser_Compatibility

@snarfed snarfed closed this in af259e5 Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants