{"id":26505625,"url":"https://github.com/shuirong/opml","last_synced_at":"2026-03-01T15:01:58.266Z","repository":{"id":280659903,"uuid":"942692213","full_name":"shuiRong/OPML","owner":"shuiRong","description":"An OPML parser/builder for Elixir","archived":false,"fork":false,"pushed_at":"2025-05-05T14:57:32.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-20T05:15:32.301Z","etag":null,"topics":["atom","opml","rss","xml"],"latest_commit_sha":null,"homepage":"","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/shuiRong.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-04T14:16:31.000Z","updated_at":"2025-07-04T05:25:32.000Z","dependencies_parsed_at":"2025-03-04T16:41:42.183Z","dependency_job_id":"2416e956-3739-4886-a4de-5ef8d53d7a18","html_url":"https://github.com/shuiRong/OPML","commit_stats":null,"previous_names":["shuirong/opml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shuiRong/OPML","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuiRong%2FOPML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuiRong%2FOPML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuiRong%2FOPML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuiRong%2FOPML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuiRong","download_url":"https://codeload.github.com/shuiRong/OPML/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuiRong%2FOPML/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29973108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T14:44:57.896Z","status":"ssl_error","status_checked_at":"2026-03-01T14:43:27.662Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["atom","opml","rss","xml"],"created_at":"2025-03-20T21:57:54.966Z","updated_at":"2026-03-01T15:01:58.251Z","avatar_url":"https://github.com/shuiRong.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OPML\n\n[![Hex.pm](https://img.shields.io/hexpm/v/opml.svg)](https://hex.pm/packages/opml)\n[![Docs](https://img.shields.io/badge/hex-docs-blue.svg)](https://hexdocs.pm/opml)\n\nAn Elixir library for parsing OPML (Outline Processor Markup Language) content from URLs or direct XML content. Outputs programmer-friendly, parsed JSON data structures.\n\n## Installation\n\nThe package can be installed, via [Hex](https://hex.pm/packages/opml), by adding `opml` to your list of dependencies in `mix.exs`:```elixir\ndef deps do\n[\n{:opml, \"~\u003e 0.1.0\"}\n]\nend\n\n````\n\n## Usage\n\n### Parsing with URL\n\nParsing is as straightforward as invoking the following command:\n\n```elixir\n\u003e Opml.parse(\"http://hosting.opml.org/dave/spec/subscriptionList.opml\")\n````\n\nAnd it will be return\n\n```elixir\n{:ok, %{\n    \"body\" =\u003e %{\n      \"outlines\" =\u003e [\n        %{\n          \"description\" =\u003e \"Technology, and the way we do business, is changing the world we know. Wired News is a technology - and business-oriented news service feeding an intelligent, discerning audience. What role does technology play in the day-to-day living of your life? Wired News tells you. How has evolving technology changed the face of the international business world? Wired News puts you in the picture.\",\n          \"htmlUrl\" =\u003e \"http://www.wired.com/\",\n          \"language\" =\u003e \"unknown\",\n          \"text\" =\u003e \"Wired News\",\n          \"title\" =\u003e \"Wired News\",\n          \"type\" =\u003e \"rss\",\n          \"version\" =\u003e \"RSS\",\n          \"xmlUrl\" =\u003e \"http://www.wired.com/news_drop/netcenter/netcenter.rdf\"\n        }\n        ... ignore other lines\n      ]\n    },\n    \"head\" =\u003e %{\n      \"dateCreated\" =\u003e \"Sat, 18 Jun 2005 12:11:52 GMT\",\n      \"dateModified\" =\u003e \"Tue, 02 Aug 2005 21:42:48 GMT\",\n      \"expansionState\" =\u003e \"\",\n      \"ownerEmail\" =\u003e \"dave@scripting.com\",\n      \"ownerName\" =\u003e \"Dave Winer\",\n      \"title\" =\u003e \"mySubscriptions.opml\",\n      \"vertScrollState\" =\u003e \"1\",\n      \"windowBottom\" =\u003e \"562\",\n      \"windowLeft\" =\u003e \"304\",\n      \"windowRight\" =\u003e \"842\",\n      \"windowTop\" =\u003e \"61\"\n    },\n    \"version\" =\u003e \"2.0\"\n  }\n}\n```\n\nor return\n\n```elixir\n{:error, reason}\n```\n\n### Parsing with xml content\n\n```elixir\n\u003e Opml.parse(~S{\u003c?xml version=\"1.0\" encoding=\"ISO-8859-1\"?\u003e\n                \u003copml version=\"2.0\"\u003e\n                  \u003chead\u003e\n                    \u003ctitle\u003estates.opml\u003c/title\u003e\n                    \u003cdateCreated\u003eTue, 15 Mar 2005 16:35:45 GMT\u003c/dateCreated\u003e\n                    \u003c/head\u003e\n                  \u003cbody\u003e\n                  \u003c/body\u003e\n                  \u003c/opml\u003e\n                })\n```\n\n### Building OPML\n\nTo generate OPML content from Elixir data structures, use the `build` function:\n\n```elixir\n\u003e outlines = [\n  %{\n    text: \"Example Feed\",\n    description: \"An example RSS feed\",\n    htmlUrl: \"https://example.com\",\n    type: \"rss\",\n    xmlUrl: \"https://example.com/feed.xml\"\n  }\n]\n\n\u003e options = [\n  title: \"My Subscriptions\",\n  owner_name: \"John Doe\",\n  owner_email: \"john@example.com\"\n]\n\n\u003e Opml.build(outlines, options)\n```\n\nThis will return an XML string conforming to the OPML 2.0 specification:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003copml version=\"2.0\"\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eMy Subscriptions\u003c/title\u003e\n    \u003cdateCreated\u003eWed, 05 Jun 2024 12:00:00 GMT\u003c/dateCreated\u003e\n    \u003cownerName\u003eJohn Doe\u003c/ownerName\u003e\n    \u003cownerEmail\u003ejohn@example.com\u003c/ownerEmail\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003coutline text=\"Example Feed\" description=\"An example RSS feed\" htmlUrl=\"https://example.com\" type=\"rss\" xmlUrl=\"https://example.com/feed.xml\"/\u003e\n  \u003c/body\u003e\n\u003c/opml\u003e\n```\n\n#### Build Options\n\nThe `build` function accepts these options:\n\n- `:version` - OPML version (defaults to \"2.0\")\n- `:title` - document title\n- `:date_created` - creation date (RFC 822 format)\n- `:date_modified` - modification date (RFC 822 format)\n- `:owner_name` - owner name\n- `:owner_email` - owner email\n- `:expansion_state` - expansion state\n- `:vert_scroll_state` - vertical scroll state\n- `:window_top` - window top position\n- `:window_left` - window left position\n- `:window_bottom` - window bottom position\n- `:window_right` - window right position\n- `:auto_dates` - automatically add creation date if not specified (defaults to true)\n\n### LICENSE\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuirong%2Fopml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuirong%2Fopml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuirong%2Fopml/lists"}