🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #262853

Re: 40tude find & replace 4 characters before sending message!!!!!!

#262853
From: Doyun Jahng
Date: Sun, 09 Sep 2018 02:18
41 lines
3012 bytes
Response to Grant Taylor <gtaylor@tnetconsulting.net> 


> On 09/08/2018 06:45 PM, Doyun Jahng wrote:
>> Best would be script to remove & replace chars before sending!
> 
> I have a few different (Linux shell) scripts that I run that act on the 
> clipboard.
> 
> They read the clipboard, modify the text as I want, and write it back to 
> the clipboard.
> 
> So my workflow is to copy the text in the source, run the appropriate 
> script, and then paste the modified text in the destination.  IMHO it 
> works quite well.  I use the different scripts for all sorts of 
> different things.  My most common one is to rewrap text so that it's ~74 
> characters and supports format=flowed in email & newsgroup postings.

Syntax is same inside Linux (except Linux control+v is Windows control+q).

May be you can help on gvim regexp syntax to get 1 command to work?
On Windows gvim "vy" copies & "ga" identifies the curly character.

The problem is to convert 4 character before sending 40tude message!
 convert open  single quote d145 to straight single quote d39 (')
 convert close single quote d146 to straight single quote d39 (')
 convert open  double quote d147 to straight double quote d34 (")
 convert close double quote d148 to straight double quote d34 (")

The "digraph" percent sign (%) only work one at a time.
 open  single quote (d145) to straight single quote (d39) -> :%s/\%d145/'/g
 close single quote (d146) to straight single quote (d39) -> :%s/\%d146/'/g
 open double quote (d147) to straight double quote (d34) -> :%s/\%d147/"/g
 close double quote (d148) to straight double quote (d34) -> :%s/\%d148/"/g 
I can not get the syntax correct to do all 4 conversion at once!

The "\d" reduce the 4 command above to 2 command:
open/close single quote to straight single quote -> :%s/[\d145,\d146]/'/g 
open/close double quote to straight double quote -> :%s/[\d147,\d148]/"/g 

But I can not understand yet syntax to make above to 1 command!
Technical Details
Message-ID: <pn1vtd$2o5f$1@adenine.netfront.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <pn1qed$28a6$1@adenine.netfront.net> <pn1sno$lel$1@tncsrv09.home.tnetconsulting.net>

Show Full Headers
Complete Article Headers
Message-ID: <pn1vtd$2o5f$1@adenine.netfront.net>
Subject: Re: 40tude find & replace 4 characters before sending message!!!!!!
Date: Sun, 9 Sep 2018 11:18:21 +0900
From: Doyun Jahng <ahngdoyun@tbroad.com>
References: <pn1qed$28a6$1@adenine.netfront.net> <pn1sno$lel$1@tncsrv09.home.tnetconsulting.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
Newsgroups: news.software.readers
Organization: Netfront http://www.netfront.net/
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 9 Sep 2018 02:18:21 -0000 (UTC)
Injection-Info: adenine.netfront.net; posting-host="121.130.172.27";
 logging-data="90287"; mail-complaints-to="news@netfront.net"
User-Agent: 40tude_Dialog/2.0.15.41
X-Received-Bytes: 2924
X-Received-Body-CRC: 2321350329