Compare commits
10 commits
42f7cad47c
...
6784b968ba
| Author | SHA1 | Date | |
|---|---|---|---|
| 6784b968ba | |||
| bd3ddab28f | |||
| 750a2cfaf2 | |||
| 1a878e547a | |||
| 0529ea07d8 | |||
| 79ace1cccc | |||
| d0f9d8a087 | |||
| 2269df14d6 | |||
| 3fccfc023d | |||
| 1f8bc0f275 |
5 changed files with 139 additions and 4 deletions
8
Makefile
8
Makefile
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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
34
scripts/record-call
Executable 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
54
scripts/record-shell
Executable 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
46
scripts/resumaker
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue