This adapted from a couple of related posts here in bbedit. I have a
few projects of long standing with bits and pieces scattered all over
my disk, and I wanted to put all the pieces into a bbedit project for
obvious reasons. But, I didn't want to track down each piece using the
gui browser interface. So, I wrote this script (I use ksh, but would
probably work with bash):

#!/bin/ksh
# add files (read from standard input)  to the current bbedit project
# bbedit must be open with the target project the first (or better,
the only)
# open project

while read fil ; do

osascript <<FIN
set f to POSIX file "$fil"
tell application "BBEdit"
        tell project document 1
                make new project item with properties {file:f}
        end tell
end tell
FIN

done

It is possible to feed this script with find(1), for example:

find ~ -name '*whatever*" -type d | path/to/this/script

Of course, you have to have bbedit open with the target project before
you run the script.

Perhaps this will be useful to someone (it will probably seem really
trivial to many).

Greg Shenaut

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.

Reply via email to