Project:New Aggregator for Drupal core
Version:7.x-0.1-alpha3
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I believe implementing parsers as pluggable include files (like image toolkits in core) has advantages over parsers as modules.

Does this worth discussing. Any ideas?

Comments

#1

For performance reasons, I think this totally makes sense.
But how to cope with losing hooks? Reimplementing hooks seems too high price for me.

#2

Priority:normal» critical

Following are the details:

Define hook_aggregator_parsers() to be implemented by modules that provide parsers.

Example for aggregator.module:

<?php
 
function aggregator_aggregator_parsers() {
    return array(
'atom', 'rdf', 'rss');
  }
 
?>

Define hook_PARSERNAME_info() to be implemented in parsers include file.

Example in aggregator.atom.inc:

<?php
 
function aggregator_atom_info() {
    return array(
'name' => 'atom', 'title' => t('Atom format support for aggregator'));
  }
  function
aggregator_atom_download() {}
  function
aggregator_atom_parse() {}
 
?>

Provide a settings page like "admin/settings/image-toolkit".

Ship aggregator with 3 parsers:
aggregator.rss.inc
aggregator.atom.inc
aggregator.rdf.inc

#3

I have found an interesting patch in the aggregator issue queue and updated it. Here is the patch; #72915: Move feed parser to includes/feed.inc.

It seems that in the past having a "feed.inc" file in the "includes" folder was being considered.

#4

I like the idea. It could rid us of the problem of having to install two modules instead of one (syndication parser plus aggregator instead of just aggregator).

aggregator.module could implement the hook, all parsing functionality could live in syndication_parser.inc . other modules who would like to use syndication parser without aggregator can include the .inc file themselves...

i'm not so sure about splitting up syndication parser into rss, atom and rdf, i'd at least keep rss and atom in one body, as they're so similar.

#5

Priority:critical» normal
Status:active» closed (duplicate)

#72915: Move feed parser to includes/feed.inc