McFisto McFist wrote:
On Jan 7, 2008 8:50 PM, Richard Heck <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
McFisto McFist wrote:
> Hello, hopefully this is the right place for this.
>
> Is there any chance a character counter could be implemented
into Lyx? It
> would be of great help when writing university papers
>
>
There is a word counter. Your teachers count characters?
yes, for some reason we are expected to hand over the exact number of
characters.
That is the strangest thing I've heard from the teaching world in a long
time. (I teach at University myself.)
Anyway, this isn't hard to do:
#!/bin/sh
FILE=$1;
if [ -z "$FILE" ]; then
echo "Usage: countlyxchars FILE";
exit 1;
fi
lyx -export text $FILE;
cat ${FILE%.lyx}.txt | sed -e 's/\s//g' | wc -c
That'll get you pretty close.
Richard