Compare commits
4 Commits
4bf639f080
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 850efbe00f | |||
| b992353b02 | |||
| 0a889f38d4 | |||
| a7183cd560 |
@@ -65,7 +65,8 @@ The client uses the following flags
|
||||
-ip <ip:port> - specify alternate server destination
|
||||
-l - list all quotes
|
||||
-r [i] - remove; may be run with or without argument
|
||||
-e - edit
|
||||
-e [i] - edit; may be run with or without argument
|
||||
-c - list color format specifiers with examples
|
||||
-s <i> - specify the size of the receipt buffer
|
||||
-v - display version and exit
|
||||
-vv - display version and about info and exit
|
||||
@@ -82,7 +83,6 @@ The server uses the following flags
|
||||
- Log all uses/transaction data each day
|
||||
- Request, send, and receive the logfile
|
||||
- User-specific quotes/quotefiles
|
||||
- Colored printing and coloring quotes
|
||||
|
||||
[golang]: <https://go.dev/doc/install>
|
||||
[just]: <https://github.com/casey/just>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// =============================================================================
|
||||
// Auth: alex
|
||||
// File: client.go
|
||||
// Revn: 09-15-2026 3.0.3
|
||||
// Revn: 09-16-2026 4.0.0
|
||||
// Func: ask server for a message of the day quote
|
||||
//
|
||||
// TODO: remove ioutil import
|
||||
@@ -51,6 +51,8 @@
|
||||
// changed edit command to be add and then remove instead
|
||||
// of remove and then add, fixing server OOB error when
|
||||
// editting only quote in list
|
||||
//#09-15-2026: finished pretty print implementation
|
||||
// made listAnswer() print list with color print
|
||||
//
|
||||
// =============================================================================
|
||||
|
||||
@@ -320,7 +322,8 @@ func listAnswer( subcom []string ) string {
|
||||
quotes := strings.Split( subcom[0], "\n" )
|
||||
for p, v := range quotes { // iterate over quotes
|
||||
// print num of quote, followed by that quote
|
||||
fmt.Println( p + 1, "\t", v )
|
||||
fmt.Print( p + 1, "\t" )
|
||||
quoteAnswer( []string{ v } )
|
||||
}
|
||||
resp = "te@success" // set transaction end message
|
||||
}
|
||||
@@ -587,7 +590,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
// FIXME get better versioning method
|
||||
VERS = "3.0.3"
|
||||
VERS = "4.0.0"
|
||||
|
||||
if vv { // display info and exit
|
||||
fmt.Println( "ekho client v" + VERS )
|
||||
|
||||
@@ -53,7 +53,6 @@ ins_server:
|
||||
echo "systemctl status ekho"
|
||||
systemctl status ekho
|
||||
|
||||
|
||||
# install client
|
||||
ins_client:
|
||||
#!/usr/bin/bash
|
||||
@@ -67,3 +66,57 @@ ins_client:
|
||||
mv ekho /usr/local/bin/
|
||||
echo "add 'ekho' to shell config (config.fish, .bashrc, etc)"
|
||||
|
||||
# test server
|
||||
stest:
|
||||
@echo "creating server test session"
|
||||
@tmux new-session -Ad -s "server test"
|
||||
@tmux split-window -h -t "server test:1" -l 10%
|
||||
@tmux split-window -v -t "server test:1.2"
|
||||
@tmux send-keys -t "server test:1.1" "clear" Enter
|
||||
@tmux send-keys -t "server test:1.2" "clear" Enter
|
||||
@tmux send-keys -t "server test:1.3" "clear" Enter
|
||||
@tmux rename-window "server test"
|
||||
@tmux send-keys -t "server test:1.1" "vim server.go" Enter
|
||||
@tmux send-keys -t "server test:1.2" "./server"
|
||||
@tmux send-keys -t "server test:1.3" "./client"
|
||||
@tmux attach -t "server test"
|
||||
|
||||
# test client
|
||||
ctest:
|
||||
@echo "creating client test session"
|
||||
@tmux new-session -Ad -s "client test"
|
||||
@tmux split-window -h -t "client test:1" -l 10%
|
||||
@tmux split-window -v -t "client test:1.2"
|
||||
@tmux send-keys -t "client test:1.1" "clear" Enter
|
||||
@tmux send-keys -t "client test:1.2" "clear" Enter
|
||||
@tmux send-keys -t "client test:1.3" "clear" Enter
|
||||
@tmux rename-window "client test"
|
||||
@tmux send-keys -t "client test:1.1" "vim client.go" Enter
|
||||
@tmux send-keys -t "client test:1.2" "./server" Enter
|
||||
@tmux send-keys -t "client test:1.3" "./client"
|
||||
@tmux attach -t "client test"
|
||||
|
||||
# dev work
|
||||
dev:
|
||||
#!/usr/bin/bash
|
||||
REPO=$(basename $(git rev-parse --show-toplevel))
|
||||
BRANCH=$(git branch --show-current)
|
||||
tmux has-session -t "$REPO->$BRANCH"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
tmux attach-session -t "$REPO->$BRANCH"
|
||||
else
|
||||
tmux new-session -Ad -s "$REPO->$BRANCH"
|
||||
tmux rename-window "write"
|
||||
tmux new-window -a -t 1 -n "test"
|
||||
tmux new-window -a -t 2 -n "git" lazygit
|
||||
tmux new-window -a -t 3 -n "man"
|
||||
tmux select-window -t 2
|
||||
tmux select-window -t 1
|
||||
tmux attach -t "$REPO->$BRANCH"
|
||||
fi
|
||||
|
||||
# prep repo to be committed
|
||||
prep:
|
||||
mv justfile test_justfile
|
||||
mv prod_justfile justfile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user