{"id":29097479,"url":"https://github.com/lambdaisland/edn-lines","last_synced_at":"2025-06-28T13:43:02.440Z","repository":{"id":48676459,"uuid":"242942013","full_name":"lambdaisland/edn-lines","owner":"lambdaisland","description":"Library for dealing with newline separated EDN files","archived":false,"fork":false,"pushed_at":"2021-07-14T17:03:58.000Z","size":24,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-01T15:30:54.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdaisland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-25T07:55:02.000Z","updated_at":"2025-05-01T13:52:36.000Z","dependencies_parsed_at":"2022-08-29T05:31:21.947Z","dependency_job_id":null,"html_url":"https://github.com/lambdaisland/edn-lines","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lambdaisland/edn-lines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Fedn-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Fedn-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Fedn-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Fedn-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdaisland","download_url":"https://codeload.github.com/lambdaisland/edn-lines/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Fedn-lines/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259368945,"owners_count":22846992,"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":[],"created_at":"2025-06-28T13:42:42.989Z","updated_at":"2025-06-28T13:43:02.426Z","avatar_url":"https://github.com/lambdaisland.png","language":"Shell","funding_links":["http://opencollective.com/lambda-island"],"categories":[],"sub_categories":[],"readme":"# lambdaisland/edn-lines\n\n\u003c!-- badges --\u003e\n[![CircleCI](https://circleci.com/gh/lambdaisland/edn-lines.svg?style=svg)](https://circleci.com/gh/lambdaisland/edn-lines) [![cljdoc badge](https://cljdoc.org/badge/lambdaisland/edn-lines)](https://cljdoc.org/d/lambdaisland/edn-lines) [![Clojars Project](https://img.shields.io/clojars/v/lambdaisland/edn-lines.svg)](https://clojars.org/lambdaisland/edn-lines)\n\u003c!-- /badges --\u003e\n\nExtensible Data Notation or [EDN](https://github.com/edn-format/edn) is a rich\ndata format that is popular in the Clojure world.\n\nThis library contains helper functions for reading and writing files of newline-separated EDN values.\n\n\u003c!-- opencollective --\u003e\n\n\u0026nbsp;\n\n\u003cimg align=\"left\" src=\"https://github.com/lambdaisland/open-source/raw/master/artwork/lighthouse_readme.png\"\u003e\n\n\u0026nbsp;\n\n## Support Lambda Island Open Source\n\nedn-lines is part of a growing collection of quality Clojure libraries and\ntools released on the Lambda Island label. If you are using this project\ncommercially then you are expected to pay it forward by\n[becoming a backer on Open Collective](http://opencollective.com/lambda-island#section-contribute),\nso that we may continue to enjoy a thriving Clojure ecosystem.\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n\u003c!-- /opencollective --\u003e\n\n## Installation\n\ndeps.edn\n\n```\nlambdaisland/edn-lines {:mvn/version \"1.0.10\"}\n```\n\nproject.clj\n\n```\n[lambdaisland/edn-lines \"1.0.10\"]\n```\n\n## Rationale\n\nAn edn-lines file (extension `.ednl`) is a file which contains one or more EDN\ncollection forms, be it vectors, lists, or maps, with each form represented as a\nsingle line of text, and lines separated by newline (`\"\\n\"`) characters.\n\nThis way it is trivial to append to a file (for instance log messages or\nevents), since there is no wrapping collection, and because one line = one form\nit plays nicely with traditional line-oriented tools like `grep`, `head`,\n`tail`, etc. If you grep an arbitrary EDN file you are unlikely to get valid EDN\nback, whereas you can grep an `ednl` file just fine.\n\n## Usage\n\n``` clojure\n(require '[lambdaisland.edn-lines :as ednl])\n\n(ednl/spit \"test.ednl\" [{:foo 1} {:foo 2} {:foo 3}])\n\n(ednl/slurp \"test.ednl\") ;; lazy seq of values\n\n(ednl/with-append [append \"test.ednl\"]\n  (append {:foo 4})\n  (append {:foo 5}))\n```\n\n## Tagged literals\n\nTo print/read custom types, use the extension mechanisms provided by Clojure\nitself:\n\n- for printing extend the `clojure.core/print-method` multimethod\n- for reading add reader functions to `clojure.core/*data-readers*` (or provide a\n  `data_readers.clj(c)` on the classpath)\n\nPrinting happens with `pr`, reading happens with `clojure.tools.reader.edn`, but\nwith the reader functions from `clojure.core/*data-readers*` passed in.\n\n## Use with Babashka\n\nWhen dealing with `ednl` files in the shell [bb\n-IO](https://github.com/borkdude/babashka) is your friend\n\n\n```\nbb -IO '(filter #(\u003c 1 (:foo %) 4) *input*)' \u003c test.ednl\n```\n\n\u003c!-- contributing --\u003e\n## Contributing\n\nEveryone has a right to submit patches to edn-lines, and thus become a contributor.\n\nContributors MUST\n\n- adhere to the [LambdaIsland Clojure Style Guide](https://nextjournal.com/lambdaisland/clojure-style-guide)\n- write patches that solve a problem. Start by stating the problem, then supply a minimal solution. `*`\n- agree to license their contributions as MPL 2.0.\n- not break the contract with downstream consumers. `**`\n- not break the tests.\n\nContributors SHOULD\n\n- update the CHANGELOG and README.\n- add tests for new functionality.\n\nIf you submit a pull request that adheres to these rules, then it will almost\ncertainly be merged immediately. However some things may require more\nconsideration. If you add new dependencies, or significantly increase the API\nsurface, then we need to decide if these changes are in line with the project's\ngoals. In this case you can start by [writing a pitch](https://nextjournal.com/lambdaisland/pitch-template),\nand collecting feedback on it.\n\n`*` This goes for features too, a feature needs to solve a problem. State the problem it solves, then supply a minimal solution.\n\n`**` As long as this project has not seen a public release (i.e. is not on Clojars)\nwe may still consider making breaking changes, if there is consensus that the\nchanges are justified.\n\u003c!-- /contributing --\u003e\n\n\u003c!-- license --\u003e\n## License\n\nCopyright \u0026copy; 2020 Arne Brasseur and Contributors\n\nLicensed under the term of the Mozilla Public License 2.0, see LICENSE.\n\u003c!-- /license --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaisland%2Fedn-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdaisland%2Fedn-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaisland%2Fedn-lines/lists"}