Publishing draft to website with accordian functionality ( like binder) with hyperlinks to docs and other pages

I’ve used Scrivener to create an outline of links to publicly available information on the web about music (youtube, pdf, etc.). So far it incorporates about 1600 links.

I’d like Scrivener to generate html that provides an accordian outline similar to the binder display in the scrivener interface itself, with the ability to link to endpoint documents and videos and return, Search capability into the outline would also be desirable, again similar to the scriven interface.

Can anyone provide some guidance as to how to cross my current chasm of ignorance and tailor Scrivener out-of-box capabilities to create html having some of the desired functionality.?


Scrivener is not a general purpose web design tool. It can provide outbound links and return links from documents that it creates, but the binder-like display and search functionality will require some kind of script and cannot be achieved with Scrivener-generated HTML.


What you’re referring to here is all well out of the scope for what Scrivener can produce—that’s a fully fleshed out website you’re describing, with both server- and client-side scripting, what with a search engine and live page elements and all.

Your best bet will be finding a framework you can install on your server, or a service that hosts such constructs, and then work backward from there:

  • What type of input can it handle? Can it take a single large HTML file and break it apart by heading structure into multiple files with a browser tree on the left? Does it need multiple files? Can it take Markdown instead of HTML? Etc.
  • Once you have the best input method recognised, the next goal is to figure out how best to get that result out of Scrivener, or if that cannot be done directly, via additional toolchain.

For example, in this thread, another user describes how they use the new v3 compile system to automatically chop up the output into many files, which they needed to input the content into the publication system they are using.[size=80][1][/size] They based some of their work on a guide for splitting output that I posted to the forum. That guide includes a working sample project (aimed at LaTeX output, but modifying that to HTML would be fairly simple).

[size=80][1] By the way your forum tag says “Windows”, though you are posting in the Mac section. I’m assuming the latter is relevant, but if you are on Windows then some of the techniques above will not work yet, even in the beta, as they have yet to implement the post-processing system.[/size]

On the PC, Freeplane can generate a collapsible HTML representation of its mind map. Worth a try on the Mac. If Freeplane’s HTML is satisfactory, you can use Scrivener’s OPML or MM output as a source for your map.

Rgds - Jerome


Thanks for excellent information. My exports to mm are providing a high percentage of the functionality I want. And, since some of the remaining functionality (hyperlinks in notes; inclusion of synopsis and/or annotation information; bookmarks as link), would be supported in mm if exported, I may be able to hopefully influence the beta folks to export such in the data.

Even if I am not able to plus up the exports, I can write a post editing program to the mm format to add missing data, now that the structure to hold it has been exported…

I am still hunting for a better solution, but your observations move me quite a bit forward.

Steve, glad you’re getting some traction with Freeplane. Yes, you’ll most likely have to script those changes; L&L won’t be adding user-requested capabilities to the Windows Beta. Their imperative is to ship Scriv 3 as designed, to get it into revenue service.

I’ve been scripting Scriv in AutoHotkey almost since putting it into production in 2013. A sortable “database” view of the Scrivener binder is the core of the script. (That’s a native feature of Freeplane, btw.) But quite often my scripts involve string manipulation of Scriv’s outputs, as you’re considering.

L&L are most likely to respond to suggestions they believe will appeal to a large number of users. But we all have our own ways of working, so scripting can fill the gap, especially once we’ve reached critical mass, where our new scripts are primarily adaptations of prior scripts.

Cheers - Jerome


Thanks again. you may be a lifesaver for my volunteer work for my non-profit. I am trying to bootstrap with 20 year obsolete computer skills.

Can you elaborate or explain the following:

A sortable “database” view of the Scrivener binder is the core of the script. (That’s a native feature of Freeplane, btw.)

How does one at the sortable database view of the binder?
How does one access the native Freeplane feature?

Finally, to make this all concrete: Could you send me a simple (or complex) sample of a script that enhances the mm with omitted scrivener information in a useful way?

With much gratitude in advance, :smiley:


Hi Steve –

It’s been some time since I dabbled in Freeplane. Wow, yes, the database view of a mindmap is quite difficult to find; it doesn’t appear to be on any of the dropdown menus. Click on the circled icon:
, for a view like this one:

My own implementation in Scrivener is described at Scrivener XML XSD/DTD. With over 8000 documents in the project when I set this up, the binder’s own tree view wasn’t cutting it. Mainly needed a list of the documents I’d been working on most recently, and was perplexed at not being able to do this natively in ScrivW even in 2010. It’s not too complicated to create a basic Listview in AutoHotkey; just read the help samples for GUI and Listview.

Now to find the binder file in Scriv Beta 2.9x (why are we in the Mac forum?) you can click File > Reveal Project Folder and then click one level into the folder to reach the .scrivx file that is the binder database for your project. It’s an XML, human-readable, and can be traversed through string programming, though there are more sophisticated ways via a doc object model.

To isolate the fields I want for the Listview, I use code like this:

Searchterm := "<Title>"
SearchPos := InStr(ScrivBinder,Searchterm,,FragStart)
FragStart := SearchPos + strlen(searchterm)
Searchterm := "</Title>"
SearchPos := Instr(ScrivBinder,Searchterm,,Fragstart)
Fraglen := SearchPos - Fragstart
DocTitle := Substr(Scrivbinder,FragStart,FragLen)

And then I add them to the Listview with code like this:

  LV_Add("-", ModifiedDateTime, "typ1", DispRel2, "typ2", ThisRefB, DocTitle,,, ActiveRelID,LSeq, ActiveDtl, ActiveEmbed, ActiveUnit, nbsp, "",XRefID,DocID5, XRefCount) 

As for modifying the MM files inbound from Scriv to Freeplane, you’ll notice that, at least in MM files native to Freeplane, each node has its own complete HTML block. You’d possibly find it easier to work the back end, injecting live links into the expandable HTML doc generated by Freeplane.

Good luck with the project!

Rgds - Jerome