Giter Site home page Giter Site logo

feedworker's Introduction

feedworker

Library for processing RSS/Atom feeds.

Setup

Add this to you project.clj:

 [feedworker "0.1.0"]

What's this?

The purpose of feedworker is to make processing feeds easy. It manages which entries have been processed already and schedules periodic processing.

It's configured with a Clojure data structure like this:

{:workers
 {:dilbert {:url "http://feed.dilbert.com/dilbert/most_popular?format=xml"
            :handler example-handler
            :processing-strategy :at-most-once
            :interval 10000}}
 :processed-entries-dir "processedentries"
 :cleanup {:keep 10 :max 200}
 :metrics {:http {:port 8080
                  :path "/feedworker/metrics"}}}

All durations are given in milliseconds. The actual processing of each feed entry is done by the given handler (here: example-handler). It's a function of three arguments:

  • A single feed entry as parsed by feedparser-clj.
  • The ID of the worker (e.g. :dilbert).
  • The entire configuration.

Paginated feeds are not properly supported, yet. Also, feedworker needs to be able to track which entries it already processed. By default, this is currently done by hashing each entry to generate a unique id which is then stored on disk. This means, that feedworker cannot handle feeds that contain entries which are exact duplicates (not only regarding the content but considering all metadata, e.g. timestamps). Optionally, the configuration of a worker may contain an :entry-identifier function which is then applied to each entry to determine the id. Use ':uri' to access the unique id of an atom feed entry.

License

Copyright 2014 innoQ Deutschland GmbH. Published under the Apache 2.0 license.

feedworker's People

Contributors

fnd avatar pschirmacher avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

feedworker's Issues

Worker specific way to identify entries

In order to keep track of which entries have been processed already, feedworker needs a unique ID for each feed entry. This is currently obtained by hashing the entire entry. This causes entries to be reprocessed for every change (e.g. additional metadata, different timestamp format etc.).

It should be possible to configure a worker specific function that is used to identify a feed entry (e.g. :uri for atom feeds with unique entry IDs).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.