28 lines
537 B
Bash
Executable File
28 lines
537 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
#set -x
|
|
|
|
JOURNAL_DIR=/home/tristan/Journal
|
|
JOURNAL_SCRIPT_DIR=$JOURNAL_DIR/scripts
|
|
[[ -f $JOURNAL_SCRIPT_DIR/utils/journals.sh ]] && . $JOURNAL_SCRIPT_DIR/utils/journals.sh
|
|
|
|
JOURNAL_INDEX=$JOURNAL_DIR/index.wiki
|
|
|
|
declare -a journals
|
|
get_journals journals
|
|
|
|
echo "
|
|
%title Journal Index
|
|
[[full_index.wiki|Full Index]]
|
|
[[tasks.wiki|Tasks Index]]
|
|
[[how-to.wiki|How-To Index]]
|
|
|
|
# Journals
|
|
$(
|
|
for journal in ${journals[@]}; do
|
|
echo "- [[$journal|$( echo $journal | cut -d'.' -f 1 | tr '-' ' ')]]"
|
|
done
|
|
)
|
|
|
|
" > $JOURNAL_INDEX
|