~fredg/mybin

ref: dd75eee63add7ee8ddb67ef67ddc87e2fde58ab1 mybin/twt -rwxr-xr-x 487 bytes
dd75eee6 — Fred. Galusik update to new path 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# https://github.com/buckket/twtxt
#
# check https://galusik.fr/twtxt.txt
# 
test -s $HOME/.dmenurc && . $HOME/.dmenurc

OUTDIR=$HOME/code/galusik.fr
TWT=${OUTDIR}/twtxt.txt
PROMPT="twtxt: "

MSG="$(xclip -o | dmenu -sb ${sb} -sf ${sf} -nb ${nb} -nf ${nf} -fn ${fn} -p "$PROMPT")" 
test -z "${MSG}" && exit
printf '%s\t%s\n' "$(date +%FT%T%:Z)" "${MSG}" >> "${TWT}"

# upload
cd "${OUTDIR}"
make twtxt && \
	git add twtxt.* && \
	git commit -m "twtxt new post" && \
	git push