This blog post is a copy of a much nicer PDF version.
I found that Wave could be used as collaborative editor on Latex documents by using a modified export bot and a simple shell script. The exporty2 bot (living at exporty2@appspot.com
) allows you to access a wave using access tokens instead of cookie based logins making it easier to fetch those waves using curl. Also the exporty2 bot allows you to export only the text of a Wave using the ``raw'' template.
The raw URL given by the exporty2 bot is pasted into the shell script below. It serves as master wave as it is the document that is latex-ed. Additionally it also lists other resources using the special %FETCHURL
tag. These resources are pairs of local name and URL. Curl fetchs these resources and stores it under their local name before the shell scripts runs the usual combination of latex/bibtex/latex. I usually put those %FETCHURL
tags below \documentclass
.
#!/bin/sh TITLE="wave-collaboration" TOKEN=c64e13d340009da7 WAVEID="googlewave.com!w%252BlRomqcgHA" URL="http://exporty2.appspot.com/export?waveId=$WAVEID&accesstoken=$TOKEN&template=raw" curl -o $TITLE.tex $URL DELIMITER="DELIMITER" FETCHURL=$(grep %FETCHURL $TITLE.tex | sed -e "s/ /$DELIMITER/g") for i in $FETCHURL do URL=$(echo $i | awk -F$DELIMITER '{ print $3 }') FILENAME=$(echo $i | awk -F$DELIMITER '{ print $2 }') curl -z $FILENAME -o $FILENAME $URL done latex $TITLE.tex bibtex $TITLE latex $TITLE.tex dvipdf $TITLE.dviThe nice thing about the exporty bot is that it ignores any blips except the root blip. Thereby you could add replies to the latex document and have inline discussions that are automatically filtered from the export. Also the exporty bot ignores the first line of the wave, so you can name the Wave properly.
The PDF version of this blog post contains examples how to use external graphics and bibliography waves. You can also get the latex source of the PDF.
Comments
Try to resubmit the blip - just add some space and remove them again and hit Ctrl-Enter in Wave. Then wait 5 seconds and the changes should be in exporty.
Google announced robot API changes.
http://code.google.com/apis/wave/extensions/robots/events.html
Not sure whether this is related. Let's see if I can port exporty2 to the new robot API.