MIDAS#11 Out of Notes Part 4: Linked Collections (Midas Rich Text LSX)
Out Of Notes, part 4: Linked Collections shows how we can create collections of data with Midas 5 that include both the chosen documents and documents linked to from those documents. In this case, it shows how we can ePublish a couple of selected documents from the Midas Help database, and how the EPUB file created includes the documents linked to those documents via doclinks in the rich text. As shown in the previous segment of this series, EPUB is the most widely accepted eBook format. An ePub file can be opened natively on an iPad or iPhone, B&N Nook, many other Android devices and PCs, all without adding any software.
Because the ePub format is a single file collection of documents with its own navigation, it falls into the same category of "capsule views" that I demonstrated in my earlier segment, Out of Notes, part 2: Capsule Views. In future segments, I will show both other ways to create ePub files from Notes and Domino applications, and also more details on how to add Midas functionality to XPage applications in more integrated ways.
The agent used for the export is shown below. This agent will only work in Midas V5.00 (to be released soon).
This extended sample requires Midas 5.00 or higher.
AGENT: Export to EPUB selected plus linked documents
Dim s As New NotesSession
Dim db As NotesDatabase
Dim coll As NotesDocumentCollection
Dim doc As NotesDocument
Dim gcoll As New GeniiCollection
Set db = s.Currentdatabase
Set coll = db.UnprocessedDocuments
Set doc = coll.GetFirstDocument
While Not (doc Is Nothing)
If gcoll.AddDocBackend(doc.Handle) Then
Print "Added "+doc.Subject(0)
Set doc = coll.GetNextDocument(doc)
Call gcoll.ExportToEPub("c:\demo\MidasHelp.epub", "IncludeLinked='Yes' ")
Rough transcript (used for Closed Captions as well):
This is Ben Langhinrichs of Genii Software with a Mini-Lesson called Out of Notes Part 4. In this, I'm going to talk about Linked Collections.
If you look in our Midas Help database, you'll notice there are a lot of links which go to other topics. So, one of the things that Midas 5 allows you to do is create collections that include both the selected documents and documents which are linked from within it, and then export those.
In this case, we'll export to EPUB. We run the export plus selected links. When we switch over and look in that EPUB file, what we'll see is both the selected documents, which are those three up at the top. If we go in the links are there and we can follow the links. We'll shrink this down so we can see better.
When we click on them, we see the linked document. So you can have a collection plus all the things that it linked to.
Now, I linked at one level down, so just the directly linked documents, but you can do multiple levels down if you want to. They'll just show up here. If we look at the table of contents, it won't include the linked documents, but in an EPUB file it always does.
So here is the logic, and all we really did is the ExportToEPUB has IncludeLinked="Yes", or if you wanted multiple levels, you could use IncludeLinked=2 or 3.
There is the Table of Contents. So, that's the way in Midas you can make Linked Collections. Thank you very much, and watch for further segments.