list-to-tabs

Crates.iolist-to-tabs
lib.rslist-to-tabs
version1.0.1
sourcesrc
created_at2024-06-22 16:45:03.092175
updated_at2024-06-22 17:35:47.186193
descriptionCli tool for generating Konsole --tabs-from-file lists
homepagehttps://github.com/jackpots28/list_to_konsole-tabs_rs
repositoryhttps://github.com/jackpots28/list_to_konsole-tabs_rs
max_upload_size
id1280564
size25,099
Jack Sims (jackpots28)

documentation

README

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

Rust

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

Apache-2.0

Commit count: 13

cargo fmt