Replies: 2 comments
-
I use a script that runs rsync twice: once for notes and once for images: #!/bin/bash
rsync -vi -rlD -O -c --delete --stats \
--include "*/" \
--exclude bestiary/bestiary.md \
--exclude items/potion-of-resistance.md \
--exclude items/chromatic-rose.md \
--exclude items/armor-of-resistance.md \
--include="*.md" \
--exclude="*" \
/Users/elh/adventures/compendium/dm/compendium/5e/ \
/Users/elh/adventures/campaign-notes/compendium/5e
rsync -vi -rlD -O --ignore-existing --delete --stats \
--include "*/" \
--exclude="*.md" \
--include="*" \
/Users/elh/adventures/compendium/dm/compendium/5e/ \
/Users/elh/adventures/campaign-notes/compendium/5e In both cases, I'm asking rsync to delete files that have been deleted (I'll correct any referencing notes later, but it cleans up duplicates or moved files that I didn't otherwise catch).
That's the gist, assuming I did everything right. ;) |
Beta Was this translation helpful? Give feedback.
-
I've also been running 5etools via bash script. The following will let me build a compendium, and I can add a Otherwise the rsync command is pretty similar to @ebullient (explained really clearly above). And as I found out the hard way, don't use #!/bin/bash
rm -rf "/5e-cli-compendium/DnD-cli-out" &&
java -jar /bin/ttrpg-convert-cli/target/ttrpg-convert-cli-299-SNAPSHOT-runner.jar --index \
-c '/5e-cli-compendium/config.json' \
-o '/5e-cli-compendium/DnD-cli-out' \
'/5etools-mirror.nosync/data' \
'/5etools-homebrew.nosync/creature/Kobold Press; Creature Codex.json' \
'/5etools-homebrew.nosync/creature/Kobold Press; Tome of Beasts.json'
while getopts 'ct' OPTION; do
case "$OPTION" in
c)
echo "copy (rsync) compendium files" && \
rsync -vi -rlcD -O --delete --stats \
"/5e-cli-compendium/DnD-cli-out/5e-compendium" \
"/ObsidianVault/Rules & Options/"
;;
t)
echo "trash compendium files" && \
trash "/5e-cli-compendium/DnD-cli-out"
;;
?)
echo "script usage: $(basename \$0) [-c] [-t]" >&2
exit 1
;;
esac
done |
Beta Was this translation helpful? Give feedback.
-
Copying files into your vault is a necessary task, but there can be some nuance to it.
I'd like to compare notes!
Beta Was this translation helpful? Give feedback.
All reactions