{"id":13507911,"url":"https://github.com/Betree/atomex","last_synced_at":"2025-03-30T09:33:11.075Z","repository":{"id":28763671,"uuid":"119265675","full_name":"Betree/atomex","owner":"Betree","description":"🌊 Elixir RSS/ATOM feed builder with a focus on standards compliance, security and extensibility","archived":false,"fork":false,"pushed_at":"2023-03-30T05:07:45.000Z","size":95,"stargazers_count":64,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T04:47:51.916Z","etag":null,"topics":["atom","elixir","rss"],"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/Betree.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-01-28T14:28:52.000Z","updated_at":"2025-02-28T22:37:57.000Z","dependencies_parsed_at":"2024-01-05T21:55:20.448Z","dependency_job_id":"6d519e0a-c9c9-40fb-97c6-23bb5411f94a","html_url":"https://github.com/Betree/atomex","commit_stats":{"total_commits":30,"total_committers":6,"mean_commits":5.0,"dds":0.5333333333333333,"last_synced_commit":"4507a0138073c52bbcac0b6c5934603e3d9d9856"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Betree%2Fatomex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Betree%2Fatomex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Betree%2Fatomex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Betree%2Fatomex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Betree","download_url":"https://codeload.github.com/Betree/atomex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"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","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","elixir","rss"],"created_at":"2024-08-01T02:00:42.699Z","updated_at":"2025-03-30T09:33:11.053Z","avatar_url":"https://github.com/Betree.png","language":"Elixir","funding_links":[],"categories":["Feeds","Elixir"],"sub_categories":[],"readme":"# Atomex\n\n[![Coverage Status](https://coveralls.io/repos/github/Betree/atomex/badge.svg?branch=master)](https://coveralls.io/github/Betree/atomex?branch=master)\n[![Build Status](https://travis-ci.org/Betree/atomex.svg?branch=master)](https://travis-ci.org/Betree/atomex)\n\nAtomex is an ATOM 1.0 feed builder with a focus on [RFC4287](https://tools.ietf.org/html/rfc4287) compliance,\nsecurity and extensibility. It is safe to use it with user content: everything is escaped by default.\nBuilt on top of [xml_builder](https://github.com/joshnuss/xml_builder/).\n\nAPI reference is available here: https://hexdocs.pm/atomex/api-reference.html\n\n## TODO\n\n- [x] Feed required params (id, title, updated)\n- [x] Feed recommended params (author, link)\n- [x] Feed optional params\n    * [x] category\n    * [x] contributor\n    * [x] generator\n    * [x] icon\n    * [x] logo\n    * [x] rights\n    * [x] subtitle\n- [x] Entry required params (id, title, updated)\n- [x] Entry recommended params (author, content, link, summary)\n- [ ] Entry optional params\n    * [x] category\n    * [x] contributor\n    * [x] published\n    * [x] rights\n    * [ ] source\n- [ ] Validator\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:atomex, \"0.3.0\"}\n  ]\nend\n```\n\n## Basic usage\n\nRequired field are always passed in `new` functions. There are however recommended fields that you\nshould not ignore. See [Validating your feed](#validating-your-feed) below.\n\n```elixir\nalias Atomex.{Feed, Entry}\n\ndef build_feed(comments) do\n  Feed.new(\"https://example.com\", DateTime.utc_now, \"My incredible feed\")\n  |\u003e Feed.author(\"John Doe\", email: \"JohnDoe@example.com\")\n  |\u003e Feed.link(\"https://example.com/feed\", rel: \"self\")\n  |\u003e Feed.entries(Enum.map(comments, \u0026get_entry/1))\n  |\u003e Feed.build()\n  |\u003e Atomex.generate_document()\nend\n\ndefp get_entry(_comment = %{id, text, inserted_at, user}) do\n  Entry.new(\"https://example.com/comments/#{id}\", inserted_at, \"New comment by #{user.name}\")\n  |\u003e Entry.author(user.name, uri: \"https://example.com/users/#{user.id}\")\n  |\u003e Entry.content(\"\u003ch1\u003eContent here will be properly escaped! Text: #{text}\u003c/h1\u003e\", type: \"html\")\n  |\u003e Entry.build()\nend\n```\n\nTo avoid escaping, you can pass a tuple as value like this (be careful though, a user may\nbreak it with malicious content):\n\n```elixir\nEntry.content(entry, {:cdata, \"\u003ch1\u003eAmazing\u003c/h1\u003e\"}, type: \"html\")\n# Render as =\u003e \u003ccontent type=\"html\"\u003e\u003c![CDATA[\u003ch1\u003eAmazing\u003c/h1\u003e]]\u003e\u003c/content\u003e\n```\n\n## Extending the default API\n\n* You can specify custom schemas\n\n```elixir\nFeed.build(feed, %{\"xmlns:georss\" =\u003e \"http://www.georss.org/georss\"})\n# \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n# \u003crss version=\"2.0\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:georss=\"http://www.georss.org/georss\"\u003e\n#...\n```\n\n* And custom fields\n\n```elixir\nFeed.new(...)\n|\u003e Feed.add_field(:custom_field, %{attribute: 42}, \"Foobar\")\n|\u003e Feed.build()\n|\u003e Atomex.generate_document()\n# ...\n# \u003ccustom_field attribute=\"42\"\u003eFoobar\u003c/custom_field\u003e\n```\n\nFor more complicated use cases, content can also be given a xml element directly. Use XmlBuilder to achieve that.\n\n## Validating your feed\n\nUse [this tool from W3C](https://validator.w3.org/feed/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBetree%2Fatomex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBetree%2Fatomex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBetree%2Fatomex/lists"}