updates to functions

This commit is contained in:
Daylin Morgan 2023-04-11 09:46:08 -05:00
parent 34bcbfaa51
commit 9b4e145d8e
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/usr/bin/env zsh
#? quick and dirty script to generate a pdf from markdown with pandoc/latex
root=$1
# get extension and root path: https://stackoverflow.com/a/40928328
fname="${root#.}"
fname="${root%"$fname"}${fname%.*}"
ext="${root#"$fname"}"
echo "converting $root to pdf"
if [[ $ext != ".md" ]]; then
echo "error! expected a markdown file"
echo "unrecognized extension: $ext"
return 1
fi
pandoc -V geometry:a5paper -V geometry:margin=.5in --dpi=300 -o ${fname}.pdf $root

View file

@ -0,0 +1,6 @@
#!/usr/bin/env zsh
##? update lazy.vim plugins/lock-file
nvim --headless "+Lazy! update" +qa
chezmoi add $HOME/.config/nvim/lazy-lock.json