Compare commits

...

10 commits

Author SHA1 Message Date
6784b968ba record-shell: Add -i to -h help. 2024-11-14 12:19:36 -06:00
bd3ddab28f record-shell: Add spoopy stdin recording with "-i"
🎃🕷🕸 Happy Halloween!! 👻🍬🍫
2024-10-19 15:21:28 -05:00
750a2cfaf2 resumaker: new -t flag to output TeX 2024-10-03 10:48:27 -05:00
1a878e547a [NEW] resumaker: Andrea's unified resume maker 2024-10-01 13:58:48 -05:00
0529ea07d8 scripts: Fix logging goof in recorders 2024-10-01 13:10:53 -05:00
79ace1cccc Makefile: Work on BusyBox! 2024-10-01 10:32:49 -05:00
d0f9d8a087 [NEW] record-call: Record my audio for calls with Julia
Uses "pulse" default audio device on my PipeWire rig.  Good enough!
2024-09-30 14:07:38 -05:00
2269df14d6 [NEW] record-shell: record shell sessions for librecode
We need to record shell sessions in a standardized way, so I made a
script to accomplish this!
2024-09-30 11:55:01 -05:00
3fccfc023d Makefile: Make installer actually work!
There were some pretty stupid issues that past me didn't fix!  Now,
there shouldn't be an extra bin inside of your $PREFIX's bin!
2024-09-30 11:51:38 -05:00
1f8bc0f275 logging: timestamp helper 2024-09-30 11:21:45 -05:00
5 changed files with 139 additions and 4 deletions

View file

@ -29,11 +29,11 @@ dist/bin:
mkdir -pv $@ mkdir -pv $@
dist/bin/%.bash: %.bash dist/bin/%.bash: %.bash
ln -s ../lib/bash-util/$*.bash $@ ln -sf ../lib/bash-util/$*.bash $@
dist/bin/%: scripts/% dist/bin dist/bin/%: scripts/% dist/bin
sed 's/^\(.\s\+\)\("\)*.\+\/util\//\1\2$(shell \ sed 's/^\(.\s\+\)\("\)*.\+\/util\//\1\2$(shell \
sed 's/\([$\/]\)/\\\1/g' <<<$(PREFIX))\/lib\/bash-util\//' < $< > $@ echo -n $(PREFIX) | sed 's/\([$\/]\)/\\\1/g')\/lib\/bash-util\//' < $< > $@
chmod 755 $@ chmod 755 $@
dist/lib/bash-util: dist/lib/bash-util:
@ -44,12 +44,12 @@ dist/lib/bash-util/%.bash: %.bash
chmod 644 $@ chmod 644 $@
$(PREFIX)/bin/util: $(PREFIX)/bin/util:
ln -s $(PREFIX)/lib/bash-util $(PREFIX)/bin/util ln -sf $(PREFIX)/lib/bash-util $(PREFIX)/bin/util
install: dist install: dist
cd dist && \ cd dist && \
for each in *; \ for each in *; \
do cp -rv "$$each" "$(PREFIX)/$$each"; \ do cp -rv "$$each"/* "$(PREFIX)/$$each/"; \
done done
clean: clean:

View file

@ -6,3 +6,4 @@ dedcat() { (>&2 cat <<<"$@"); exit 1; }
xcat() { (>&2 cat "$@"); exit 0; } xcat() { (>&2 cat "$@"); exit 0; }
excat() { (>&2 cat <<<"$@"); exit 0; } excat() { (>&2 cat <<<"$@"); exit 0; }
die() { errcho $@; exit 1; } die() { errcho $@; exit 1; }
mktimestamp() { date '+%Y-%m-%d_%s'; }

34
scripts/record-call Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
: '
* Record calls with Julia for future annotation 😻
* (just the audio on my end)
'
. "$(dirname $0)/util/logging.bash"
read -d '' usage <<EOUSAGE
Usage: $0 [-h]
OPTIONS
-h Display this help.
EOUSAGE
while getopts 'h' opt; do
case "${opt}" in
h)
excat "$usage"
;;
*)
dedcat "$usage"
;;
esac
done
shift $((OPTIND-1))
rec_prefix="$HOME/librecode/Julia Calls 😻/mine"
mkdir -p "$rec_prefix"
timestamp=$(mktimestamp)
ffmpeg -f pulse -ac 2 -i default "$rec_prefix/$timestamp.wav"

54
scripts/record-shell Executable file
View file

@ -0,0 +1,54 @@
#!/usr/bin/env bash
: '
* Record sessions with Asciinema for the Librecode project!
'
. "$(dirname $0)/util/logging.bash"
read -d '' usage <<EOUSAGE
Usage: $0 [-h|-i]
OPTIONS
-h Display this help.
-i Record stdin. (BE CAREFUL WITH SECRETS!)
EOUSAGE
SPOOPY_STDIN=''
while getopts 'hi' opt; do
case "${opt}" in
h)
excat "$usage"
;;
i)
SPOOPY_STDIN='--stdin'
;;
*)
dedcat "$usage"
;;
esac
done
shift $((OPTIND-1))
. /etc/os-release
timestamp=$(mktimestamp)
case "${ID}" in
arch)
SUB_ID="${BUILD_ID}"
;;
debian)
SUB_ID="${VERSION_CODENAME}"
;;
*)
SUB_ID="unknown"
;;
esac
rec_prefix="$HOME/librecode/sessions/mine/$ID/$SUB_ID"
mkdir -p "$rec_prefix"
asciinema rec $SPOOPY_STDIN "$rec_prefix/$timestamp"

46
scripts/resumaker Normal file
View file

@ -0,0 +1,46 @@
#!/usr/bin/env bash
: '
* Generate my resume using pandoc!
'
. "$(dirname $0)/util/logging.bash"
FONT='monofur for Powerline'
EXTENSION='.pdf'
read -d '' usage <<EOUSAGE
Usage: $0 [-h][-f FONT][-t] RESUME_FILE
OPTIONS
-f FONT Specify font by name.
-h Display this help.
-t Compile intermediate TeX instead of PDF.
EOUSAGE
while getopts 'f:ht' opt; do
case "${opt}" in
f)
FONT=$OPTARG
;;
h)
excat "$usage"
;;
t)
EXTENSION='.tex'
;;
*)
dedcat "$usage"
;;
esac
done
shift $((OPTIND-1))
[ -z "$1" ] && dedcat "$usage"
pandoc $1 \
-o $(sed 's/\(.md\)$//' <<<$1)"$EXTENSION" \
--pdf-engine=xelatex \
-V mainfont="$FONT" \
-V fontsize=9pt \
-V geometry:margin=0.75in