{"id":23219624,"url":"https://github.com/barcek/rvry","last_synced_at":"2025-04-05T15:12:05.758Z","repository":{"id":157419477,"uuid":"457444639","full_name":"barcek/rvry","owner":"barcek","description":"mark time passing | multipurpose timer | command-line tool | Bash","archived":false,"fork":false,"pushed_at":"2025-01-14T21:36:10.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T11:53:02.144Z","etag":null,"topics":["bash","command-line-tool","shell","timer"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/barcek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-02-09T16:44:52.000Z","updated_at":"2025-01-14T21:36:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"21bce5ed-d029-4360-b524-44ab6c6dfe8f","html_url":"https://github.com/barcek/rvry","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/barcek%2Frvry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Frvry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Frvry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Frvry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barcek","download_url":"https://codeload.github.com/barcek/rvry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353742,"owners_count":20925329,"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":["bash","command-line-tool","shell","timer"],"created_at":"2024-12-18T21:36:08.257Z","updated_at":"2025-04-05T15:12:05.739Z","avatar_url":"https://github.com/barcek.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rvry\n\nMark time passing in the terminal.\n\nHighly configurable by flag, with a flow description option and self-test. Can be passed a tag to label the duration and a path to log the whole with date and time to a file, plus a Bash command to be run at each step or on completion.\n\nAvailable over an Alpine base image via the Dockerfile in [shipping](https://github.com/barcek/shipping).\n\n## Why?\n\nTo track the durations of regular activities, see a measure of time taken on a task so far, or delay one, or zone out with a subtle visual beat.\n\nUseful also for jobs needing immediate setup, sub-minute spacing or display.\n\n## How?\n\nThe `rvry` command can be run alone to show the time elapsed as its final output. By default it prints one dot per second, and when stopped with `q` or `Ctrl-C` shows the time elapsed.\n\nA string to label the final output can be passed as the first argument:\n\n```shell\nrvry \"label 1\"\n```\n\nThe path to a log file can be passed as the second:\n\n```shell\nrvry \"label 1\" path/to/log\n```\n\nEach log entry is a start datetime stamp, the duration and the tag.\n\nSeveral options are available (see [Options](#options) below). These include the use of a Bash command run either on completion or at each step, specifically:\n\n- on completion with the base option (i.e. `--task` / `-t`)\n- at each step with one additional option applied (i.e. also `--lift` / `-l`)\n\nThe command is passed to `bash -c` by default, to `exec` unquoted if the `--flux` / `-x` option is applied.\n\nAny such command can receive the available log entry elements, i.e. start datetime stamp and duration plus any tag, via the output cue - `:RVRY` by default - each use of which is replaced with the log entry elements before the command is run.\n\n## Source\n\nThe script can be run with the command `./rvry` while in the same directory, and from elsewhere using the pattern `path/to/rvry`, by first making it executable, if not already, with `chmod +x rvry`. Once executable, it can be run from any directory with the simpler `rvry` by placing it in a directory listed on the `$PATH` environment variable, e.g. '/bin' or '/usr/bin'.\n\nThe hashbang at the top of the file assumes the presence of Bash in '/bin', the source code that several utils are installed. A list can be found close to the top of the file, and is printed also in the help text. In the event of any absence, the script will print the fact then exit.\n\n### Defaults\n\nThe following core default values are defined close to the top of the source file:\n\n- `mark` - the character(s) printed at each step (currently '.')\n- `path` - the initial step count (0)\n- `beat` - the number of seconds between each step (1)\n- `edge` - the number of steps at which to end automatically, if greater than zero only (0, i.e. no automatic end)\n- `sign` - the key pressed to end the script manually ('q')\n- `word` - the output cue for commands run via the `task` option (':RVRY').\n\n### Making changes\n\nRunning the self-test after making changes plus extending or adding test cases to cover new behaviour is recommended. The self-test is run with the `--test` or `-T` flag (see [Options](#options) below). The test cases are set in the `push` function close to the top of the source file.\n\n## Options\n\nThe following can be passed to `rvry` before the tag and log arguments:\n\n- `--mark` / `-m`, to set `mark` to the value of the next argument, e.g. to '+' with `-m +`\n- `--path` / `-p`, to set `path` to the value of the next argument, e.g. to 10 steps with `-p 10`\n- `--beat` / `-b`, to set `beat` to the value of the next argument, e.g. to 0.5 seconds with `-b 0.5`\n- `--edge` / `-e`, to set `edge` to the value of the next argument, e.g. to 15 steps with `-e 15`\n- `--sign` / `-s`, to set `sign` to the value of the next argument, e.g. to space with `-s \" \"`\n- `--word` / `-w`, to set `word` to the value of the next argument, e.g. to '\u003cLINE\u003e' with `-w \"\u003cLINE\u003e\"`\n- `--task` / `-t`, to show and run on completion the Bash command being the value of the next argument, e.g. `echo done` with `-t \"echo done\"`, or, if a file path, e.g. `-t path/to/script.sh`, the content of the file; the command may include the `word` substring - `:RVRY` by default - replaced before the command is run with the start datetime stamp, duration and any tag\n- `--flux` / `-x`, to perform the action for `--task` / `-t` by passing its Bash command to `exec` unquoted rather than to `bash -c`\n- `--lift` / `-l`, to perform the action for `--task` / `-t` at each step, in place of printing `mark`, rather than on completion\n- `--deep` / `-d`, to omit the printing of `mark`, or the printing of the command itself if both `--task` / `-t`  and `--lift` / `-l` are passed\n- `--full` / `-f`, to print escaped characters in `mark`\n- `--near` / `-N`, to retain all printed characters and show those ordinarily hidden, overriding `--full` / `-f`\n- `--glimpse` / `-g`, to show the flow with current values then exit\n- `--version` / `-v`, to show name and version number then exit\n- `--help` / `-h`, to show help text then exit\n- `--test` / `-T`, to perform the self-test then exit, returning an exit code of 1 on failure\n\n## Streams\n\nIf the output of `rvry` is piped to another process, only the final output is passed, without the character(s) marking each step, unless the `--near` or `-N` flag is used. Use of `Ctrl-C` to end the script will interrupt the entire pipeline.\n\n## Development plan\n\nThe following are the expected next steps in the development of the code base. The general medium-term aim is a more portable, robust and visual implementation. Pull requests are welcome for these and other potential improvements.\n\n- provide sample uses\n- extend argument handling for short flag clustering\n- allow for:\n  - greater variation in visual output\n  - alternative timestamp formats\n- revise for full POSIX compatibility\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarcek%2Frvry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarcek%2Frvry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarcek%2Frvry/lists"}