mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 8db79d8020ddb87f51888a1f2ba06fba846c5e55
parent 744c65ecc601bb8e0e78de16ecd1ada23dba9755
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri, 22 Sep 2023 22:06:11 -0700

wikilink

Diffstat:
wikilink | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/wikilink b/wikilink @@ -0,0 +1,18 @@ +#!/bin/bash + +CURRENT="$1" +NAME="$2" +NORM=$(echo "$NAME" | tr "A-Z" "a-z" | tr ' ' '_' | tr -dc '_a-z0-9-') +FILE_CURRENT="$HOME/todo/wiki/$CURRENT" +FOLDER=$(cat "$FILE_CURRENT" | grep "^Folder:" |cut -d: -f2 | sed 's/ *//') + +echo "[$NORM]" +cat <<EOF > $HOME/todo/wiki/$NORM +# $NAME + +#todo + +Up: [$CURRENT] + +Folder: $FOLDER +EOF