Page 1 of 1
RSS Aggregator Category
Posted: Fri Feb 19, 2010 2:51 am
by diroddi
Can the RSS Aggregator plugin be modified to use <category> from the feed, and if present and it matches an existing category in Serendipity to assign the entry to that category, and if no match have it fall back to the default action by using category specified for the feed setup in Serendipity?
Hope that makes sense...
Re: RSS Aggregator Category
Posted: Fri Feb 19, 2010 11:21 am
by garvinhicking
Hi!
Yes, with some basic PHP coding inside the plugin that could be done. I personally wouldn't like the direction as this would mirror a foreign blog, instead of have a fixed "import" category for feeds though...
Best regards,
Garvin
Re: RSS Aggregator Category
Posted: Fri Feb 19, 2010 3:03 pm
by diroddi
That makes sense.
I'm outsourcing a firm to provide unique regular content to my blog and have provided the categories for articles to be written. They have a proprietary feed as well as an RSS feed for the content I purchase. To make things easier on my end I was going setup the aggregator on a cron job to pull the content.
I'll either try to edit the plugin or write a separate script to parse their feed and write the entries to the db. Looks like the tables I need to write to are; entries and entrycat. What about entryproperties?
Re: RSS Aggregator Category
Posted: Fri Feb 19, 2010 4:12 pm
by garvinhicking
Hi!
If you have distinct feeds for each of your category, you could simply setup multiple RSS feeds and for each of them you can specify a target category...?
If you want to write your own parser, this shouldn't be too hard as well. Yes, you need to write to serendipity_entries and serendipity_entrycat. serendipity_entryproperties only contains additional properties to entries like readability, passwords, custom entry properties etc. You could just try to browse existing data from that table, if there are no fields inserted, then your current setup doesn't make use of this and you don't need to bother with it.
HTH,
Garvin
Re: RSS Aggregator Category
Posted: Fri Feb 19, 2010 9:07 pm
by diroddi
Thank you -
I did browse the entryproperties table and see properties like; ep_access, ep_aggregator_articleurl, ep_aggregator_author, ep_aggregator_categoryid, ep_aggregator_feed, ep_aggregator_feedname, ep_aggregator_feedurl, ep_aggregator_htmlurl, ep_cache_body, and meta_keywords.
Do I need to worry about making these inserts. I assume the aggregator_** and meta_keywords can be skipped, but wasnt sure about the ep_access or ep_cache_body.
Thanks
Re: RSS Aggregator Category
Posted: Sat Feb 20, 2010 11:23 pm
by garvinhicking
Hi!
ep_aggregator* is only used so that it is associated with the aggregator, if you delete aggregator sources to delete the appropriate entries, and to keep the original URLs of aggregated entries. This should all be irrelevant in your case.
ep_access is unnecessary if you don't use access restrictions, ep_cache is not important as it will be created on demand.
HTH,
Garvin