XML feeds
mathieub started this discussion in Suggestions and Ideas

Hello,

I spend much time on the "new parts" page to track addition to the parts library or to the "featured models" page . I also much use feedly.com for my daily browsing. Would it be possible to provide us with XML feeds to track changes to those pages ?

Thanks !

29 replies · Page 1 of 2
Avatar of Scrubs
Administrator

I'll see what I can do. Do you know the specs for the XML?

You can have a look at this :
http://www.w3schools.com/xml/xml_rss.asp

You can easily add pictures in the feed like in this example I set up and tried successfully here : http://www.w3schools.com/xml/tryrss.asp?filename=rss_ex_image :

[code]

<?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>W3Schools Home Page</title> <link>http://www.w3schools.com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http://www.w3schools.com/xml/xml_rss.asp</link> <description> <![CDATA[ <img src='http://www.w3schools.com/images/w3schools_green.jpg' />RSS tutorial on W3Schools ! ]]></description> </item> <item> <title>RSS Tutorial 2</title> <link>http://www.w3schools.com/xml/xml_rss.asp</link> <description> <![CDATA[ <img src='http://www.w3schools.com/images/w3schools_blue.jpg' />RSS tutorial on W3Schools ! ]]></description> </item> </channel> </rss> [/code] If you ever need help for tests or more feel free to ask ! I used to be a web dev for some years so I guess I could be of some help if you ever need some !
Avatar of Scrubs
Administrator

Hello,

I finally added this function on Mecabricks. There is now a button on the New Parts page that redirects to this address: http://www.mecabricks.com/parts/rss

Let me know if it is what you wanted.

Perfect ! The pictures quality is really stunning, thanks for that ! No more need to spam the f5 button on the "new parts" page now 😄

The new parts RSS feed is a welcome addition, especially because of the higher resolution previews. So far, I oftentimes I had to open the parts in the Workshop or search them on Brickset to see what they look like. Thanks for this.

For some reason the content isn't showing up in Chrome RSS reader extensions (I tried "Inoreader" and "RSS Feed Reader).

Weird, it is perfect in feedly

Yep, Feedly works. Thanks.

Avatar of Scrubs
Administrator

Images are the same as for the icons. They are just not scaled down in the feed 😃
I tried Feedly and a couple of others and it was working. Not too sure but I am not a specialist of rss xml and it seems to be a bit messy as a format.

It doesn't work for me with the built-in Firefox RSS feed reader (also called "Live Bookmarks"). When I click on the RSS feed link, Firefox just shows an empty list, then when I actually subscribe to it and view it there, it says that the Live Bookmark failed to load. I don't know too much about the RSS format, but I put it into the Feed Validator and got these results:

https://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fmecabricks.com%2Fparts%2Frss

Not sure what's going to fix it, but what the validator says might be the issue:

  • Feeds should not be served with the "text/html" media type
    This is regarding the mime type returned with the http request.

  • sy:updatePeriod unknown
    This is caused by <rss version="2.0" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"> missing in the first few lines.

EDIT: Found the issue: The namespaces used (sy & dc) should be imported - or removed in the rss completely:
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">

Avatar of Scrubs
Administrator

Thanks for pointing that out. I corrected it as well as all the recommendations from RSS validator... It was a bit painful but it is done.

It's now working in other RSS readers.

Yes, it is now working in Firefox for me too. Thanks!

I must say that this feature is top notch! First time using RSS feed and liking it very much. 😄 No longer having to open the PARTS section to check for additions.
Just one small note, the linked page is the french version. Not a big problem as I can read French fairly well but I still prefer the page in English. Is it a setting one can change?

Avatar of Scrubs
Administrator

Hello,
Where did you find the link that brought you to the french version? I did not manage to find it yet 😉

Not sure if you're being sarcastic or not. The wink emoticon confuses me... 😦

Anyway, the link from the post above (and the RSS button in parts section) redirects to http://www.mecabricks.com/parts/rss which has a lot of links with www.mecabricks.com/fr/(...)

Avatar of Scrubs
Administrator

No actually I wasn't. I did not understand that it was the links inside the rss. I thought it was a link to the rss content with french names.
Actually, it is not supposed to be! I will check the code tonight to correct that. Thank you for spotting it.

Avatar of Scrubs
Administrator

Fixed.

Oh. bad phrasing from my part 😃

Thanks for fixing it. As a consequence I had 29 new items in the feed. lol 😄

ps: please check my private msg

Previous
Next
Advertising
7 participants
Avatar of mathieub
Avatar of Scrubs
Avatar of wlange
Avatar of mestrini
Avatar of Stephan3321
Avatar of Sim

LEGO, the LEGO logo, the Minifigure, and the Brick and Knob configurations are trademarks of the LEGO Group of Companies. ©2024 The LEGO Group.

Mecabricks, the Mecabricks logo and all content not covered by The LEGO Group's copyright is, unless otherwise stated, ©2011-2024 Mecabricks.