{"id":15405328,"url":"https://github.com/ydah/otterraft","last_synced_at":"2025-06-21T10:07:32.157Z","repository":{"id":229599846,"uuid":"777150112","full_name":"ydah/otterraft","owner":"ydah","description":"Simple YAML Frontmatter Parser","archived":false,"fork":false,"pushed_at":"2024-10-22T05:35:46.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T10:07:10.963Z","etag":null,"topics":["frontmatter","hacktoberfest","parser","yaml-frontmatter"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ydah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"ydah"}},"created_at":"2024-03-25T09:54:13.000Z","updated_at":"2024-10-22T05:35:47.000Z","dependencies_parsed_at":"2024-03-25T11:03:16.255Z","dependency_job_id":"d492cc29-ab83-406b-b509-59f4fda1f66a","html_url":"https://github.com/ydah/otterraft","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"fe3ef4d379dbf9db2a6d5266d27469d24bae314f"},"previous_names":["ydah/otterraft"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ydah/otterraft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fotterraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fotterraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fotterraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fotterraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydah","download_url":"https://codeload.github.com/ydah/otterraft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fotterraft/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261103452,"owners_count":23109932,"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":["frontmatter","hacktoberfest","parser","yaml-frontmatter"],"created_at":"2024-10-01T16:16:04.004Z","updated_at":"2025-06-21T10:07:27.143Z","avatar_url":"https://github.com/ydah.png","language":"Ruby","funding_links":["https://github.com/sponsors/ydah"],"categories":[],"sub_categories":[],"readme":"# Otterraft\n\n[![Gem Version](https://badge.fury.io/rb/otterraft.svg)](https://badge.fury.io/rb/otterraft)\n[![CI](https://github.com/ydah/otterraft/actions/workflows/ci.yml/badge.svg)](https://github.com/ydah/otterraft/actions/workflows/ci.yml)\n[![RubyDoc](https://img.shields.io/badge/%F0%9F%93%9ARubyDoc-documentation-informational.svg)](https://www.rubydoc.info/gems/otterraft)\n\nSimple [YAML Frontmatter](https://pandoc.org/MANUAL.html#extension-yaml_metadata_block) parser for Ruby.\n\n## Installation\n\nOtterraft's installation is simple:\n\n```console\ngem install otterraft\n```\n\nIf you'd rather install Otterraft using `bundler`, add a line for it in your Gemfile:\n\n```ruby\ngem 'otterraft'\n```\n\n## Usage\n\nOtterraft is a simple YAML Frontmatter parser for Ruby. It can be used to parse YAML Frontmatter from a string.\n\n```ruby\ntext = \u003c\u003c~MARKDOWN_TEXT\n---\ntitle: Hello, World!\ndate: 2021-01-01 12:00 JST\ntags:\n- hello\n- world\n- ruby\n---\n\n# Hello, World!\nLorem ipsum dolor sit amet, consectetur adipiscing elit.\n- First item\n- Second item\nMARKDOWN_TEXT\n\nOtterraft.parse(text)\n# =\u003e { \"title\" =\u003e \"Hello, World!\", \"date\" =\u003e \"2021-01-01 12:00 JST\", \"tags\" =\u003e [\"hello\", \"world\", \"ruby\"] }\n```\n\nOtterraft can also be used to parse YAML Frontmatter from a file.\nIf you have a file named `hello.md` with the following content:\n\n```markdown\n---\ntitle: How to use parse from file\ndate: 2024-12-31 23:59 JST\ntags:\n- how-to\n- parse\n---\n\n# Hello, World!\nLorem ipsum dolor sit amet, consectetur adipiscing elit.\n```\n\nYou can parse the file like this:\n\n```ruby\nOtterraft.parse_file('hello.md')\n# =\u003e { \"title\" =\u003e \"How to use parse from file\", \"date\" =\u003e \"2024-12-31 23:59 JST\", \"tags\" =\u003e [\"how-to\", \"parse\"] }\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ydah/otterraft. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](./CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](./LICENSE.txt).\n\n## Code of Conduct\n\nEveryone interacting in the Otterraft project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](./CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fotterraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydah%2Fotterraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fotterraft/lists"}