You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rwxrob-dot/scripts/mode2yaml

13 lines
350 B
Bash

#!/usr/bin/env bash
# 💤 **Break** - out < 30 minutes, *no chat*
while IFS= read -r line; do
mode=${line%%-*}
status=${line#*-}
# echo mode: $mode
# echo status: $status
emoji=${mode%% *}
name=${mode#* }
name=${name//\*/}
printf " - emoji: %s\n name: %s\n status: %s\n flags:\n tags:\n\n" "$emoji" "$name" "$status"
done