Ticket #412 (idea)

Opened 14 years ago

Last modified 14 years ago

CustomFeed::Script

Status: closed (fixed)

Reported by: miyagawa Assigned to: miyagawa
Priority: major Milestone:
Component: Plagger Version:
Keywords: Cc:

CustomFeed?::Script will execute any script that produces RSS/Atom or YAML output to create a feed. this way you can re-use something2rss, made for NetNewsWire? or newspipe without any modification. It means you can write customfeed scraper using Python/Ruby as well.

- module: Subscription::Config
  config:
    feed:
      - script:///path/to/something2rss

will execute '/path/to/something2rss' and parse the STDOUT result as RSS feed.

If you're lazy and want to create a new scraper script, you can dump output using CustomFeed?::Debug compatible YAML format, ala:

use YAML;
# do something with screen scraping
print YAML::Dump({ 
  title => "feed title",
  entry => [ { title => "entry_title", body => "..." } ],
});

CustomFeed?::Script will auto-detect the output format by checking its magic (XML declaration, or YAML-ish data?) but you can force the format by:

- module: Subscription::Config
  config:
    feed:
      - url: script://...
        meta:
          script_output_format: YAML

(BTW I hate url:/meta: nested config, since it looks ugly.)

Change History

10/04/06 18:34:35: Modified by miyagawa

  • description changed.

10/04/06 21:06:38: Modified by miyagawa

(In [1717]) CustomFeed?::Simple first cut. Refs #412

10/09/06 23:55:30: Modified by miyagawa

  • status changed from new to closed.
  • resolution set to fixed.