]>
us-delaporte.pagekite.me Git - minion.git/blob - bin/m2w
2 # m2w - minion send to wiki
3 # Will publish a maximum of four .md files to .md.txt files
4 # Meant for use wit Dokuwiki
5 # to $M2W_DIR on $M2W_SCP_HOST
7 files
=$(find $HOME/Journal/$year -type f -iname "*$1*\.md")
9 if [ ! -n "$M2W_DIR" ]; then
14 if [ ! -n "$M2W_HOST" ]; then
20 yearmonthday
=`date -I`
23 for file in $files; do
24 base
=`basename $file .md`
26 scp
$M2W_HOST:$M2W_DIR/$base.txt
$HOME/Journal
/archive
-$year/wiki.backup.
$base.
$yearmonthday.txt
29 scp
$file $M2W_HOST:$M2W_DIR/$base.txt
30 counter
=$((counter + 1))
31 if [ $counter -gt 4 ]; then
32 echo "Aborting after 4 files."
33 echo "The following files would have been processed..."