Re: Changing the contents of the new HTML file template?

2018-09-09 Thread Rich Siegel

On 9/9/18 at 4:59 PM, krem...@kreme.com (@lbutlr) wrote:


but you can add your own templates to the "HTML Templates" support
folder, and they will appear in

the "New HTML Document" dialog box.


When you're back in front of your Mac, the user manual will describe
how.


That’s unfortunate, I hit ⌘-N to create a new HTML document and
retraining to do something else… well, I might as well keep doing that
I am doing now, keeping a scratch document with my skeleton in it and
pasting it in.


Since the "New HTML Document" dialog remembers your template 
selection, how would it be any different from what you're doing now?


R.
--
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they 
sedate me.


--
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 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: Changing the contents of the new HTML file template?

2018-09-09 Thread @lbutlr
On 09 Sep 2018, at 15:18, Christopher Stone  wrote:
> “A template is a simple text file that contains boilerplate text or HTML 
> content that will form the foundation for the document you are creating. 
> Template files must have the file name suffix “.tmpl” in order to be 
> recognized.”

Which does not mention stationery at all and is not accurate for stationery 
files either.

My stationary file is named “HTML Skel” with no extension. It is in the 
Stationery folder and is marked in the info panel as “Stationery Pad”.

The stationery is superior for my purposes to the HTML template since it is in 
the menus and therefore can have a command key assigned to it. The template is 
in a drop down menu on the New HTML Document window and x==can’t be, AFAICS, 
directly hot-keyed.

Still, no harm having the skeleton files in both places.

As it stands now, ⌘-N immediately opens a new HTML document with my scripts and 
meta tags in place and no intervening windows, which is even better than I’d 
hoped.


-- 
There are many reasons for being friends with someone. The fact that
he's pointing a deadly weapon at you is among the top four. --The Last
Continent






-- 
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 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: Changing the contents of the new HTML file template?

2018-09-09 Thread Christopher Stone
On 09/09/2018, at 15:59, @lbutlr mailto:krem...@kreme.com>> 
wrote:
> The manual seems short not he directions on how to creat a stationery item, 
> btw. I saved a BBEdit file in the folder, doesn’t show up. I used the Finder 
> to mark the file as a stationary pad, doesn’t show up. I removed the .html 
> file extension, doesn’t show up.


Hey Lewis,

User manual: Templates p. 273

“A template is a simple text file that contains boilerplate text or HTML 
content that will form the foundation for the document you are creating. 
Template files must have the file name suffix “.tmpl” in order to be 
recognized.”

--
Best Regards,
Chris

-- 
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 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: Changing the contents of the new HTML file template?

2018-09-09 Thread @lbutlr
On 09 Sep 2018, at 14:59, @lbutlr  wrote:
> That’s unfortunate, I hit ⌘-N to create a new HTML document and retraining to 
> do something else… well, I might as well keep doing that I am doing now, 
> keeping a scratch document with my skeleton in it and pasting it in.

Brain Cloud. I can reassign the key to the stationary file.

> The manual seems short not he directions on how to creat a stationery item, 
> btw. I saved a BBEdit file in the folder, doesn’t show up. I used the Finder 
> to mark the file as a stationary pad, doesn’t show up. I removed the .html 
> file extension, doesn’t show up.

Oddly, this required quitting BBEdit for it to refresh. Sorry for the noise.

-- 
"Is that a star?" "Nah, that's Ted Danson.”

-- 
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 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: Changing the contents of the new HTML file template?

2018-09-09 Thread @lbutlr
On 09 Sep 2018, at 12:31, Rich Siegel  wrote:
> On 9/9/18 at 1:47 PM, kr...@kreme.com (Cerebus) wrote:
> 
>> Can I change the contents of the HTML template that is used for the
>> new HTML file file menu? Or do I have to do something like attach a
>> script to the menu command?
> 
> Neither. :-) The default "template" is a hardwired behavior,

Oh dear. I know that was the case 15 years ago, but didn’t imagine it was still 
the case.

> but you can add your own templates to the "HTML Templates" support folder, 
> and they will appear in the "New HTML Document" dialog box.
> 
> When you're back in front of your Mac, the user manual will describe how.

That’s unfortunate, I hit ⌘-N to create a new HTML document and retraining to 
do something else… well, I might as well keep doing that I am doing now, 
keeping a scratch document with my skeleton in it and pasting it in.

The manual seems short not he directions on how to creat a stationery item, 
btw. I saved a BBEdit file in the folder, doesn’t show up. I used the Finder to 
mark the file as a stationary pad, doesn’t show up. I removed the .html file 
extension, doesn’t show up.

-- 
The wages of sin is death, but so is the salary of virtue, and at least
the evil get to go home early on Fridays. --Witches Abroad


-- 
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 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: Is there any way to ask BBEdit to use double-click to select "words" with embedded periods?

2018-09-09 Thread F. Alfredo Rego
Hey Chris,

Wonderful on all counts.

¡Mil gracias!

Alfredo

> On Sep 9, 2018, at 12:57 PM, Christopher Stone  
> wrote:
> 
> On 09/08/2018, at 12:34, F. Alfredo Rego  > wrote:
>> I’ll study John Gruber’s notes and I’ll implement variatio(n) on his 
>> theme(s).
> 
> 
> Hey Alfredo,
> 
> You can also use BBEdit find function via AppleScript to get very 
> sophisticated.
> 
> 
> 
> tell application "BBEdit"
> tell front text window's text
> set findRec to find "public\\S+" options ¬
> {search mode:grep ¬
> , starting at top:false ¬
> , case sensitive:false ¬
> , backwards:false ¬
> , returning results:true ¬
> } ¬
> with selecting match
> end tell
> end tell
> 
> 
> 
> I've used AppleScript's continuation character (¬) to make the option list 
> vertical for easier reading, although because of the way the silly 
> AppleScript compiler works it's not exactly pretty.
> 
> You can find forward and backward from the current cursor location and then 
> make a selection based on your findings.
> 
> Gruber's script is elegantly simple for what it does, but you can go way 
> beyond that if desired.
> 
> --
> Best Regards,
> Chris
> 
> 
> -- 
> 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 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 need technical support, 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: Batch search-and-replace

2018-09-09 Thread Christopher Stone
On 09/09/2018, at 01:02, Andrew Brown mailto:li...@c18.org>> 
wrote:
> My BBEdit scripts went down with some earlier computer and I am looking for a 
> search-and-replace for grep and non-grep on multiple folders or files.


Hey Andrew,

That covers a lot of ground.

Disparate files and folders?

Files and folders in the same tree?

Here's one example:


# Auth: Christopher Stone
# dCre: 2014/10/29 07:10
# dMod: 2018/09/09 14:04
# Appl: BBEdit
# Task: Find and Replace in Files On-Disk.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Find, @Replace, @Files, @Disk

use AppleScript version "2.4"
use framework "Foundation"
use scripting additions


# The Search Folder reference can be either an alias or a posix path or a posix 
file.

set searchFolderPath to "~/test_directory/Find_and_Replace_It_Test/"

if searchFolderPath starts with "~" then
set searchFolderPath to ((current application's NSString's 
stringWithString:searchFolderPath)'s stringByExpandingTildeInPath) as text
end if



set findStr to "good men"
set replStr to "I want my MTV!"


tell application "BBEdit"
replace findStr using replStr searching in searchFolderPath ¬
options {search mode:grep, case sensitive:false, showing results:false} 
¬
saving true ¬
recursion true ¬
with text files only
end tell


> I also need to convert HTML to text in batch mode, with the options that 
> BBEdit offers for single file conversions.

If you want to do this in batch mode then a Text Factory is probably the way to 
go.

--
Best Regards,
Chris

-- 
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 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: Is there any way to ask BBEdit to use double-click to select "words" with embedded periods?

2018-09-09 Thread Christopher Stone
On 09/08/2018, at 12:34, F. Alfredo Rego mailto:f.alfredor...@gmail.com>> wrote:
> I’ll study John Gruber’s notes and I’ll implement variatio(n) on his theme(s).


Hey Alfredo,

You can also use BBEdit find function via AppleScript to get very sophisticated.



tell application "BBEdit"
tell front text window's text
set findRec to find "public\\S+" options ¬
{search mode:grep ¬
, starting at top:false ¬
, case sensitive:false ¬
, backwards:false ¬
, returning results:true ¬
} ¬
with selecting match
end tell
end tell



I've used AppleScript's continuation character (¬) to make the option list 
vertical for easier reading, although because of the way the silly AppleScript 
compiler works it's not exactly pretty.

You can find forward and backward from the current cursor location and then 
make a selection based on your findings.

Gruber's script is elegantly simple for what it does, but you can go way beyond 
that if desired.

--
Best Regards,
Chris

-- 
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 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: Changing the contents of the new HTML file template?

2018-09-09 Thread Rich Siegel

On 9/9/18 at 1:47 PM, kr...@kreme.com (Cerebus) wrote:


Can I change the contents of the HTML template that is used for the
new HTML file file menu? Or do I have to do something like attach a
script to the menu command?


Neither. :-) The default "template" is a hardwired behavior, but 
you can add your own templates to the "HTML Templates" support 
folder, and they will appear in the "New HTML Document" dialog box.


When you're back in front of your Mac, the user manual will 
describe how.


R.
--
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they 
sedate me.


--
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 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: Batch search-and-replace

2018-09-09 Thread Rich Siegel
On 9/8/18 at 2:02 AM, li...@c18.org (Andrew Brown) wrote:

> My BBEdit scripts went down with some earlier computer and I am looking for 
> a search-and-replace for grep and non-grep on multiple folders or files.
> 
> I also need to convert HTML to text in batch mode, with the options that 
> BBEdit offers for single file conversions.

File => New => Text Factory should get you started.

R.
-- 
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they sedate me.

-- 
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 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.


Batch search-and-replace

2018-09-09 Thread Andrew Brown
My BBEdit scripts went down with some earlier computer and I am looking for 
a search-and-replace for grep and non-grep on multiple folders or files.

I also need to convert HTML to text in batch mode, with the options that 
BBEdit offers for single file conversions.

Any help much appreciated.

AB

-- 
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 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.


Changing the contents of the new HTML file template?

2018-09-09 Thread Cerebus
I suspect this is in the manual, but I'm away from my Mac.

Can I change the contents of the HTML template that is used for the new HTML 
file file menu? Or do I have to do something like attach a script to the menu 
command?

-- 
ADVANCE TO THE REAR!

-- 
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 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.