{"id":25294087,"url":"https://github.com/ane/vigil","last_synced_at":"2025-10-28T01:32:03.926Z","repository":{"id":62435090,"uuid":"54480599","full_name":"ane/vigil","owner":"ane","description":"Turn files into asynchronous streams","archived":false,"fork":false,"pushed_at":"2017-11-15T08:05:22.000Z","size":82,"stargazers_count":59,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-28T15:47:16.376Z","etag":null,"topics":["clojure","manifold","stream"],"latest_commit_sha":null,"homepage":"https://ane.github.io/vigil/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ane.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}},"created_at":"2016-03-22T14:14:26.000Z","updated_at":"2024-05-31T07:52:17.000Z","dependencies_parsed_at":"2022-11-01T21:15:55.059Z","dependency_job_id":null,"html_url":"https://github.com/ane/vigil","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ane%2Fvigil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ane%2Fvigil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ane%2Fvigil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ane%2Fvigil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ane","download_url":"https://codeload.github.com/ane/vigil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238579755,"owners_count":19495551,"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":["clojure","manifold","stream"],"created_at":"2025-02-13T01:56:53.967Z","updated_at":"2025-10-28T01:31:58.630Z","avatar_url":"https://github.com/ane.png","language":"Clojure","readme":"# ![Vigil](./doc/vigil.png) [![Build Status](https://travis-ci.org/ane/vigil.svg?branch=master)](https://travis-ci.org/ane/vigil) [![Clojars Project](https://img.shields.io/clojars/v/vigil.svg)](https://clojars.org/vigil) [![EPL](https://camo.githubusercontent.com/abf24e4845a7f0721ff08b2a8284ded5d9cfdefa/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d45504c2d626c75652e7376673f7374796c653d666c6174)](https://www.eclipse.org/legal/epl-v10.html) \n**Vigil** creates [Manifold](https://github.com/ztellman/manifold) streams from files.  You place a\n*watcher* on a file and the stream produces content as new content is appended to the file.\n```clojure\n[vigil \"0.1.1\"] ; add this to your project.clj\n```\nVigil can be used to monitor logs asynchronously as a stream. If you are creating an event-driven\nsystem, it's easy to create an event filter with Vigil.\n\nBecause the produced streams are Manifold streams, which act as a general-purpose compability\nlayers for asynchronous communication, the file streams can be easily\n[connected](https://github.com/ztellman/manifold/blob/master/docs/stream.md) into other \nClojure constructs, such as [core.async](https://github.com/clojure/core.async), lazy sequences,\npromises, the list goes on. \n\nFor more information, see the [documentation](https://ane.github.io/vigil/).\n\n``` clojure\n(require '[vigil.core :as v]\n         '[manifold.stream :as s])\n\n;; /foo/bar/baz contains \"hello\\nworld\"\n(def stream (v/watch-file \"/foo/bar/baz\"))\n\n@(s/take! stream)\n;; =\u003e (\"hello\" \"world\")\n\n(spit \"/foo/bar/baz\" \"blah\\n\" :append true)\n\n;; the new line has now been pushed to the stream\n@(s/take! stream)\n;; =\u003e (\"blah\")\n\n;; shut down the watcher\n(s/close! stream)\n\n```\n\n## Usage\n\nThe watcher can be stopped at any time by closing the stream. If you don't want to receive the\ninitial content, pass `false` to the `initial` parameter in `watch-file`. If you delete or truncate\nthe file, the watcher will stop and the stream will be closed.\n\nFor more information, see the [documentation](https://ane.github.io/vigil/).\n\n## License\n\nCopyright © 2016 Antoine Kalmbach \u003cane@iki.fi\u003e\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fane%2Fvigil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fane%2Fvigil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fane%2Fvigil/lists"}