{"id":18004104,"url":"https://github.com/simon987/beemer","last_synced_at":"2025-03-26T10:31:05.166Z","repository":{"id":80438148,"uuid":"197238030","full_name":"simon987/beemer","owner":"simon987","description":"beemer executes a custom command on files written in the watched directory and deletes it.","archived":false,"fork":false,"pushed_at":"2020-02-08T00:39:45.000Z","size":53,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T01:44:19.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simon987.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":"2019-07-16T17:23:28.000Z","updated_at":"2020-03-14T06:37:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8daba43-f0a9-4522-bccc-10564d94f828","html_url":"https://github.com/simon987/beemer","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/simon987%2Fbeemer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon987%2Fbeemer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon987%2Fbeemer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon987%2Fbeemer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon987","download_url":"https://codeload.github.com/simon987/beemer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245636127,"owners_count":20647911,"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":"2024-10-30T00:13:25.551Z","updated_at":"2025-03-26T10:31:04.877Z","avatar_url":"https://github.com/simon987.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# beemer\n![GitHub](https://img.shields.io/github/license/simon987/beemer.svg)\n[![CodeFactor](https://www.codefactor.io/repository/github/simon987/beemer/badge)](https://www.codefactor.io/repository/github/simon987/beemer)\n[![Development snapshots](https://ci.simon987.net/app/rest/builds/buildType(Beemer_Build)/statusIcon)](https://files.simon987.net/artifacts/Beemer/Build/)\n\n**beemer** executes a custom command on files written in the watched directory and deletes it.\nOptionally, queue files in a .tar file and execute the command when the number of files in the\narchive reaches `NUMBER` (see [usage](#usage)).\n\n### Usage\n\n```\nNAME:\n   beemer - Execute a command on a file after a delay of inactivity\n\nGLOBAL OPTIONS:\n  --transfers value, -t value          Number of simultaneous transfers (default: 10)\n  --command value, -c value            Will be executed on file write. You can use %file, %name and %dir. Example: \"rclone move %file remote:/beem/%dir\"\n  --wait DELAY, -w DELAY               Files will be beemed after DELAY of inactivity (default: 10s)\n  --directory DIRECTORY, -d DIRECTORY  DIRECTORY to watch.\n  --tar NUMBER                         Fill a .tar file with up to NUMBER file before executing the beem command.\n                                       Set to '1' to disable this feature (default: 1)\n  --exclude value, -e value            Exclude files that match the regex pattern\n  --help, -h                           show help\n  --version, -v                        print the version\n\n```\n\n### Examples\n\nBundle up to 100 files in a tar file before moving to another directory\n\n\\**Note that %dir is always `/tmp/beemer`* when `--tar` is specified\n\nWhen `--tar NUM` is specified, the beem command will be called at most \nevery `NUM` new files.\nIt will also be called during cleanup when SIGINT (`Ctrl-C`) is received.\n```bash\n./beemer -w 1s -d ./test --tar 100 -c \"mv %file /mnt/store/my_tars/\"\n```\n\nUpload file to an rclone remote when it has been inactive for at least 30s, \nkeeps the directory structure\n```bash\n./beemer -w 30s -d ./test -c \"rclone move %file remote:/beem/%dir\"\n```\n\nSend file via SSH, ignoring the local directory structure\n```bash\n./beemer -d ./test -c \"scp %file worker@StagingServer:flatdir/\"\n```\n\nUpload file to transfer.sh, store URLs in `urls.txt`\n```bash\n./beemer -w 1s -d ./test -c \"bash -c \\\"curl -s -w '\\\\n' --upload-file %file https://transfer.sh/%name \u0026\u003e\u003e urls.txt\\\"\"\n```\n\n### Beem command template\n\n| Special sequence | Description | Example |\n| :--- | :--- | :--- |\n| `%file` | Full path of the modified file | `/tmp/beemer/test/a/myFile.txt` |\n| `%name` | Name of the modified file | `myFile.txt` |\n| `%dir` | Directory of the modified file, relative to the watched dir. | `test/a` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon987%2Fbeemer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon987%2Fbeemer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon987%2Fbeemer/lists"}