summaryrefslogtreecommitdiff
path: root/question_shot.sh
diff options
context:
space:
mode:
authorhmjsp <hmjsp@liber8bits.com>2025-07-06 23:07:38 +0100
committerhmjsp <hmjsp@liber8bits.com>2025-07-06 23:07:38 +0100
commit65542546a50e08ad0cf55ad2af6f4b00edf02296 (patch)
treed2c5f630b79aaa299d8922f7584a406d15c00672 /question_shot.sh
parent840033234febf09e2367af270ab7a0821fd3d0e5 (diff)
downloadflashot-65542546a50e08ad0cf55ad2af6f4b00edf02296.zip
first proper version
- use hyphens only for separation - only two scripts: one for screenshots and one for making the cards - add README - a little bit of error checking - TODO: if question or answer non existent, then don't break cards.txt
Diffstat (limited to 'question_shot.sh')
-rwxr-xr-xquestion_shot.sh21
1 files changed, 0 insertions, 21 deletions
diff --git a/question_shot.sh b/question_shot.sh
deleted file mode 100755
index a511dec..0000000
--- a/question_shot.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-mkdir -p /tmp/question_shots
-photoname=$(ls /tmp/question_shots | cut -d_ -f1 | uniq | dmenu -i -p "name of screenshots? (no underscores or hyphens)")
-echo "$photoname"
-photonumber=$(basename -a $(ls /tmp/question_shots/"$photoname"*) | cut -d_ -f2 | cut -d- -f1 | uniq | tac | dmenu -i -p "number?")
-
-type=$(echo "question\nanswer" | dmenu -i -p "question or answer?")
-if [ "$type" = "question" ]; then
- type=q
-else
- type=a
-fi
-
-partnumber=$(ls /tmp/question_shots/"$photoname"_"$photonumber"-"$type"-* | tail -n1 | cut -d- -f3 | cut -d. -f1)
-if [ -z "$partnumber" ]; then
- partnumber=0
-else
- partnumber=$(echo "$partnumber"+1 | bc)
-fi
-
-scrot -s /tmp/question_shots/"$photoname"_"$photonumber"-"$type"-"$partnumber".png