Naposledy aktivní 1 day ago

dominic revidoval tento gist 1 day ago. Přejít na revizi

1 file changed, 11 insertions, 3 deletions

ics214-logger.sh

@@ -3,8 +3,12 @@
3 3 # You can paste the output of this script within the ICS 214 Winlink Form
4 4 # Use `Paste Data from a Spreadsheet` in the ICS 214 form
5 5 #
6 - # Created: 2026-03-07
7 6 # Author: Dominic Reich "OE7DRT" <quick.hat4396@qtztsjosmprqmgtunjyf.com>
7 + # Created: 2026-03-07
8 + #
9 + # Changelog
10 + # 2026-03-08
11 + # Added copy to clipboard on exit (forgot that before)
8 12 #
9 13 # LICENSE: MIT
10 14 #
@@ -39,11 +43,12 @@ process()
39 43
40 44 cutline="--- 8< --- cut --- 8< --- cut --- 8< ---"
41 45 echo -en "\n\n${cutline}\n\n${mylist}\n${cutline}\n"
46 +
47 + command -v wl-copy >/dev/null 2>&1 && { echo -en "${mylist}" | wl-copy -n; echo -en "\nThe list has also been copied to the clipboard\n"; }
48 +
42 49 exit 0
43 50 }
44 51
45 - command -v wl-copy > /dev/null 2>&1 || { echo >&2 "wl-clipboard not installed"; exit 1; }
46 -
47 52 mylist=""
48 53 counter=1
49 54
@@ -57,8 +62,11 @@ do
57 62 if [ -n "${mylist}" ]; then
58 63 echo -en "\nActivities so far:\n${mylist}\n"
59 64 fi
65 +
60 66 echo -en "${counter}. activity: "
61 67 read
68 +
62 69 mylist+="$(date +"""%Y-%m-%d %H:%M""")\t${REPLY}\n"
70 +
63 71 ((counter++))
64 72 done

dominic revidoval tento gist 1 day ago. Přejít na revizi

1 file changed, 64 insertions

ics214-logger.sh(vytvořil soubor)

@@ -0,0 +1,64 @@
1 + #!/usr/bin/env sh
2 + # Create parseable data for the Winlink Activity Log (ICS 214)
3 + # You can paste the output of this script within the ICS 214 Winlink Form
4 + # Use `Paste Data from a Spreadsheet` in the ICS 214 form
5 + #
6 + # Created: 2026-03-07
7 + # Author: Dominic Reich "OE7DRT" <quick.hat4396@qtztsjosmprqmgtunjyf.com>
8 + #
9 + # LICENSE: MIT
10 + #
11 + # Copyright © 2026 Dominic Reich, OE7DRT
12 + #
13 + # Permission is hereby granted, free of charge, to any person obtaining a copy
14 + # of this software and associated documentation files (the “Software”), to deal
15 + # in the Software without restriction, including without limitation the rights
16 + # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 + # copies of the Software, and to permit persons to whom the Software is
18 + # furnished to do so, subject to the following conditions:
19 + #
20 + # The above copyright notice and this permission notice shall be included in
21 + # all copies or substantial portions of the Software.
22 + #
23 + # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 + # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 + # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 + # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 + # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 + # SOFTWARE.
30 +
31 + trap process 2
32 +
33 + process()
34 + {
35 + if [ -z "${mylist}" ]; then
36 + echo -en 2>&1 "\n\nList is empty, aborting!\n"
37 + exit 0
38 + fi
39 +
40 + cutline="--- 8< --- cut --- 8< --- cut --- 8< ---"
41 + echo -en "\n\n${cutline}\n\n${mylist}\n${cutline}\n"
42 + exit 0
43 + }
44 +
45 + command -v wl-copy > /dev/null 2>&1 || { echo >&2 "wl-clipboard not installed"; exit 1; }
46 +
47 + mylist=""
48 + counter=1
49 +
50 + echo -en "This scipt gathers activity tasks used for the Winlink Activity Log (ICS 214)
51 + The numbered activities represent the current line number
52 + The actual time will be added as soon as you hit the enter key\n
53 + Press <CTRL>+C to stop and show the log\n\n"
54 +
55 + while :
56 + do
57 + if [ -n "${mylist}" ]; then
58 + echo -en "\nActivities so far:\n${mylist}\n"
59 + fi
60 + echo -en "${counter}. activity: "
61 + read
62 + mylist+="$(date +"""%Y-%m-%d %H:%M""")\t${REPLY}\n"
63 + ((counter++))
64 + done
Novější Starší