├── .gitignore ├── LICENSE ├── README.md ├── main └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | coverage/ 3 | tmp/ 4 | npm-debug.log* 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yoshua Wuyts 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hypertail 2 | Tail a hyperpipe at a hypername 3 | 4 | ## Usage 5 | 6 | ```txt 7 | Usage: hypertail [options] 8 | 9 | Example: 10 | $ hypername init startup.world 11 | $ hypername sync startup.world 12 | $ hypername list startup.world 13 | $ hypertail startup.world production.log 14 | ``` 15 | All options are passed to `hyperpipe`. 16 | 17 | ## See Also 18 | - [hypername](https://github.com/mafintosh/hypername) 19 | - [hyperpipe](https://github.com/mafintosh/hyperpipe) 20 | 21 | ## License 22 | [MIT](https://tldrlegal.com/license/mit-license) 23 | -------------------------------------------------------------------------------- /main: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | hypername -h > /dev/null 4 | if [ $? -ne 0 ]; then 5 | printf 'command %s not found. installing\n' 'hypername' 6 | npm i -g 'hypername' || exit 1 7 | fi 8 | 9 | hyperpipe -h > /dev/null 10 | if [ $? -ne 0 ]; then 11 | printf 'command %s not found. installing\n' 'hyperpipe' 12 | npm i -g 'hyperpipe' || exit 1 13 | fi 14 | 15 | if [ $# -lt 2 ]; then 16 | printf 'Usage: hypertail \n' 17 | exit 1 18 | fi 19 | 20 | topic="$1" 21 | topic_key="$2" 22 | shift 2 23 | 24 | key="$(hypername get "$topic" "$topic_key")" 25 | 26 | if [ $? -ne 0 ]; then 27 | printf 'hypername get %s %s failed. Exiting\n' "$topic" "$topic_key" 28 | fi 29 | 30 | hyperpipe "/tmp/$topic/$topic_key.db" "$key" "$@" 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hypertail", 3 | "version": "1.0.4", 4 | "description": "Tail a hyperpipe at a hypername", 5 | "main": "index.js", 6 | "bin": { 7 | "hypertail": "main" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "keywords": [], 13 | "author": "Yoshua Wuyts ", 14 | "license": "MIT" 15 | } 16 | --------------------------------------------------------------------------------