2 stable releases
Uses old Rust 2015
1.0.1 | Jun 22, 2024 |
---|
#644 in Command line utilities
9KB
58 lines
Konsole --tabs-from-file ssh list generator
Rust CLI Utility for genetrating newline delimited file that contains command structures to be used by the "Konsole --tabs-from-file" feature
Build Locally
git clone https://github.com/jackpots28/list_to_konsole-tabs_rs.git
cd list_to_konsole-tabs_rs
cargo build --release
cp -r target/release/list-to-tabs /usr/local/sbin/list-to-tabs
Usage/Examples
list-to-tabs --help
Convert CLI list or newline file of hostnames to Konsole tab-from-file list
Usage: list-to-tabs [OPTIONS] <--list [<LIST>...]|--input-file <INPUT>>
Options:
-l, --list [<LIST>...] Space delimited list of hostnames
-i, --input-file <INPUT> Input file as newline delimited text file
-o, --output-file <FILE> The output path with filename [default: ./default_output.tabs]
-h, --help Print help
list-to-tabs -o sample_output_file.tabs --list host_name1 host_name2 host_name3
or
printf "host_name1\nhost_name2\nhost_name3\n" > server.list
list-to-tabs -o sample_output_file.tabs --input-file server.list
cat sample_output_file.tabs
Outputs tab file to ./sample_output_file.tabs
Contents of file are in the format of:
title: host_name1;; command: ssh host_name1
title: host_name2;; command: ssh host_name2
title: host_name3;; command: ssh host_name3
konsole --tabs-from-file sample_output_file.tabs
License
Dependencies
~1.2–1.8MB
~34K SLoC