Hey Guys,
On Oct 30, 2009, at 10:12, Semper Fidelis wrote:
> Why not use a simple grep to do it for you? This works for me:
I did mention that possibility, and this can be easily scripted as well.
On Oct 30, 2009, at 01:44, Christopher Stone wrote:
>> And you can loop through or do a find/replace of course. All this
>> discovered, and I still feel like I'm missing something. Any more
>> useful magic?
tell application "BBEdit"
tell front text document
replace "^" using "url = " searching in it ¬
options {search mode:grep, showing results:false} with
saving
end tell
end tell
On Oct 30, 2009, at 10:22, Jan Pieter Kunst wrote:
> Or why not use the Text -> Prefix/Suffix Lines menu item?
I actually did this via script, and that's the point of the exercise.
tell application "BBEdit"
tell front text document
add prefix (lines 1 thru -1) prefix "url = "
end tell
end tell
I'm starting to re-learn how to script BBEdit, and this step is a
small part of a more complex filter I'm building. That filter is
bound to a keyboard shortcut and preprocesses an html file for use
with curl. Eventually I'll probably move to a Perl filter, but my
Perl skills are quite rudimentary at the moment.
On the Perl topic does anyone have recommendations for online
resources and books for a rank beginner?
Thanks.
--
Chris
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---