Re: Save find/replace match to new file

2021-09-01 Thread Matthew Montgomery
Chris,

Thank you so much for this. Your trusty script worked perfectly and has for 
sure saved me a nice chunk of time. I really appreciate you sharing this.

—
Matthew

> On Aug 31, 2021, at 7:03 PM, Christopher Stone  
> wrote:
> 
> On Aug 31, 2021, at 14:22, Matthew Montgomery  <mailto:matt...@signed8bit.com>> wrote:
>> I’ve got a couple hundred lines in a tab delimited file that I need to 
>> transform into one new YAML file per line. I’ve got the search and 
>> replacement patterns all sorted out (thanks pattern playground!) but am 
>> getting stumped on what I need to do to process the main file.
> 
> Hey Matthew,
> 
> While this job is not difficult, it's not simple either – particularly if 
> you're not conversant with a scripting language.
> 
> You need to adjust the following variables in the script to meet your needs:
> 
> set regexFindPattern to "^(\\w.+)"
> set regexReplacePattern to "• \\1"
> 
> 
> When writing and testing AppleScript on macOS I advise folks to use Script 
> Debugger <https://latenightsw.com/> – even if they don't write much 
> AppleScript.
> 
> I've used it for 26 years plus and cannot begin to express how much it 
> changed the AppleScript experience for me.
> 
> The commercial version is not inexpensive ($99.99), BUT it reverts to its 
> FREE “Lite” version after a 30 day demo period – and the free version still 
> beats the utter pants off of Apple's Script Editor.app.
> 
> 
> You can run the script directly from Script Debugger (or the insipid Script 
> Editor.app), or you can save it as a compiled script and run it from BBEdit's 
> own Script menu.
> 
> ~/Library/Application Support/BBEdit/Scripts/
> 
> New YAML files will be written to:
> 
> ~/Downloads/New_YAML_Files/
> 
> --
> Best Regards,
> Chris
> 
> 
> 
> # Auth: Christopher Stone  <mailto:scriptmeis...@thestoneforge.com>>
> # dCre: 2021/08/31 18:49
> # dMod: 2021/08/31 18:49 
> # Appl: BBEdit
> # Task: Explode TSV Document into One YAML File Per Line.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @ASObjC, @BBEdit, @Explode, @TSV, @Document, 
> @YAML
> 
> use AppleScript version "2.4" --» Yosemite or later
> use framework "Foundation"
> use scripting additions
> 
> --» USER SETTINGS
> 
> set regexFindPattern to "^(\\w.+)"
> set regexReplacePattern to "• \\1"
> set new_YAML_Files_Destination to "~/Downloads/New_YAML_Files"
> 
> 
> set fileNameCounter to 0
> set new_YAML_Files_Destination to ((current application's NSString's 
> stringWithString:new_YAML_Files_Destination)'s stringByExpandingTildeInPath) 
> as text
> its createDirectoryAtPathWithIntermediates:new_YAML_Files_Destination
> set itemFound to true
> 
> tell application "BBEdit"
> 
> set frontDoc to a reference to the front text document
> select insertion point before character 1 of frontDoc
> 
> repeat while itemFound
> 
> set findRecord to find regexFindPattern searching in frontDoc options 
> {search mode:grep, case sensitive:false, wrap around:false}
> 
> if found of findRecord ≠ true then
> 
> return
> 
> else
> 
> select found object of findRecord
> set newText to replace regexFindPattern using regexReplacePattern 
> searchingString (get found text of findRecord) options {search mode:grep, 
> case sensitive:false, starting at top:true}
> set fileNameCounter to fileNameCounter + 1
> set newFileName to "File_Name " & fileNameCounter & ".yaml"
> set targetFilePath to new_YAML_Files_Destination & "/" & 
> newFileName
> write_UTF8(newText, targetFilePath) of me
> 
> end if
> 
> end repeat
> 
> end tell
> 
> 
> --» HANDLERS
> 
> on createDirectoryAtPathWithIntermediates:thePath
> set {theResult, theError} to current application's NSFileManager's 
> defaultManager()'s createDirectoryAtPath:thePath ¬
> withIntermediateDirectories:true attributes:(missing value)

Save find/replace match to new file

2021-08-31 Thread Matthew Montgomery
Hi all,

I’ve got a couple hundred lines in a tab delimited file that I need to 
transform into one new YAML file per line. I’ve got the search and replacement 
patterns all sorted out (thanks pattern playground!) but am getting stumped on 
what I need to do to process the main file. I took a look at a text factory, 
specifically using replace all, but that didn’t seem to have the ability to do 
what I want with regard to new files. 

I basically want to process the main file and save the result of each 
find/replace match in a new file.

I can think of a number of multi-step ways to do this, but I was hoping there 
was something I could do that would accomplish this in a single step. It’s very 
possible I am missing something obvious.

Thanks!

--
Matthew

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/EAF0A832-0586-44DE-AA62-D2B2B4A92FA2%40signed8bit.com.


Re: BBEdit as EDITOR

2017-11-27 Thread Matthew Montgomery
Thanks Sam!

That did it. Switching to export EDITOR="bbedit --wait --resume $@" has it 
working as I'd want.

Cheers,

--
Matthew

> On Nov 27, 2017, at 11:49 AM, Sam Hathaway  wrote:
> 
> Not sure if this’ll be helpful for you, but I have a slightly different 
> EDITOR setup and can’t replicate your issue. I have EDITOR set to 
> /Users/sam/install/bin/bbedit-wait, and bbedit-wait contains:
> 
> #!/bin/sh
> 
> 
> 
> exec /usr/local/bin/bbedit --wait --resume "$@"
> I did this because some programs have issues with EDITOR values that contain 
> shell metacharacters, but maybe it’d solve your problem too?
> 
> Hope this helps.
> -sam
> 
> On 27 Nov 2017, at 12:12, Matthew Montgomery wrote:
> 
> Hi all,
> 
> I have BBEdit setup as my terminal editor via... export EDITOR="bbedit --wait 
> --resume"
> 
> While using git from the command line, this all works very well for editing 
> the COMMIT_EDITMSG file when BBEdit is already running. If I issue a "git 
> commit" when BBEdit is not running, it is launched as expected but it seems 
> that the bbedit command line tool exits after loading the specified file not 
> upon closing the file.
> 
> Is there some other way to make this work when launching BBEdit? Perhaps 
> chain a separate command that only uses the launch option?
> 
> Thanks!
> 
> --
> Matthew
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
> Visit this group at https://groups.google.com/group/bbedit.
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: BBEdit as EDITOR

2017-11-27 Thread Matthew Montgomery
Oh I take that back. My testing methodology was flawed. :-)

I am still seeing the command line tool exit without waiting when BBEdit hasn't 
already been launched. I will keep trying things and post again if I find a 
working solution.

Thanks.

--
Matthew

> On Nov 27, 2017, at 12:59 PM, Matthew Montgomery  
> wrote:
> 
> Thanks Sam!
> 
> That did it. Switching to export EDITOR="bbedit --wait --resume $@" has it 
> working as I'd want.
> 
> Cheers,
> 
> --
> Matthew
> 
>> On Nov 27, 2017, at 11:49 AM, Sam Hathaway  wrote:
>> 
>> Not sure if this’ll be helpful for you, but I have a slightly different 
>> EDITOR setup and can’t replicate your issue. I have EDITOR set to 
>> /Users/sam/install/bin/bbedit-wait, and bbedit-wait contains:
>> 
>> #!/bin/sh
>> 
>> 
>> 
>> exec /usr/local/bin/bbedit --wait --resume "$@"
>> I did this because some programs have issues with EDITOR values that contain 
>> shell metacharacters, but maybe it’d solve your problem too?
>> 
>> Hope this helps.
>> -sam
>> 
>> On 27 Nov 2017, at 12:12, Matthew Montgomery wrote:
>> 
>> Hi all,
>> 
>> I have BBEdit setup as my terminal editor via... export EDITOR="bbedit 
>> --wait --resume"
>> 
>> While using git from the command line, this all works very well for editing 
>> the COMMIT_EDITMSG file when BBEdit is already running. If I issue a "git 
>> commit" when BBEdit is not running, it is launched as expected but it seems 
>> that the bbedit command line tool exits after loading the specified file not 
>> upon closing the file.
>> 
>> Is there some other way to make this work when launching BBEdit? Perhaps 
>> chain a separate command that only uses the launch option?
>> 
>> Thanks!
>> 
>> --
>> Matthew
>> 
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a
>> feature request or would like to report a problem, please email
>> "supp...@barebones.com" rather than posting to the group.
>> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to bbedit+unsubscr...@googlegroups.com.
>> To post to this group, send email to bbedit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/bbedit.
>> 
>> 
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a 
>> feature request or would like to report a problem, please email
>> "supp...@barebones.com" rather than posting to the group.
>> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to bbedit+unsubscr...@googlegroups.com.
>> To post to this group, send email to bbedit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/bbedit.
> 

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


BBEdit as EDITOR

2017-11-27 Thread Matthew Montgomery
Hi all,

I have BBEdit setup as my terminal editor via... export EDITOR="bbedit --wait 
--resume"

While using git from the command line, this all works very well for editing the 
COMMIT_EDITMSG file when BBEdit is already running. If I issue a "git commit" 
when BBEdit is not running, it is launched as expected but it seems that the 
bbedit command line tool exits after loading the specified file not upon 
closing the file.

Is there some other way to make this work when launching BBEdit? Perhaps chain 
a separate command that only uses the launch option?

Thanks!

--
Matthew  

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: BBEDIT 11.6.1 navigation bar

2016-08-29 Thread Matthew Montgomery
If you work in full screen mode, I can see how that might get tedious. You'd 
have to move very far depending on your screen resolution and more than likely 
will trigger the menu bar drop-down three times before focusing your rage and 
clicking on the BBEdit toolbar. ;-)

Note, I do not work in fullscreen mode so am terrible at using applications in 
this manner. 

--
Matthew

> On Aug 29, 2016, at 11:33 AM, Lee Hinde  wrote:
> 
> On Mon, Aug 29, 2016 at 8:25 AM, JacquesBBB  > wrote:
> Hi All, 
> 
> I am a little bit disoriented with the new behavior  of the navigation bar in 
> bbedit 11.6.1
> 
> I do not like to have to go to the far right to get the routines/function 
> list. 
> 
> I do not find where to copy the file name as it was possible before. 
> 
> 
> In 11.6 you use the widget on the far right of the document window. It looks 
> like a document icon. 
>  
> Do I miss something ? 
> 
> Thanks 
> 
> 
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter:  >
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Anyone have a copy of Version 9?

2013-07-12 Thread Matthew Montgomery
Bare Bones still has a few copies around gathering dust...

http://www.barebones.com/support/bbedit/updates.html#up9

On Jul 12, 2013, at 4:23 PM, milkhouse.i...@gmail.com wrote:

> There are two "used-every-single-day" features missing from V10.X.
> 
> 1. Document drawer on the left
> 2. CSS braces format option
> 
> Is it available on the site somewhere? I switched jobs/machines and don't 
> have a copy. Foolish me.
> 
> Thanks!
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
>  
>  

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.




Extending Other Languages in CLM

2013-04-16 Thread Matthew Montgomery
Is it possible to extend say HTML/JavaScript syntax coloring with something 
like Velocity in a Codeless Language Module?

I did find this 
(http://scottboms.com/2004/09/velocity-language-module-for-bbedit-8/) but the 
past is rearing up here as a .sit archive! 

--
Matthew

-- 
-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: BBEdit RegEx Cheat-Sheet

2013-04-16 Thread Matthew Montgomery
Thanks Chris!

On Apr 14, 2013, at 9:48 PM, Christopher Stone  
wrote:

> On Apr 09, 2013, at 23:16, Christopher Stone  
> wrote:
 It might be cool to maintain this as a public GitHub Gist.
>> 
>> I haven't fooled with Gist or the wiki, but I guess I need to learn yet 
>> another new thing...
> __
> 
> Hey Folks,
> 
> Okay.  I put the cheat-sheet up on Gist:
> 
> https://gist.github.com/ccstone/5385334
> 
> --
> Best Regards,
> 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 bbedit@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+unsubscr...@googlegroups.com
> For more options, visit this group at
> 
> If you have a feature request or would like to report a problem, 
> please email "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: BBEdit RegEx Cheat-Sheet

2013-04-09 Thread Matthew Montgomery
It might be cool to maintain this as a public GitHub Gist.

https://gist.github.com

On Apr 9, 2013, at 4:59 PM, Christopher Stone  
wrote:

> On Apr 09, 2013, at 16:14, Rick Gordon  wrote:
>> The Dropbox link seems to have stopped functioning. Do you still have it 
>> online? I had recommended the link to a Regex group on Facebook. (Is that 
>> OK?)
> __
> 
> Hey Rick,
> 
> Sure.  Sorry about that.  I reorganized my stuff in DropBox.  This link 
> should work:
> 
> https://dl.dropbox.com/u/32860906/Developers/Bare_Bones/%20RegEx%20Cheat-Sheet.txt
> 
> --
> Best Regards,
> 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 bbedit@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+unsubscr...@googlegroups.com
> For more options, visit this group at
> 
> If you have a feature request or would like to report a problem, 
> please email "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: No authenticated open/save in the App Store version

2011-08-17 Thread Matthew Montgomery
Please see the last FAQ as presented here.

http://www.barebones.com/store/macappstore.html

On Aug 17, 2011, at 4:00 PM, crag wrote:

> Nice of you, Bare Bones, NOT TO MENTION THAT in the App Store.
> 
> Of course I figured it would be easier for future upgrading (by the
> way, I'm paying the same price of a new user? Thank you for rewarding
> my loyalty), so I brought my upgrade off the App Store.
> 
> I'm sort of upset about this, cause now I have a useless text editor.
> 
> Along with the wall of text describing all the features of this
> version [on the App Store]  try listing the limitations as well? So
> customer (like me) don't get burned.
> 
> -- 
> 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 bbedit@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+unsubscr...@googlegroups.com
> For more options, visit this group at
> 
> If you have a feature request or would like to report a problem, 
> please email "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 

-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: