{"id":15629694,"url":"https://github.com/anko/zthrottle","last_synced_at":"2025-04-29T11:10:45.343Z","repository":{"id":150123178,"uuid":"97323814","full_name":"anko/zthrottle","owner":"anko","description":"tool to throttle a pipeline, so an expensive consumer gets a line less often","archived":false,"fork":false,"pushed_at":"2017-07-23T21:47:09.000Z","size":9,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T12:11:26.406Z","etag":null,"topics":["pipeline","throttle","tool","zsh"],"latest_commit_sha":null,"homepage":"https://unix.stackexchange.com/q/378334/16404","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anko.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-07-15T15:14:45.000Z","updated_at":"2023-07-11T17:01:44.000Z","dependencies_parsed_at":"2023-04-16T09:17:17.639Z","dependency_job_id":null,"html_url":"https://github.com/anko/zthrottle","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/anko%2Fzthrottle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fzthrottle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fzthrottle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fzthrottle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anko","download_url":"https://codeload.github.com/anko/zthrottle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251490170,"owners_count":21597564,"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":["pipeline","throttle","tool","zsh"],"created_at":"2024-10-03T10:28:11.191Z","updated_at":"2025-04-29T11:10:45.336Z","avatar_url":"https://github.com/anko.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zthrottle\n\nThrottles a pipeline, only letting a line through at most every `$1` seconds.\nAfter each cooldown interval, only the most recent line is printed.\n\nIf you've used `lodash.js`' [`_.throttle`][lodash-throttle], this is that, but\nfor the \\*NIX command line.\n\n## Example\n\nHere's an illustration of what happens when you run—\n\n```zsh\nfirehose | zthrottle 1 | expensive\n```\n\n![example of what happens][illustration]\n\nArrows represent data being written.\n\nHere's a GIF of that:\n\n![the same example as a GIF][gif]\n\n## Why\n\nThis is handy for when you have a crazy high rate firehose of data on an input\nstream, and a fairly expensive sink that processes them, and you don't want the\nsink to get lines too often, but you do want it to get the newest one whenever\nit does.  So stick `zthrottle` in between:\n\n```zsh\nfirehose | zthrottle 1 | expensive\n# -\u003e `expensive` gets the most recent `firehose` line, but at 1 Hz\n```\n\n## Install\n\nJust put `zthrottle` in your `$PATH`.\n\nYou need [`zsh`][wiki-zsh].\n\n## License\n\n[Unlicense][unlicense].  Public domain.  Use freely.\n\n\n[gif]: https://user-images.githubusercontent.com/5231746/28240490-f6b818b6-697a-11e7-9923-1d976b542582.gif\n[illustration]: https://user-images.githubusercontent.com/5231746/28240427-a0bbf3c0-6979-11e7-9c0c-b597bafd3873.png\n[lodash-throttle]: https://lodash.com/docs/4.17.4#throttle\n[unlicense]: https://unlicense.org/\n[wiki-zsh]: https://en.wikipedia.org/wiki/Z_shell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fzthrottle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanko%2Fzthrottle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fzthrottle/lists"}