12 Feb 2001 (updated 13 Feb 2001 at 14:46 UTC)
»
#!/bin/sh
# script to copy memo from Palm "advogato" category to diary
# Memo must be filed under "advogato" and have 1st line "diary.txt"
topdir=$HOME
tmphtml=$topdir/diary$$.html
memos -d $topdir
cat > $tmphtml <<EOF
<form method="POST" action="http://advogato.org/diary/post.html">
<textarea name="entry"
EOF
(echo ' cols=60 rows=16>' ; \
tail +2 $topdir/[Aa]dvogato/diary.txt \
| sed -e 's/&/\&/g' -e 's/</\</g' -e 's/>/\>/g') >> $tmphtml
cat >> $tmphtml <<EOF
</textarea>
<p>
<input type="submit" name=preview value="Preview">
<input type="hidden" name=key value="-1">
</form>
EOF
netscape -remote "OpenFile($tmphtml)"