Notes From James
Home | About | Find Stuff | Download
NaNoWriMo with Open Office   James - Thursday, December 2, 2010, 4:17 am

For those of you who have participated in National Novel Writing Month, and are Linux people who use Open Office, here is a short script that I wrote that does a word count and makes a scrambled output file to submit.

odt2txt Novel.odt | gawk '{ gsub( /[a-z]/,"a" ); print $0 }' > out.txt
cat out.txt | gawk '{ x = x + NF } END { print x " words" }'
The problem I had with the Open Office word count is that it gave me a too-high number. This script matched how the NaNoWriMo site counts their words.

[Converting mp4 or m4v files for Sansa Fuze on Ubuntu]  [Odd Halloween Tale]