Hello ladies and gents,

I am in the process of making a duplicate copy of one of my websites so that it 
is Google AMP-compliant.

As some of you will already know, one of the more tedious and time-consuming 
aspects of this procedure, is that I have to create a link in every canonical 
HTML file which points to its AMP version, and I have to create a link in the 
AMP version of every HTML file which points to its canonical partner as well.

BBEdit has made so much of my work easier, and saved me so much time already, 
due to its find and replace and grep power. It is totally awesome, which is one 
reason why it has long been my text editor of choice.

But regarding those links, I could sit here for days, at least, typing in those 
file names one at a time, an HTML document at a time.

No thanks!

Today, I discovered, and learned the basic use of, clippings. Oh what wonders! 
I love it! Thanks Rich!

So I am thinking that there must be some way to perhaps use clippings in 
conjunction with text filters -- or maybe with an AppleScript? -- so that I can 
batch process everything.

What I have done thus far is this:

I have created six clippings, each one of which corresponds to all of the files 
in a particular directory in the website I am working on. All of the files 
within each folder can be used with that one clipping, being as they all have 
the same file path in the meta tag, plus the "#BASENAME#" parameter in them.

So, I am assuming that if I can automate this process, and use one clipping on 
each of those six folders full of HTML documents, I can replace the placeholder 
in those 6,000+ files with their corresponding file name in less than an hour, 
and not take days to do it manually.

But, here is where I need someone's help. I am usually very quiet on the list, 
because I am far from being a programming and scripting wiz like some of you 
here . . . and who wants to look like a fool in the presence of such "great 
ones"?  :)  So, I just observe and pick up useful tips now and then.

At any rate, if one of you fine gentlemen -- or ladies -- can clearly show me 
how to implement this batch process, I would be most appreciative. I don't mind 
having to run six different scripts, one for each clipping. It will go fast 
anyway.

Thank you very much in advance.

Kind regards,

Bill Kochman

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

Reply via email to