diff options
| author | not_a_robot06 <temporarythrowaway@tutamail.com> | 2025-07-02 14:36:09 +0100 |
|---|---|---|
| committer | not_a_robot06 <temporarythrowaway@tutamail.com> | 2025-07-02 14:36:09 +0100 |
| commit | b8fc75f962891aa7def3b1829d83534350dfe21d (patch) | |
| tree | eec67ec5ae8a65174dcf4cd35439e4c97ce93af9 /flashcards.sh | |
| download | flashot-b8fc75f962891aa7def3b1829d83534350dfe21d.tar.gz flashot-b8fc75f962891aa7def3b1829d83534350dfe21d.tar.bz2 flashot-b8fc75f962891aa7def3b1829d83534350dfe21d.zip | |
initial commit
works but little input sanitization and pretty inflexible; multiple
scripts for no reason
Diffstat (limited to 'flashcards.sh')
| -rwxr-xr-x | flashcards.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/flashcards.sh b/flashcards.sh new file mode 100755 index 0000000..242d44a --- /dev/null +++ b/flashcards.sh @@ -0,0 +1,19 @@ +#!/bin/sh +action=$(echo "make flashcards\nreset" | dmenu -i -p "action?") +if [ "$action" = "make flashcards" ]; then + confirm=$(echo "no\nyes" | dmenu -i -p "are you sure? screenshot names can overwrite others in media folder") + if [ "$confirm" = "yes" ]; then + cd /tmp/question_shots + combine.sh + cd final + cards.sh + cp *.png ~/.local/share/Anki2/Main/collection.media/ + thunar /tmp/question_shots/final & + echo "yay" | dmenu -p "done! import cards.txt into Anki. remember to reset if done" + fi +elif [ "$action" = "reset" ]; then + confirm=$(echo "no\nyes" | dmenu -i -p "are you sure? this action cannot be undone") + if [ "$confirm" = "yes" ]; then + rm -rf /tmp/question_shots/ + fi +fi |
