emory-libraries / templating-engine

A PHP templating engine for powering a dynamic website
0 stars 0 forks source link

Add mechanism for fetching and parsing RSS feeds #45

Closed laurenhamel closed 5 years ago

laurenhamel commented 5 years ago

How this will be implemented is TBD, but we'll want to incorporate this into the templating engine somehow so that we can easily fetch the data for RSS feeds server-side and pass that data along to pages that use it (i.e., events). It could be that we implement this as a handlebars helper (which gets fired at render time), but this may slow down page loading time. Alternatively, we could also potentially build this into the indexing process: As we build out our index of endpoints, we could also retrieve the RSS feed data and merge it into the endpoint's data set, which may be the better option.

Checklist:

laurenhamel commented 5 years ago

After doing some more work on this last night, I'm increasing the estimate on this issue for two reasons:

  1. The XML parser that the templating engine natively uses for parsing the XML data coming from Cascade fails to output namespaced XML nodes and attributes, which is a common occurrence in RSS feeds. I'm having to implement a workaround in order to capture this data and add it back into the parsed XML feed data.

  2. We'll need to find a JS-based RSS parser that reflects this same behavior, but in the event that we're unable to find one that perfectly matches the templating engine's parsing mechanism, we'll want to integrate similar enhancements like noted above in order to make sure that both the pattern library's and templating engine's feed parsers mirror each other.

laurenhamel commented 5 years ago

Also adding that I foresee the potential for this issue to become blocked and/or necessitate the need to increase the point value yet again due to exhibitions. Because this content is managed in Cascade, we don't currently have a way to readily fetch this feed data from the CMS. Additional work and/or decisions may be required to fully navigate this impending issue.

laurenhamel commented 5 years ago

Based on conversations that were had this morning, the impending roadblocks for this issue seemed to have been resolved. Gretchen answered the questions @kristianserrano and I had about how the exhibitions data will be incorporated into the events/exhibits feed section of the site. This data is/will be added into the Trumba feed, so there's no need to worry about trying to dump RSS-like data from Cascade at this time.

laurenhamel commented 5 years ago

@kristianserrano, this is ready for testing. I think we should try to focus on getting these PRs done early tomorrow to help us move forward with other feed-related issues.