Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1 2 
Send Topic Print
Need help exporting to BeeDocs Timeline (Read 24408 times)
iGregor
Full Member
*
Offline



Posts: 36

Need help exporting to BeeDocs Timeline
Jan 16th, 2011, 11:10am
 
I have a project with several hundred historical event notes in a history container.  I'd like to export them to BeeDocs TL3D for presentation purposes.  How do I set up a template to export a tab-delimited text file of selected attributes and note text (Name, Start Date, End Date, URL, note text) in a format that TL3D can read (Label    Start Time     End Time    Link     Notes)?

Thanks.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Need help exporting to BeeDocs Timeline
Reply #1 - Jan 16th, 2011, 11:44am
 
Create 2 template notes (tip - use the built-in prototypes). Template 1, "beedocs-page":
Quote:
Label      Start Time      EndTime
^children(/TEMPLATES/beedocs-item)^

Template 2, "beedocs-item":
Quote:
^if(Name(,))^"^title^"^else^^title^^endIf^TAB^if(StartTime!="never")^^get(StartTime,"D/M/Y")^^endIf^TAB^if(EndTime!="never")^^get(EndTime,"D/M/Y")^^endIf^

N.B, include a line return (new line) after the closing ^endIf^. Replace TAB with a Tab character in the template. The first test ensures that is the title has a comma text, the title is quoted otherwise Beedocs malfunctions.

Now, set the container holding your events (as immediate children*) to use template "beedocs-page" and not to export it's children (an option on the HTML view). Open HTML view for the event's container and click the 'Export' button.

* If the events - the notes with dates - have a more complex nested structure, use an agent to find them and export the agent via the method described.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #2 - Jan 16th, 2011, 9:59pm
 
Thanks Mark, but I'm still pretty clueless about how to properly use almost all of the TBx command expressions.  So bare with me, please, because I'm still stumped what to do here.  I need explicit instructions.  

1) How does using a built in prototype help?  I cannot locate a built-in text prototype.  Are you suggesting the use of the html template?  If so, what to do with the boilerplate expression in the note text field?

2) What does N.B. in your message mean?

3) I couldn't figure out what to do with the prototype templates, so I created two non-html template notes titled BeeDocs-page and BeeDocs-item. But why need two?  

4) Where do I place your Quoted material--directly into the template note field, the expression field, the rule field or other?  

5) How do I generate a Tab character to replace TAB?

6) Once the notes are crafted, then what???

Thanks.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Need help exporting to BeeDocs Timeline
Reply #3 - Jan 17th, 2011, 3:48am
 
OK, lets try again.  

1. After adding the 'HTML Template' prototype, and before using it as a prototype in your document, open the prototype 'HTML Template' note, select all $Text and delete it.  Boilerplate is gone.

2. My 'N.B.', is as it says, to make sure that in your note's copy of the code there is a line return after the last bit of code.  In other words, if you place the cursor at the end of the note, it is on the beginning of the line after the code and not immediately after the last code. This is because when this template spits out the data for each of your events, we want each item in the output text document to be on its own line. Without the extra line return, they'd all be squashed on one line and Beedodcs would not be able to spot where one item stops and the next begins.

3. The two documents hold the code - the prototype you apply to the note ensures it is set up appropriately for the task. You need to set the prototype (e.g. 'HTML Template', as discussed at #1 above) before you add the code to the actual notes; thus the order of the instructions.
  • Set up the necessary prototypes so they are available to use.
  • Add notes that will hold the export code and act as the templates. There are two different templates involved so we need 2 notes.
  • Set both notes to use the 'HTML Template' prototype
  • Copy the relevant code up-thread to the correct template note
  • You now have the templates ready for export use
4. An export template note is a note whose $Text holds code whose only purpose is to supply the 'framework' for all or part of an exported file (HTML, text, XML, whatever format you design). So past the code into the note's $Text. If you've chosen the correct prototype you should see no sidebar and - if copying/pasting from here - use Edit ->Paste and Match Style to maintain the monospace font of the prototype.

5. In your note(s), select the TAB text and click the Tab key. A Tab character will replace the selected text. Ass HTML doesn't reflect hidden characters like Tabs very well and because they're critical to the Beedocs import I figured it better to make sure you know they're there. Beedocs uses Tab-delimited data files for import. It's a general text format you'll likely have used with lots of other apps - whether knowingly or otherwise.

6. Export them, using the method described in my earlier post. One other thing omitted earlier. Open the HTML View of the note you'll use for the actual data export (the one using the beedocs-page template). In the 'HTML Extension' box change '.html' to '.txt'.

Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #4 - Jan 17th, 2011, 11:18am
 
Thanks, but still can't get this to work.  Here's what I've done.  It's likely I've misinterpreted something.  Please advise which steps in this list are incorrect/incomplete, and/or what I might have overlooked from your instructions.

1.  file>built-in>html prototype.  opened note and deleted ALL text in text field.
2.  opened the html template note via rename note.  noticed the prototype box was NOT checked.  checked it.
3.  created two new plain regular notes (not yet set to template).  named one beedocs-page and the other beedocs-item.  from pulldown menu set prototype for each note = html template.
4.  copied your text from above and pasted into text field in beedocs-page and beedocs-item respectively.
5.  located two ^tab^ references in text field in beedocs-item.  selected tab and pressed tab key.  NO tab symbol appeared.  instead got two ^^ separated by a tab-length blank space (won't reproduce in this post for some reason).  left it like that.
6. selected the container to export in outline view.
7. opened view>new html view. unchecked export children. changed file extension to .txt.  set export to TBxport folder on desktop.  clicked export.
8. TBxport folder contained a folder named for the selected container's parent.  inside the parent folder was container's exported file named history.txt.
9. opened history.txt.  got a long list of each note within history container with a lot of formating symbols and other stuff.  does not look like format acceptable to beedocs import, at all.  here's the first few lines from history.txt:

<!--   ** Standard Tinderbox Template [plain] **  -->
<h1>HISTORY</h1>

<!--   ** Standard Tinderbox Template [plain] **  -->
<h1>Maddox Reportedly Attacked in Tonkin Gulf</h1>
<p>The captain of the U.S.S. Maddox reports that his vessel has been fired on and that an attack is imminent. Though he later says that no attack took place, six hours after the initial report, a retaliation against North Vietnam is ordered by President Johnson. American jets bomb two naval bases, and destroy a major oil facility. Two U.S. planes are downed in the attack.</p>
<!--   ** Standard Tinderbox Template [plain] **  -->
<h1>Tonkin Gulf Resolution Passed</h1>
<p>The U.S. congress passes the Gulf of Tonkin Resolution, giving President Johnson the power to take whatever actions he sees necessary to defend southeast Asia.</p>


What next???
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Need help exporting to BeeDocs Timeline
Reply #5 - Jan 17th, 2011, 11:44am
 
#5. No select TAB not ^TAB^. Otherwise correct.  You can't see a tab character, because...it's a tab! The tab here is no different to a tab in any word processing/text edit tool. As this is tab-delimited data we're making, we add a tab to tell Beedocs where a new field's data starts/ends.

#9. The specimen output indicates the error is at step #7 - we shouldn't see any HTML code at all. At #7, did you set the view selected export template to you the 'page' template (i.e. the first of the two given above)? TB can't guess which (non-default) template you may want to use, you have to tell it. Thereafter the document will remember.
Back to top
 
« Last Edit: Jan 17th, 2011, 11:44am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #6 - Jan 17th, 2011, 12:25pm
 
Quote:
At #7, did you set the view selected export template to you the 'page' template (i.e. the first of the two given above)?


No. Didn't set it to anything.  Just went to view>new html view, and used what showed up.  How to set proplerly?

Thanks.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Need help exporting to BeeDocs Timeline
Reply #7 - Jan 17th, 2011, 12:41pm
 
So, open the the HTML view, export tab (which is the default tab on opening). Now click the template button (top right). It will show a list of your new template notes and and the bottom the built-in default templates. You're looking for an item called "beedocs-page" and likely listed as a full path name and not just the note name. Click the "beedocs-page" item. Delete the old exported content and try again.

If you're exporting a page using a non-default template choice - as we are here, you must tell TB which template it should use. There are other ways to set this, but for now HTML view is the most user-friendly location/method for doing this.

You might ask, "Why don't I have to set a template for the child notes?". In this case it's not required because the ^children^ code in the 'beedocs-page' template includes the name of the template to be used.  This means you don't have to set it per child note.  It also means those notes can continue to use a different template for normal note-as-file HTML export as might be required.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #8 - Jan 17th, 2011, 3:14pm
 
OK.  I went back to view>new html view.  clicked the template drop down to select /beedocs-page from the menu.  clicked export.  got the following [column headings only.  no data in any of the columns]:


Label      Start Time      EndTime



Next?



Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Need help exporting to BeeDocs Timeline
Reply #9 - Jan 17th, 2011, 3:51pm
 
Do you have a template at path "/TEMPLATES/beedocs-item"? (as at code example further above). That is the template being looked for to export the child data.

(I'm stepping through this slowly as this way there's a chance to learn from mistakes.)
Back to top
 
« Last Edit: Jan 17th, 2011, 3:52pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #10 - Jan 17th, 2011, 4:00pm
 
yes.  both templates for beedocs are on the list in the export tab.  one is titled  /Templates/beedocs-page and the other  /Templates/beedocs-item.  the template that I have set for export is the former.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Need help exporting to BeeDocs Timeline
Reply #11 - Jan 17th, 2011, 5:03pm
 
Are they? You cite a different path to the one I mentioned - they are cases sensitive. The path is case sensitive so "/Templates/beedocs-item" is not the same as "/TEMPLATES/beedocs-item". If you're using the wrong path in beedocs-page to call beedocs-item, TB won't find he note holding the the template.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #12 - Jan 17th, 2011, 8:44pm
 
Well, Mark, I surely can't tell you where it comes from, or why it says what it says.  All I can do is report what the screen shows.  And, sorry, but it shows Templates, not TEMPLATES.  I tried to attach a screenshot below, but can't get this board's image insert to work either.

Jeez, this is fun.  What next?



Back to top
 
« Last Edit: Jan 17th, 2011, 8:46pm by iGregor »  
  IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #13 - Jan 17th, 2011, 8:55pm
 
OK.  I went back to check that I copied the text as you quoted it into each note.  Done.  And the beedocs-page note has the word TEMPLATES in caps.

I then noticed that I did not capitalize the name of the container with the two template notes (Templates).  Changed it to TEMPLATES.

Then tried to export.  Template pull down in view>new html view now reads  /TEMPLATES/beedocs-page.  But same result as before.  History.txt only shows Label   Start Time    End Time   with NO data in any column.
Back to top
 
 
  IP Logged
iGregor
Full Member
*
Offline



Posts: 36

Re: Need help exporting to BeeDocs Timeline
Reply #14 - Jan 17th, 2011, 10:50pm
 
Just tried it again.  Did not change a thing.  Closed and opened TBx.  This time I got some data in the Label/Name column, but still NO Start/End times (several lines below)

Label      Start Time      End Time
Maddox Reportedly Attacked in Tonkin Gulf            
Tonkin Gulf Resolution Passed            
China Tests A-Bomb            
Rolling Thunder            
"LBJ boosts troop levels to 60,000"


Why no Start/End times?  

Also, notice the quotes around LBJ boosts troop levels...  The actual note name has NO quotes.  Several other note labels in the exported list have quotes, while the actual note names do NOT.  What gives?

And, in the view>new html view window the column headings (Label, Start Time, End Time) are black while all of the note labels appear red.  Why?



Back to top
 
« Last Edit: Jan 17th, 2011, 11:04pm by iGregor »  
  IP Logged
Pages: 1 2 
Send Topic Print