22 lines
423 B
Bash
22 lines
423 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
# Sync org files to Anki using emacsclient
|
||
|
|
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
FILES=(
|
||
|
|
"org/cpp/iterator.org"
|
||
|
|
"org/cpp/containers.org"
|
||
|
|
# add more files here
|
||
|
|
)
|
||
|
|
|
||
|
|
for file in "${FILES[@]}"; do
|
||
|
|
if [[ -f "$file" ]]; then
|
||
|
|
echo "Syncing $file..."
|
||
|
|
emacsclient --eval "(progn (find-file \"$file\") (org-anki-sync-all))"
|
||
|
|
else
|
||
|
|
echo "File not found: $file" >&2
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
|
||
|
|
echo "Done."
|