On Apr 10, 2007, at 2:33 PM, Christian Smith wrote:

Yes, but the tool you are using is essentially part of the HTML Tools
suite. Have you tried defining a default template folder as described in
the manual on page 191?

--
Christian Smith

Christian,

Even though #bbinclude is considered an HTML markup feature, an EDITOR of this caliber, should be able to handle includes for far more than just HTML.

Being at the TOP OF THE EDITOR HEAP, BBEdit should be able to bring in data from several places, or projects on any of the drives where those reports, data, etc. reside, not just from a templates folder. It would be simple enough to parse for an absolute path, and if one is used then grab the file from there, not just give up...

FROM PAGE 345 OF THE USER MANUAL

Although this command is part of the HTML Tools, it can be used in any document whenever you want to use placeholders.

All of the above methods of invoking placeholders can also invoke included files, which can have placeholders of their own
------------------------
Using full paths, the same way that scripts are called in BBEdit does not work for bbinclude...

#bbinclude "HardDisk:Users:dabney:Library:Application Support:BBEdit:Clippings:Title" #bbinclude "HardDisk:Users:dabney:Library:Application Support:BBEdit:Clippings:Notes" #bbinclude "HardDisk:Users:dabney:Library:Application Support:BBEdit:Clippings:FLORIDA:FrameWork" #bbinclude "HardDisk:Users:dabney:Library:Application Support:BBEdit:Clippings:FLORIDA:Functions" #bbinclude "HardDisk:Users:dabney:Library:Application Support:BBEdit:Clippings:FLORIDA:ORANGES:Misc

------------------------
THEREFORE, in order to get around this problem :

( 1 ) I had to create a central repository whose path is "~/ bb_repository/" ( 2 ) In the BBEdit preferences I selected the default web site, and set "~/bb_repository/" as the default templates directory

( 3 ) I created an
alias "Applescript" --> "~/Library/Application Support/ BBEdit/Clippings/Applescript/"
        which I renamed to "AS_Clips"

        I put the alias in "~/bb_repository/"

        So I now have :
"~/bb_repository/AS_Clips/" --> "~/Library/Application Support/BBEdit/Clippings/Applescript/"


( 4 ) Inside the "~/Library/Application Support/BBEdit/Clippings/ Applescript/" dir ( a ) I created a "FLORIDA" dir and an "ORANGES" dir inside that.

        ( b ) So that basically this hierarchy now exists.
~/Library/Application Support/BBEdit/Clippings/Applescript/ FLORIDA/ORANGES/


FOR TEST PURPOSES I PUT THE FILES IN THREE DIFFERENT DIRECTORIES

~/Library/Application Support/BBEdit/Clippings/Applescript/Title
~/Library/Application Support/BBEdit/Clippings/Applescript/Notes
~/Library/Application Support/BBEdit/Clippings/Applescript/FLORIDA/ FrameWork ~/Library/Application Support/BBEdit/Clippings/Applescript/FLORIDA/ Functions ~/Library/Application Support/BBEdit/Clippings/Applescript/FLORIDA/ ORANGES/Misc


So Now these work...

#bbinclude "AS_Clips:Title"
#bbinclude "AS_Clips:Notes"
#bbinclude "AS_Clips:FLORIDA:FrameWork"
#bbinclude "AS_Clips:FLORIDA:Functions"
#bbinclude "AS_Clips:FLORIDA:ORANGES:Misc

By using this technique of branching off with aliases from the default templates directory, you can make this work fine, but it is not as intuitive as just using a path, and creating an alias for every path that you want to include from is a nuisance. Using a full path is a way to simplify this process...

------------------------
Let's say you had another dir with brochures:

/Library/Web/Sites/boats/offshore.com/brochures/sales/slow_boats.txt
/Library/Web/Sites/boats/offshore.com/brochures/sales/fast_boats.txt

/Library/Web/Sites/boats/offshore.com/brochures/specifications/ slow_boat.txt /Library/Web/Sites/boats/offshore.com/brochures/specifications/ fast_boat.txt

If you also wanted to include brochures from the above dir, you could create an alias to it, perhaps rename it "boat_brochures" if you wanted to, and drop it in the default directory "~/bb_repository/", so you would have "~/bb_repository/boat_brochures/"

where "boat_brochures" is an alias to /Library/Web/Sites/boats/ offshore.com/brochures/

Now the items DOWNSTREAM of /Library/Web/Sites/boats/offshore.com/ brochures/ are ACCESSIBLE and can be referenced as follows.

#bbinclude "boat_brochures:sales:slow_boats.txt
#bbinclude "boat_brochures:sales:fast_boats.txt

#bbinclude "boat_brochures:specifications:slow_boats.txt
#bbinclude "boat_brochures:specifications:fast_boats.txt

At this point the repository contains the following :

"~/bb_repository/AS_Clips/" --> ~/Library/Application Support/BBEdit/ Clippings/Applescript/ "~/bb_repository/boat_brochures/" --> /Library/Web/Sites/boats/ offshore.com/brochures/

A real round about way of accessing data from multiple locations on the drive. Using just a plain path would make includes much more useful, and would avoid having to create aliases to every new location where you want to include data from, such as reports, etc...

Even though #bbinclude is considered an HTML markup feature, an EDITOR of this caliber, should be able to handle includes for far more than just HTML. It should be able to bring in data from several places, or projects on any of the drives where those reports, data, etc. reside, not just from a templates folder. It would be simple enough to parse for an absolute path, and if one is used then grab the file there, not just give up...

Best Regards,

Bill Hernandez
Plano, Texas


--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to