Utility to split a large outline into a set of small outlines

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

Utility to split a large outline into a set of small outlines

Noel Henson
Everyone,

Here is another otl file processing utility. This one splits a large
outline into a set of smaller outlines. It accepts a level option is uses
for the splitting. Files are named according to their parents. Dangerous
characters are substitued with '_'. Parents, in file names, are separated
with a '-'. There is also an option to include the heading from the
immediate parent as the first line (the title line) of the split files.

This is part of a set of tools I'm creating to make it easier to create
books and multi-page websites from a single outline. For example, if you
have a large outline of a book and the chapters are title on level 1, you
can split the file by chapter with: otlsplit -t -l 1 book.otl. If your
chapters are named like "Chapter 1", "Chapter 2" etc., you'll end up with
files named "Chapter_1.otl", "Chapter_2.otl" etc.

I hope you find it as useful as I do.

Noel

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.


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

otlsplit.py (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Utility to split a large outline into a set of small outlines

Steve Litt
On Wednesday 19 October 2005 04:39 pm, Noel Henson wrote:
> For example, if you
> have a large outline of a book and the chapters are title on level 1,

The top level of a non fiction book is usually part, with chapter subservient
to part. Any problem handling that?
 
Steve Litt
Founder and acting president: GoLUG
http://www.golug.org
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Utility to split a large outline into a set of small outlines

Noel Henson
On Wednesday 19 October 2005 04:01 pm, Steve Litt wrote:
> On Wednesday 19 October 2005 04:39 pm, Noel Henson wrote:
> > For example, if you
> > have a large outline of a book and the chapters are title on level 1,
>
> The top level of a non fiction book is usually part, with chapter
> subservient to part. Any problem handling that?
>
> Steve Litt

Nope. Just use:

otlsplit -l 2 boot.otl

You can add '-t' if you want the Heading of each sections' parent to be
used as the title.

I do find, with the outlines that I use, that '-l' values of 1 to 3 work
best. More than that and you can end up with a miriad of otl files. To
prevent them from becoming confusing, I create a subdirectory from where
the main outline is, 'cd' to it and otlsplit the outline there. That way
I can safely delete all the files in that directory without fear of
accidentially deleting the master otl file.

Noel

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

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