adrenth / rssfetcher

Fetches RSS/Atom feeds from different sources to publish on your website or dashboard.
MIT License
4 stars 8 forks source link

Images or Media? #15

Open Harrison-B opened 6 years ago

Harrison-B commented 6 years ago

Is there a way to bring in images or media from the rss feed? The XML feed I'm pulling from spits out something like this:

<media:content medium="image" url="https://d3e1o4bcbhmj8g.cloudfront.net/photos/583057/huge/e119efd640b47fe8d91995ac70e7636f37265473.jpg"/>

Is there a way to include that in the plugin?

abass commented 6 years ago

Also curious about this @adrenth - it would be so killer if I could use this to pull out our Podcast RSS feed and put it on our website.

Example Podcast RSS Feed

<enclosure url="https://media.transistor.fm/1899d953.mp3" length="85520532" type="audio/mpeg"/>

Thanks so much!

adrenth commented 6 years ago

@abass Check out the new version of the plugin. I rolled out version 2.1.0 which contains support for the enclosure sub-element.

@Harrison-B Please check out feature/extension on how to write your extensions for the RssFetcher plugin. As a proof of concept I added support for the media:content element. Please let me know if that works for you!

abass commented 6 years ago

@adrenth first of all, I just want to say that you really do an awesome job with these plugins. I LOVE your redirect plugin and the more I can use this one to get my podcast on my site in a nice way, the more I am loving this as well. Keep up the incredible work!

After playing around with it a bit, here's a few things I noticed:

  1. I wish each segment that was displayed either had a class, or were more broken up. This is the extent of formatting I was able to do in it's current form. I can't specifically grab certain elements in there though. For example, to hide the Source: Analysis Paralysis I just had to do em {display:none} which isn't optimal because now there's just a random <p> tag sitting there with nothing in it: Podcast Page Using Plugin
  2. I wish the date had <span> around it or something because I would like to relocate where it is and make it stand out more. Or at the very least, bold it or something. It's just sitting inside of the <p> tag though so I can't even target it. It just gets lost inside of the description (See in image below)
  3. The podcast I am linking to has a hardcoded website URL https://ap.transistor.fm/ (my podcast host) but I wish I could just re-assign the base URL to be https://podcast.aparalysis.com/ - Right now I have to do it manually for each individual episode which is a bit painful. I'd rather have it link to my pretty URL versus the hosting provider URL.
  4. The audio source enclosure displays itself quite funky. Displaying the number of bytes it is doesn't seem very useful. I'd honestly rather it just simply say Download (83MB) for example versus Enclosure (85520532 bytes / audio/mpeg (See in image below)
  5. Paginated view does not include the audio source (See in image below)

IMG

(The top view is the normal feed, the bottom view is the paginated output option missing the download link)

Thank you so much and keep up the phenomenal work 😄

adrenth commented 6 years ago

Hi Alex, the component which is shipped with this plugin is purely an example of how to implement the feeds on your website.

You should create your own template and apply your own CSS classes. Then you also have the flexibility to adjust things to your need.

I would recommend you to check the OctoberCMS documentation.

abass commented 6 years ago

Hi @adrenth! I just went ahead and did this (finally had a chance to) and it worked pretty well!

Here's what I have it look like now: IMG

One thing I am running into though is how do I grab the XML data that has a semi-colon in the middle of it? For example itunes:length?

IMG

I just get an error when I try to do something like: <p>{{ item.itunes:length}}</p>