A Binder-From-Outline-Doc Feature

Heya Keith, everyone.

I had an idea for a possible future feature in Scrivener today. It might be one of those ideas that only me and like, three other people in the world would ever use (and thus maybe not worth the time to implement), but it’s something to think about, anyway. Now, disclaimer: I am still new to Scrivener, and I’ll probably look foolish if it already has something like this and I just don’t know it yet. But with that out of the way, here goes:

Why not have a “Binder From External Outline” feature that takes a .doc or .rtf file containing a typical Harvard/Legal-style outline (or perhaps just a bulleted list), such as the following…

I. Top Level heading
---->A. Item
-------->1. Sub-Item

…Or something similar, and then lets you select which levels, items, etc. you want to be your folders, documents, etc., and then uses that information to create/delete/rearrange the folders and documents in your Binder? (Perhaps it could use styles or special formatting to determine which lines of text were, in fact, headings.) Reason being, I currently have a Word document containing a very dense, complex, and multileveled outline that spans over 250 pages of text, and I wanted a quick and easy way to import the document into Scrivener whilst using the overall structure of the outline to organize my Binder. The actual job of writing functions to parse the list/outline correctly would probably be the worst of this – then again, that’s only from a layman’s perspective – but it might be worth doing for those of us working with complex outlines . . . provided, of course, that I’m not the only person who would want this, which I might very well be.

All the best,
A.H.

Hi,

The problem with this idea is purely technical, I’m afraid - as a one-man development team, at the moment I rely on the standard OS X importers for RTF and DOC etc. I have customised the RTF import a lot - to support images, footnotes, comments and suchlike - but unfortunately it’s not possible to customise it to read structural information because this is much more deeper and woven throughout the file. With images and suchlike, I can look for certain tags and hang on to them while the OS X code does its thing, then swoop in and convert those tags into images. Structural information is so woven throughout the text, though, with all the levels to take into consideration, that it’s just not possible to hack this.

In other words, this would require our own RTF parser. This is something I really want to be able to achieve one day - having our own RTF parser and, even better, our own .docx parser, would give us a lot more freedom and control; it’s just that these are massive jobs that would take a couple or three months of a single coder’s time.

So, this is a great idea, and something that I hope will one day make it into Scrivener - other users have asked for it in the past too - it’s merely limited by resources at the moment. It is on the list for the future though.

Thanks and all the best,
Keith

Well, if I knew enough about C – I assume you’re using Objective-C, right? – I would be more than willing to take on the challenge of an RTF parser, as the outline-to-binder idea is a feature that I’d REALLY love to see happen. But sadly, I’m a Java coder myself, and have only just started learning Obj.-C and Mac development. (I just got to Chapter 2 – Interface Builder – in the tutorial book I recently bought, if that gives you any indication.) Nonetheless, if I ever get to that point in my quest for forbidden lore, I’ll let you know. Maybe we could work on it together, provided I had the knowledge to be useful. Scrivener is the first program I’ve seen in a long while that actually makes me want to learn more about serious software development. I think that has to do with the power Scrivener has to transform the writing workflow, since I’m primarily a writer first and anything else second.

In fact, I think I might write a baseline “outline” parser in my spare time, one that can look at the text of a structured document and “see” the structure, and then yank things out. But where to begin? I know this is a “Scrivener wish list” forum and not a developer’s convention, but, where and how exactly does one begin when parsing the text of a structured outline-type document? My instincts tell me to look at white-space and indentation first, but there has to be a more elegant way of doing it than that. Oh well. I’ll work on it and let you know!