{"id":16304828,"url":"https://github.com/moznion/conk","last_synced_at":"2025-10-25T14:30:31.159Z","repository":{"id":46489517,"uuid":"414829954","full_name":"moznion/conk","owner":"moznion","description":"A command-line tool that triggers command when the input (doesn't) comes from STDIN in an interval.","archived":false,"fork":false,"pushed_at":"2023-03-19T00:05:07.000Z","size":14,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T07:12:15.862Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moznion.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":"2021-10-08T03:09:18.000Z","updated_at":"2022-04-29T15:20:38.000Z","dependencies_parsed_at":"2024-06-19T16:34:50.267Z","dependency_job_id":null,"html_url":"https://github.com/moznion/conk","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/moznion/conk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fconk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fconk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fconk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fconk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moznion","download_url":"https://codeload.github.com/moznion/conk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fconk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280968428,"owners_count":26422203,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10T21:04:55.701Z","updated_at":"2025-10-25T14:30:30.880Z","avatar_url":"https://github.com/moznion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# conk\n\nA command-line tool that triggers command when the input (doesn't) comes from STDIN in an interval.\n\n## Usage\n\n```\n$ conk -h\nA command-line tool that triggers command when the input (doesn't) comes from STDIN in an interval.\nIf the input comes from STDIN, it fires \"--on-notified-cmd\" command. Elsewise, it executes \"--on-not-notified-cmd\".\n\nUsage of ./conk:\n   ./conk [OPTIONS]\nOptions\n  -dry-run\n        dry-run mode. if this value is true, it notifies the command was triggered, instead of executing commands.\n  -interval-sec uint\n        [mandatory] interval duration seconds to check the bytes that come from stdin.\n  -on-not-notified-cmd string\n        [semi-mandatory] command that runs on NOT notified (i.e. when bytes don't come from stdin in an interval). this must be JSON string array. it requires this value and/or \"--on-notified-cmd\" (default \"[]\")\n  -on-notified-cmd string\n        [semi-mandatory] command that runs on notified (i.e. when bytes come from stdin in an interval). this must be JSON string array. it requires this value and/or \"--on-not-notified-cmd\" (default \"[]\")\n  -on-ticked-cmd string\n        command that runs every interval. this must be JSON string array. (default \"[]\")\n  -stdin-distinct on-notified-cmd\n        if this value is true, it makes the arguments for on-notified-cmd that come from STDIN distinct (i.e. makes them unique). see also: -stdin-placeholder\n  -stdin-placeholder on-notified-cmd\n        placeholder name that can be used in on-notified-cmd to give the command the arguments that come from STDIN.\n  -version\n        show version info\n```\n\nhttps://user-images.githubusercontent.com/1422834/136492005-e9816823-79ae-4cdb-9282-abb205039bcb.mov\n\n### -stdin-placeholder\n\n`-stdin-placeholder` option receives a placeholder name that can be used in `on-notified-cmd` to give the command the arguments that come from STDIN.\n\nFor example,\n\n```\n$ generator | conk -interval-sec 3 -on-notified-cmd '[\"echo\", \"{{__STDIN__}}\"]' -stdin-placeholder '{{__STDIN__}}'\n```\n\nif the `generator` outputs `foo\\nbar\\nbuz\\n` to STDOUT in 3 seconds, the conk command interpolates those texts in `{{__STDIN__}}`, like `[\"echo\", \"foo\", \"bar\", \"buz\"].\n\n### -stdin-distinct\n\n`-stdin-distinct` option accepts the flag to instruct whether it makes the arguments for `on-notified-cmd` that come from STDIN distinct, i.e. makes them unique.\n\n```\n$ generator | conk -interval-sec 3 -on-notified-cmd '[\"echo\", \"{{__STDIN__}}\"]' -stdin-placeholder '{{__STDIN__}}' -stdin-distinct\n```\n\nin these commands, if the `generator` outputs `foo\\nbar\\nfoo\\nfoo` to STDOUT in 3 seconds, the conk command interpolates those texts in `{{__STDIN__}}` with unique arguments, like `[\"echo\", \"foo\", \"bar\"] because `foo` is duplicated.\n\n## Releases\n\nhttps://github.com/moznion/conk/releases\n\n## Author\n\nmoznion (\u003cmoznion@mail.moznion.net\u003e)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fconk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoznion%2Fconk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fconk/lists"}