Starting the phlog
------------------------------------------------------------------------
Created : 27/08/2020
Author : Peter Zuidema
Last edited : $Date: 2020/08/27 15:54:02 $
------------------------------------------------------------------------
Since a few days I have my gopher site running and started browsing the
gophersphere, is that a word? Anyway I like messing around on my FreeBSD
box via ssh on the terminal. So Gopher is right up to my alley. Of
course I wanted to optimally automate the process so currently the
process is having the 'tibabit/vim-templates' plugin installed in vim
with the following template.
gph.template
Title
------------------------------------------------------------------------
Created : {{TODAY}}
Author : {{NAME}}
Last edited : \$Date\$
------------------------------------------------------------------------
Story
And a function in fish to to create a .gph file in the phlog directory
function phlog -d "Create a new phlog entry"
set phlogdir /var/gopher/phlog
set file (date +%d-%m-%Y-%H%M%S).gph
rvi $phlogdir/$file
end
And for good measure rvi is a fish function which is vim with revision
control wrapped around it.
function rvi --description 'Use RCS with vi'
set RCS (dirname $argv)/RCS
if ! test -d $RCS
mkdir -p $RCS
end
if test -e $argv
/bin/chmod -w $argv
/usr/local/bin/co -l $argv
end
/usr/local/bin/vim $argv
/usr/local/bin/ci -u $argv
end