Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The herd instinct among economists makes sheep look like independent thinkers.


computers / comp.sys.mac.system / Re: TextWarangler macros?

SubjectAuthor
* TextWarangler macros?JF Mezei
`* Re: TextWarangler macros?Lewis
 `* Re: TextWarangler macros?Percival John Hackworth
  `* Re: TextWarangler macros?Lewis
   `* Re: TextWarangler macros?JF Mezei
    `* Re: TextWarangler macros?Lewis
     `- Re: TextWarangler macros?JF Mezei

1
TextWarangler macros?

<KyKOI.688$qf5.360@fx07.iad>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12621&group=comp.sys.mac.system#12621

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail
Newsgroups: comp.sys.mac.system
X-Mozilla-News-Host: news://pbdl.astraweb.com:119
From: jfmezei....@vaxination.ca (JF Mezei)
Subject: TextWarangler macros?
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0)
Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 66
Message-ID: <KyKOI.688$qf5.360@fx07.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 05 Aug 2021 05:20:42 UTC
Date: Thu, 5 Aug 2021 01:20:42 -0400
X-Received-Bytes: 2498
 by: JF Mezei - Thu, 5 Aug 2021 05:20 UTC

I need to change a bunch of these:

<!-- M02 Vancortlandt 2 -->
<gx:FlyTo>
<gx:duration>25.0</gx:duration>
<gx:flyToMode>smooth</gx:flyToMode>
<Camera>
<longitude>-73.895308</longitude>
<latitude>40.893030</latitude>
<altitude>78</altitude>
<heading>199.1</heading>
<tilt> 65</tilt>
<roll>0</roll>
<altitudeMode>absolute</altitudeMode>
</Camera>
</gx:FlyTo>

into:

<!-- M02 Vancortlandt 2 -->
<gx:FlyTo>
<gx:duration>25.0</gx:duration>
<gx:flyToMode>smooth</gx:flyToMode>
<Camera>
<neme>M02 Vancortlandt 2</name>
<longitude>-73.895308</longitude>
<latitude>40.893030</latitude>
<altitude>78</altitude>
<heading>199.1</heading>
<tilt> 65</tilt>
<roll>0</roll>
<altitudeMode>absolute</altitudeMode>
</Camera>
</gx:FlyTo>

In other words, copy the contents of the comment and then insert a new
line under <Camera> with a <name>xxxxxxxx</name>

What would be the best way to do this? Does the purchased copy of bbedit
have such function?

(In VMS, I could record set of keystrokes and then play them for instance
FIND <!-- , SELECT, FIND -->, COPY, FIND <Camera>,
RETURN, TAB TAB, type <name> PASTE, type </name>

and then assign this to a key and just press key repeatedly. ( there is
also a repeat command).

Just wondering if such functionality exists in TextWrangler of if I
upgrade to BBedit.

(the <name> is not technically part of Camera, but this allows me to
easily use PHP simpleXML to convert this to a set of placemarks and then
back to a Camera tour with the reciprocal script when I already wrote).
(There is a lot of trial and error because Google Earth insists in some
quirks such as turning camera towards the left before you begin a large
right turn).

Re: TextWarangler macros?

<slrnsgn1l9.1g8j.g.kreme@darth.local>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12622&group=comp.sys.mac.system#12622

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!kreme.dont-email.me!.POSTED!not-for-mail
From: g.kr...@kreme.dont-email.me (Lewis)
Newsgroups: comp.sys.mac.system
Subject: Re: TextWarangler macros?
Date: Thu, 5 Aug 2021 06:35:21 -0000 (UTC)
Organization: Miskatonic U
Lines: 27
Message-ID: <slrnsgn1l9.1g8j.g.kreme@darth.local>
References: <KyKOI.688$qf5.360@fx07.iad>
Reply-To: g.kreme@gmail.don-t-email-me.com
Injection-Date: Thu, 5 Aug 2021 06:35:21 -0000 (UTC)
Injection-Info: kreme.dont-email.me; posting-host="a19c1d8a07bbb5aebafa46fc9ac992ce";
logging-data="26124"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tURqkAOBIG4fDwH6W4zaL"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:pkuE6vGwkMZSmuyn8EFW2MXDEXI=
X-Face: )^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z
X-Clacks-Overhead: GNU Terry Pratchett
Mail-Copies-To: nobody
 by: Lewis - Thu, 5 Aug 2021 06:35 UTC

In message <KyKOI.688$qf5.360@fx07.iad> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
> Subject: TextWarangler macros?

TextWrangler was EOLed five years ago. You should use the free
version of BBEdit.

> What would be the best way to do this? Does the purchased copy of bbedit
> have such function?

You do not need to pay for BBEdit to use its regex function.

> and then assign this to a key and just press key repeatedly. ( there is
> also a repeat command).

Once you write the rege you can simply say "replace all" and that will
replace all instances in the file. Or in multiple files.

> Just wondering if such functionality exists in TextWrangler of if I
> upgrade to BBedit.

I do not remember what TextWrangler supported, but I suspect it did
support regex. BBEdit is better, however, and has a fully supported free
version.

--
"Are you pondering what I'm pondering?"
"Well, I think so, Brain, but snort no, no, it's too stupid!"

Re: TextWarangler macros?

<in62hnF7jpuU1@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12625&group=comp.sys.mac.system#12625

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: pjh...@nanoworks.com (Percival John Hackworth)
Newsgroups: comp.sys.mac.system
Subject: Re: TextWarangler macros?
Date: 7 Aug 2021 00:30:47 GMT
Lines: 37
Message-ID: <in62hnF7jpuU1@mid.individual.net>
References: <KyKOI.688$qf5.360@fx07.iad> <slrnsgn1l9.1g8j.g.kreme@darth.local>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net sNrv/+JP39DPnUXSU8Fz1QI69u9Y6kVz4gGu1uqKGeSEWddc2w
Cancel-Lock: sha1:Ezh6QBrhXwchyKY0uk0gSezDEvA=
User-Agent: Usenapp/1.11.1/l for MacOS - Full License
 by: Percival John Hackwo - Sat, 7 Aug 2021 00:30 UTC

On 04-Aug-2021 at 11:35:21PM PDT, "Lewis" <g.kreme@kreme.dont-email.me> wrote:

> In message <KyKOI.688$qf5.360@fx07.iad> JF Mezei
> <jfmezei.spamnot@vaxination.ca> wrote:
>> Subject: TextWarangler macros?
>
> TextWrangler was EOLed five years ago. You should use the free
> version of BBEdit.
>
>> What would be the best way to do this? Does the purchased copy of bbedit
>> have such function?
>
> You do not need to pay for BBEdit to use its regex function.
>
>> and then assign this to a key and just press key repeatedly. ( there is
>> also a repeat command).
>
> Once you write the rege you can simply say "replace all" and that will
> replace all instances in the file. Or in multiple files.
>
>> Just wondering if such functionality exists in TextWrangler of if I
>> upgrade to BBedit.
>
> I do not remember what TextWrangler supported, but I suspect it did
> support regex. BBEdit is better, however, and has a fully supported free
> version.
>
> --
> "Are you pondering what I'm pondering?"
> "Well, I think so, Brain, but snort no, no, it's too stupid!"

When I wanted to write some automation for BBEdit, I used the Applescript
extensions. That worked great for automating editing a file.

The "macros" you posted are nothing like the scripts for BBEdit.
--
DeeDee, don't press that button! DeeDee! NO! Dee...

Re: TextWarangler macros?

<slrnsgsbeu.1eju.g.kreme@m1mini.local>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12627&group=comp.sys.mac.system#12627

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!kreme.dont-email.me!.POSTED!not-for-mail
From: g.kr...@kreme.dont-email.me (Lewis)
Newsgroups: comp.sys.mac.system
Subject: Re: TextWarangler macros?
Date: Sat, 7 Aug 2021 06:53:18 -0000 (UTC)
Organization: Miskatonic U
Lines: 38
Message-ID: <slrnsgsbeu.1eju.g.kreme@m1mini.local>
References: <KyKOI.688$qf5.360@fx07.iad>
<slrnsgn1l9.1g8j.g.kreme@darth.local> <in62hnF7jpuU1@mid.individual.net>
Reply-To: g.kreme@gmail.don-t-email-me.com
Injection-Date: Sat, 7 Aug 2021 06:53:18 -0000 (UTC)
Injection-Info: kreme.dont-email.me; posting-host="7af267d80e2722b064055eefcb7007d2";
logging-data="670"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sVxEzQ8FEOlhgRa3FpPs6"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:CdXXt3FV8xoteTx3JWwChQTV0XQ=
X-Face: )^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z
X-Clacks-Overhead: GNU Terry Pratchett
Mail-Copies-To: nobody
 by: Lewis - Sat, 7 Aug 2021 06:53 UTC

In message <in62hnF7jpuU1@mid.individual.net> Percival John Hackworth <pjh@nanoworks.com> wrote:
> On 04-Aug-2021 at 11:35:21PM PDT, "Lewis" <g.kreme@kreme.dont-email.me> wrote:

>> In message <KyKOI.688$qf5.360@fx07.iad> JF Mezei
>> <jfmezei.spamnot@vaxination.ca> wrote:
>>> Subject: TextWarangler macros?
>>
>> TextWrangler was EOLed five years ago. You should use the free
>> version of BBEdit.
>>
>>> What would be the best way to do this? Does the purchased copy of bbedit
>>> have such function?
>>
>> You do not need to pay for BBEdit to use its regex function.
>>
>>> and then assign this to a key and just press key repeatedly. ( there is
>>> also a repeat command).
>>
>> Once you write the rege you can simply say "replace all" and that will
>> replace all instances in the file. Or in multiple files.
>>
>>> Just wondering if such functionality exists in TextWrangler of if I
>>> upgrade to BBedit.
>>
>> I do not remember what TextWrangler supported, but I suspect it did
>> support regex. BBEdit is better, however, and has a fully supported free
>> version.

> When I wanted to write some automation for BBEdit, I used the Applescript
> extensions. That worked great for automating editing a file.

You do not need an AppleScript for the task described though, you just
need a regex.

--
Do not meddle in the affairs of wizards for they are subtle and quick
to anger.

Re: TextWarangler macros?

<WyzPI.6849$EF2.3395@fx47.iad>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12628&group=comp.sys.mac.system#12628

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
Subject: Re: TextWarangler macros?
Newsgroups: comp.sys.mac.system
References: <KyKOI.688$qf5.360@fx07.iad> <slrnsgn1l9.1g8j.g.kreme@darth.local>
<in62hnF7jpuU1@mid.individual.net> <slrnsgsbeu.1eju.g.kreme@m1mini.local>
From: jfmezei....@vaxination.ca (JF Mezei)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0)
Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <slrnsgsbeu.1eju.g.kreme@m1mini.local>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 11
Message-ID: <WyzPI.6849$EF2.3395@fx47.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sat, 07 Aug 2021 17:39:02 UTC
Date: Sat, 7 Aug 2021 13:39:02 -0400
X-Received-Bytes: 1204
 by: JF Mezei - Sat, 7 Aug 2021 17:39 UTC

On 2021-08-07 02:53, Lewis wrote:

> You do not need an AppleScript for the task described though, you just
> need a regex.

Can you provide an example of regex copying text from one area of text
and then adding text elsewhere (including the copied text).

I have only used regex to locate text and replace it.

Re: TextWarangler macros?

<slrnsguarb.2cq4.g.kreme@m1mini.local>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12629&group=comp.sys.mac.system#12629

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!kreme.dont-email.me!.POSTED!not-for-mail
From: g.kr...@kreme.dont-email.me (Lewis)
Newsgroups: comp.sys.mac.system
Subject: Re: TextWarangler macros?
Date: Sun, 8 Aug 2021 00:55:08 -0000 (UTC)
Organization: Miskatonic U
Lines: 31
Message-ID: <slrnsguarb.2cq4.g.kreme@m1mini.local>
References: <KyKOI.688$qf5.360@fx07.iad>
<slrnsgn1l9.1g8j.g.kreme@darth.local> <in62hnF7jpuU1@mid.individual.net>
<slrnsgsbeu.1eju.g.kreme@m1mini.local> <WyzPI.6849$EF2.3395@fx47.iad>
Reply-To: g.kreme@gmail.don-t-email-me.com
Injection-Date: Sun, 8 Aug 2021 00:55:08 -0000 (UTC)
Injection-Info: kreme.dont-email.me; posting-host="52c7ac0e47b011ce50bd671cac99c65d";
logging-data="11382"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Zypz/9YwNyfc2cjFJnHVF"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:s9Ipj26XAFHk5woOm9BngypVXgA=
X-Face: )^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z
X-Clacks-Overhead: GNU Terry Pratchett
Mail-Copies-To: nobody
 by: Lewis - Sun, 8 Aug 2021 00:55 UTC

In message <WyzPI.6849$EF2.3395@fx47.iad> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
> On 2021-08-07 02:53, Lewis wrote:

>> You do not need an AppleScript for the task described though, you just
>> need a regex.

> Can you provide an example of regex copying text from one area of text
> and then adding text elsewhere (including the copied text).

Fred Smith
John Smthe
Alice Smythe

At its simplest,

search for "^([^ ]+) (.*)"
replace with \2, \1

Smith, Fred
Smthe, John
Smythe, Alice

> I have only used regex to locate text and replace it.

BBEdit manual (under the Help menu) has an entire chapter on regex/grep.

--
"Are you pondering what I'm pondering?"
"Uh... yeah, Brain, but where are we going to find rubber pants our
size?"

Re: TextWarangler macros?

<pvIPI.1797$qf5.771@fx07.iad>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=12631&group=comp.sys.mac.system#12631

  copy link   Newsgroups: comp.sys.mac.system
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail
Subject: Re: TextWarangler macros?
Newsgroups: comp.sys.mac.system
References: <KyKOI.688$qf5.360@fx07.iad> <slrnsgn1l9.1g8j.g.kreme@darth.local>
<in62hnF7jpuU1@mid.individual.net> <slrnsgsbeu.1eju.g.kreme@m1mini.local>
<WyzPI.6849$EF2.3395@fx47.iad> <slrnsguarb.2cq4.g.kreme@m1mini.local>
From: jfmezei....@vaxination.ca (JF Mezei)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0)
Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <slrnsguarb.2cq4.g.kreme@m1mini.local>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 7
Message-ID: <pvIPI.1797$qf5.771@fx07.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sun, 08 Aug 2021 03:49:41 UTC
Date: Sat, 7 Aug 2021 23:49:41 -0400
X-Received-Bytes: 1098
 by: JF Mezei - Sun, 8 Aug 2021 03:49 UTC

On 2021-08-07 20:55, Lewis wrote:

> search for "^([^ ]+) (.*)"
> replace with \2, \1

Thanks. wasn't aware there were "variables" in REGEX.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor