otlwc

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

otlwc

Steve Litt
Hi all,

Here's my otlwc script:

#!/bin/bash
wordcount=$(cat $1 | sed -e "s/^\(\s*\):/\1/" | wc -w)
timestamp=$(date +%Y%m%d_%H%M%S)
echo -e "$timestamp\t\t$wordcount"

It's a bash script to do a word count on a VO outline.

It removes the initial colon from body text, and then does a wordcount and
timestamp, and print them.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: otlwc

Matthew Weier O'Phinney-2
On Tue, Dec 16, 2008 at 8:37 AM, Steve Litt <[hidden email]> wrote:

> Here's my otlwc script:
>
> #!/bin/bash
> wordcount=$(cat $1 | sed -e "s/^\(\s*\):/\1/" | wc -w)
> timestamp=$(date +%Y%m%d_%H%M%S)
> echo -e "$timestamp\t\t$wordcount"
>
> It's a bash script to do a word count on a VO outline.
>
> It removes the initial colon from body text, and then does a wordcount and
> timestamp, and print them.

Awesome -- I've often needed this functionality, and was too lazy to type it up!

Thanks!

--
Matthew Weier O'Phinney
[hidden email]
http://weierophinney.net/matthew/
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: otlwc

Steve Litt
On Tuesday 16 December 2008 11:18:22 am Matthew Weier O'Phinney wrote:
> On Tue, Dec 16, 2008 at 8:37 AM, Steve Litt <[hidden email]>
wrote:

> > Here's my otlwc script:
> >
> > #!/bin/bash
> > wordcount=$(cat $1 | sed -e "s/^\(\s*\):/\1/" | wc -w)
> > timestamp=$(date +%Y%m%d_%H%M%S)
> > echo -e "$timestamp\t\t$wordcount"
> >
> > It's a bash script to do a word count on a VO outline.
> >
> > It removes the initial colon from body text, and then does a wordcount
> > and timestamp, and print them.
>
> Awesome -- I've often needed this functionality, and was too lazy to type
> it up!
>
> Thanks!

It wouldn't be hard for someone to knock it off in Windows using Perl, Ruby,
Python, or even C. I could write the C, but my only C compiler is 15 year old
Turbo C++. I've heard there are some nice free software C compilers for
windows now.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: otlwc

Scott Scriven-2
In reply to this post by Steve Litt
* Steve Litt <[hidden email]> wrote:
> Here's my otlwc script:
>
> #!/bin/bash
> wordcount=$(cat $1 | sed -e "s/^\(\s*\):/\1/" | wc -w)
> timestamp=$(date +%Y%m%d_%H%M%S)
> echo -e "$timestamp\t\t$wordcount"
>
> It's a bash script to do a word count on a VO outline.

I found this was slightly more accurate, in corner cases:

  sed 's/\t: /\t /' < $1 | wc -w

However, for nanowrimo, I didn't stick it out with VO.  I
switched back to plain text with ":set foldmethod=indent".  I
only really used outlining for chapter headings, so I spent at
least 98% of my time writing and managing body text.  Neither
space- nor colon-prefixed body blocks really worked for me for
various reasons, but plain indented text files were fine.

There wasn't really any problem with VO...  I just wasn't really
doing an outline complex enough for VO to be helpful.


-- Scott
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner