{"id":21680286,"url":"https://github.com/matthewoden/rss_watcher","last_synced_at":"2025-10-27T05:06:46.056Z","repository":{"id":57545043,"uuid":"195273582","full_name":"matthewoden/rss_watcher","owner":"matthewoden","description":"Module for watching RSS feeds, and dispatching updates when they change.","archived":false,"fork":false,"pushed_at":"2020-07-12T01:23:42.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T18:50:00.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/rss_watcher/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewoden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-04T16:32:02.000Z","updated_at":"2025-04-03T16:18:36.000Z","dependencies_parsed_at":"2022-08-27T04:22:29.996Z","dependency_job_id":null,"html_url":"https://github.com/matthewoden/rss_watcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matthewoden/rss_watcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoden%2Frss_watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoden%2Frss_watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoden%2Frss_watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoden%2Frss_watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewoden","download_url":"https://codeload.github.com/matthewoden/rss_watcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoden%2Frss_watcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281216687,"owners_count":26463033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T15:15:39.262Z","updated_at":"2025-10-27T05:06:46.042Z","avatar_url":"https://github.com/matthewoden.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RssWatcher\n\nA small worker that watches a single RSS feed, parses the changes, and dispatches updates.\n\nOnline Docs: [https://hexdocs.pm/rss_watcher](https://hexdocs.pm/rss_watcher).\n\n## Installation\n\n### Dependancies\n\nAdd the following to your dependencies:\n\n```elixir\n{:rss_watcher, \"~\u003e 0.1.0\"}\n```\n\nFor _easy mode_, you can use the default adapters to fetch and parse\nRSS feeds. Just add the following to your dependancies, and you should be good\nto go.\n\n```elixir\n{:tesla, \"~\u003e 1.2.1\"}, # For HTTP requests\n{:fiet, \"~\u003e 0.2.1\"}, # For RSS parsing\n{:timex, \"~\u003e 3.0\"}, # For timestamp parsing\n```\n\nAnd add `Timex` to your list of applications.\n\n```elixir\nextra_applications: [ ...,  :timex]\n```\n\n### Adapters\n\n`RssWatcher.HTTP.Tesla` is provided by default. To use, add the following\ndependancies to your dependency list. See module configuration around middleware, and additional\nadapter options.\n\n```elixir\n{:tesla, \"~\u003e 1.2.1\"}\n```\n\nFor RSS parsing, `RssWatcher.Feed.Fiet` is provided by default,\nand handles parsing XML and timestamps. To use, add the following dependencies\nto your dependency list.\n\n```elixir\n{:fiet, \"~\u003e 0.2.1\"},\n{:timex, \"~\u003e 3.0\"}\n```\n\nAnd add timex to your list of applications.\n\n```elixir\nextra_applications: [ ...  :timex]\n```\n\n## Usage\n\nRssWatcher is a worker, so the recommended usage is to add it as a child\nto your supervisor.\n\n### API Example\n\n```elixir\nchildren = [\n  {RssWatcher,\n      url: \"http://example.com/rss\",\n      callback: {Notifications, broadcast, [\"#channel_id\"]},\n  }\n]\n\nSupervisor.start_link(children, strategy: :one_for_one))\n```\n\nOr, with a dynamic supervisor:\n\n```elixir\n\nchildren = [\n  {DynamicSupervisor, strategy: :one_for_one, name: MyApp.RssSupervisor}\n]\n\nSupervisor.start_link(children, strategy: :one_for_one)\n\n...\n\nDynamicSupervisor.start_child(\n  MyApp.RssSupervisor,\n  {RssWatcher,\n      url: \"http://example.com/rss\",\n      callback: {Notifications, broadcast, [\"#channel_id\"]}\n  }\n)\n\n```\n\nEach `RssWatcher` worker takes at least a _url_, and a _callback_. Additional\nconfiguration can be provided to use alternate adapters.\n\n### Url\n\nThe url should be a string, which resolves to an RSS feed.\n\n### Callback\n\nThe callback can be in the form of `{module, function, arguments}`, or\nan anonymous/suspended function.\n\nIf `{module, function, arguments}` format, the callback will be dispatched with\nan additional argument - the parsed XML. Otherwise, the parsed XML will be\nthe only argument provided. See below for examples.\n\n### Additional Configuration\n\nAdditional configuration can be provided to handle dispatching/fetching updates.\n\n- `:refresh_interval` - integer. How often the feed is checked, in seconds. Defautls to `60`.\n- `:rss_parser` - Atom/RSS 2.0 parser module. Defaults to `RssWatcher.Feed.Fiet`,\n- `:rss_parser_options`- options for the above parser. Defaults to `[]`,\n- `:http_client` - HTTP client for fetching updates. Defaults to `RssWatcher.HTTP.Tesla`,\n- `:http_client_options` - options for the above client. Default to `[]`. See adapter module for configuration options.\n\n### Examples\n\n```elixir\n{RssWatcher,\n  url: \"http://example.com/rss\",\n  callback: {Notifications, broadcast, [\"#channel_id\"]},\n}\n\n{RssWatcher,\n  url: \"http://example.com/rss\",\n  callback: fn xml -\u003e Notifications.broadcast(xml) end,\n}\n\n{RssWatcher,\n  url: \"http://example.com/rss\",\n  callback: \u0026Notifications.broadcast/1,\n  refresh_interval: 60\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewoden%2Frss_watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewoden%2Frss_watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewoden%2Frss_watcher/lists"}