The reason I need this is that I am using tiddlywiki to organise my
research notes, and write articles. As with much scientific writing,
the more precise the better (and there are usually limits).
Thanks.
Nice idea though.. Anyone want to write it?
;D
--
Daniel Baird
http://tiddlyspot.com (free, effortless TiddlyWiki hosting)
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
Things That Suck)
I've never seen one, but the NaNoWriMo folk might have one..(actually
I just trawled through Google and I think they don't).
Nice idea though.. Anyone want to write it?
config.macros.wordcount = {};
config.macros.wordcount.handler =
function(place,macroName,params,wikifier,paramString,tiddler)
{
createTiddlyText(place,tiddler.text.match(/\w+/g).length);
}
A word count would be better with a RegExp. With the one above you are
spliting the sting up by spaces, but that would also mean two spaces
would add a word in the count, which is not true, also it would think
of punctuation as a word. Since the \w only matches what could be a
word in RegExp syntax, you could just check for that. I have seen one
that would be like this as a macro:
On Oct 20, 11:57 pm, "Simon Baird" <simon.ba...@gmail.com> wrote:
> > On 10/20/06, BradleyMeck <genisis...@gmail.com> wrote:
>
> > > config.macros.wordcount = {};
> > > config.macros.wordcount.handler =
> > > function(place,macroName,params,wikifier,paramString,tiddler)
> > > {
> > > createTiddlyText(place,tiddler.text.match(/\w+/g).length);
>
> > > }Very nice. I just had to try it out.
>
> http://wordcountmacro.tiddlyspot.com/
>
> --
> Simon Baird <simon.ba...@gmail.com>