aboutsummaryrefslogblamecommitdiffstats
path: root/lem
blob: 3a8f4feefbe519102d723f80bc562507c1dc752b (plain) (tree)
1
2
3
4
5
6
7
8
9
               
 

                                              
                
 

                          
                                                     





            

                                                  
 
                             
                                         
 
                                 

              
#!/usr/bin/bash

NOTES=/home/$USER/Documents/Notes
TARGET_DIR=/home/lemon/Documents/Notes/homezet
VIM=/usr/bin/vim

if [[ "$1" = "-m" ]]; then
    msg="${*:2}"
    TARGET_DIR=/home/lemon/Documents/Notes/MOD/modzet
    shift
else
    msg="$@"
    shift
fi

# Replace spaces with underscores in the file name
file_name=${msg// /_}

STAMP="$(date +%G%m%d%H%M%S)"
F_PATH="$TARGET_DIR/$STAMP-$file_name.md"

printf "# %s" "$msg" >> "$F_PATH"

$VIM "$F_PATH"