{"id":23074868,"url":"https://github.com/plapadoo/matrix-dirwatch-bot","last_synced_at":"2025-10-11T22:36:57.201Z","repository":{"id":144422000,"uuid":"128193844","full_name":"plapadoo/matrix-dirwatch-bot","owner":"plapadoo","description":"Watch directory changes and post them to a Matrix channel","archived":false,"fork":false,"pushed_at":"2018-04-05T13:19:46.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-09T01:17:47.083Z","etag":null,"topics":["automation","bot","haskell","matrix","unix"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plapadoo.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}},"created_at":"2018-04-05T10:57:51.000Z","updated_at":"2018-04-05T13:19:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7784b25-7707-4230-9dcc-e8e793416448","html_url":"https://github.com/plapadoo/matrix-dirwatch-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-dirwatch-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-dirwatch-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-dirwatch-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-dirwatch-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plapadoo","download_url":"https://codeload.github.com/plapadoo/matrix-dirwatch-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246998155,"owners_count":20866691,"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":["automation","bot","haskell","matrix","unix"],"created_at":"2024-12-16T08:29:45.898Z","updated_at":"2025-10-11T22:36:52.147Z","avatar_url":"https://github.com/plapadoo.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# matrix-dirwatch-bot\n\n[![Build Status](https://travis-ci.org/plapadoo/matrix-dirwatch-bot.svg?branch=master)](https://travis-ci.org/plapadoo/matrix-dirwatch-bot)\n\nThis bot listens for changes in a directory and outputs these changes to standard output in a format that can be fed directly to the [matrix-bot](https://github.com/plapadoo/matrix-bot).\n\n## Installation and usage\n\n### Via Docker\n\nThe easiest way to install the bot (or just try it out) is via Docker. To start the bot and inspect its output, run:\n\n    docker run -i -v \"$watch_dir:$watch_dir\":ro --name=matrix-dirwatch-bot --rm \"plapadoo/matrix-dirwatch-bot\" matrix-dirwatch-exe \"--directory=$watch_dir\" \"--exclude=$exclude\"\n\t\nHere, you can replace `$watch_dir` by the directory you want to monitor, and `$exclude` by the files you want to exclude. Executing the command will print out changes in the form suited for passing it to curl. As you can see, the bot is designed by way of the Unix philosophy: It doesn’t handle HTTP, it just handles the monitoring part. It’s your responsibility to pass the information along. \n\nAn example of how to do that is contained in `docs/matrix-dirwatch.sh`, in which `unbuffer`, the bot, `curl` and `xargs` are combined with pipes to feed the data to the matrix-bot.\n\nThis process can also be combined with systemd. A sample service is provieded in `docs/matrix-dirwatch.service`.\n\n### Manually\n\nAssuming you have compiled the bot yourself, you’re left with a single executable file:  `matrix-dirwatch-exe`. The command line is the same as in the docker example.\n\n## Compilation from source\n\n### Using Nix\n\nThe easiest way to compile the bot or the docker image from source is to use the [nix package manager](https://nixos.org/nix/). With it, you can build the bot using\n\n    nix-build\n\nThe resulting files will be located in the `result/` directory. To build the Docker image, use\n\n    nix-build dockerimage.nix\n\nThis will, at the last line, output a path that you can feed into `docker load`.\n\n### Using cabal\n\nThe bot can be compiled using [cabal-install](https://www.haskell.org/cabal/) by using `cabal install --only-dependencies` and then `cabal install`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplapadoo%2Fmatrix-dirwatch-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplapadoo%2Fmatrix-dirwatch-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplapadoo%2Fmatrix-dirwatch-bot/lists"}