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
Send Topic Print
exporting notes to date based sub-directories (Read 7146 times)
Dave Woodward
Full Member
*
Offline



Posts: 4

exporting notes to date based sub-directories
Sep 13th, 2008, 10:09pm
 
I'm slowly building a blog using Tinderbox, and I'd like to keep all of the notes that are published inside of folders based on the year and month once they're exported.  However I don't want to have to keep the notes inside of nested containers in the Tinderbox document itself.

It would be nice to be able to add directory names to the HTMLExportFileName attribute so that when the notes are exported, they can end up at a URL like "/archives/2008/september/name_of_note.html", but only be in a container called "archives" in the Tinderbox document itself.

Is there a way to do this without making containers inside of containers in the TB document?
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: exporting notes to date based sub-directories
Reply #1 - Sep 14th, 2008, 3:16am
 
Nope; the Tinderbox export tree is based on the Tinderbox document tree.  There's a good reason for this; if you could, as you propose, have specify the HTML Export path for each note, it would be easy for conflicts arise.  These conflicts would be very hard to diagnose, because they'd be of the form
Quote:
My unique (and very complicated) document loses my exported note! What am I doing wrong?


What you can do, though, may well be sufficiently powerful.  You can either
  • use a container of agents to recreate the export tree you have in mind, leaving your original post in place

or
  • move your notes into the monthly containers, and use an agent or set of agents to recreate your current export hierarchy


Back to top
 
 
WWW   IP Logged
Paul Walters
Ex Member




Re: exporting notes to date based sub-directories
Reply #2 - Sep 14th, 2008, 9:10am
 
Along the lines of Mark B's suggestions, see if this helps.

In my blog, I use agents to chose the published materials.  The original notes are in their own container, and the agents look inside that container ("Notes").  The agents are exported; "Notes" is not exported.

I have "current", "recent", and "archived" agents.  These could just as well be "September", "last month", "last year", or any other scheme that TB searches can support.  The output from the agent is directed to whatever folder is set as Export Folder in HTML view.  

(I don't believe Export Folder can be set in an agent or rule - so keeping folders for each month would entail a small manual task when that month's agent is created.  A script and/or runCommand, with appropriate tests, could be used to handle that housekeeping.)

Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: exporting notes to date based sub-directories
Reply #3 - Sep 14th, 2008, 12:54pm
 
Don't forget that an agent can ExportChildren; in this case, the agent exports a (copy of) the notes it finds inside its own folder.
Back to top
 
 
WWW   IP Logged
Dave Woodward
Full Member
*
Offline



Posts: 4

Re: exporting notes to date based sub-directories
Reply #4 - Sep 14th, 2008, 2:54pm
 
Yeah, right now I have an agent called "archives" that exports its children.  I think my final solution here is just going to be an agent for each year, and maybe I'll have to keep those inside of a container.

Or maybe I'll find a sneaky way to have agents inside of agents...

Thanks for your replies!
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print