updates to functions
This commit is contained in:
parent
34bcbfaa51
commit
9b4e145d8e
2 changed files with 25 additions and 0 deletions
19
home/private_dot_config/zsh/functions/md2pdf
Normal file
19
home/private_dot_config/zsh/functions/md2pdf
Normal 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
|
||||||
|
|
||||||
|
|
6
home/private_dot_config/zsh/functions/nvim-plugin-update
Normal file
6
home/private_dot_config/zsh/functions/nvim-plugin-update
Normal 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
|
Loading…
Reference in a new issue