add multiple sources for zettel
parent
74d9673e24
commit
a2262aeb6c
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CONFIG="${ZETTEL_HOME:-${HOME:-~}/.config/zettel/config.json}"
|
||||
|
||||
if test -f "$CONFIG"; then
|
||||
jq -r 'to_entries | map(.key) | join("\n")' "$CONFIG"
|
||||
else
|
||||
echo .
|
||||
fi
|
|
@ -1,3 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
awk '{ printf "%s:", FILENAME; print; nextfile }' zettel/* | sed -E 's/:# ?/:/g'
|
||||
zettel-sources \
|
||||
| xargs -I FILES find FILES -type f -name '*.md' \
|
||||
| xargs awk '{ printf "%s:", FILENAME; print; nextfile }' \
|
||||
| sed -E 's/:# ?/:/g'
|
||||
|
|
Reference in New Issue