[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: email-style italics: MARKUP.PM



** Reply to message from Bill Troop  on
Sat, 09 Aug 2008 19:23:01 +0100


Try this, MARKUP.PM: Import the XPLCODE below into XyWrite,
DECODE, SAve as a freestanding program MARKUP.PM, and
then RUN MARKUP.PM against one of your Emails... It converts
ANY left-right pair of ON/OFF markups (like *-*, _-_, /-\,
-, «MDBO»-«MDNM, [I]-[P], etc.) to ANY new pair of ON/OFF
markups. XyWrite MoDes, Quark markups, HTML, web forum,
whatever -- any kind of markup. For that matter, it can also
change Ascii quotes to left and right quotes, or v.v. You have
to enter all four markups (current On/Off, replacement On/Off)
in response to queries by the program, but the trade-off is
total flexibility. Warns and aborts before processing if
current pairs are unbalanced -- or, if using the same
character(s) for both On and Off e.g. "*", checks that there are
an even number of those characters... You can choose to Verify
each pair change, or just barge head globally with one keystroke
(Change Invisible). Abort at any PRompt with Escape.

There's really no way to do this from the XyWrite command line
manually -- you have to use a program to check the balance and
keep track of the constantly alternating On/Off toggle. The
only *requirement* is if you want to use guillemets in a markup,
e.g. «MDIT»: you must have direct, separate KBD assignments for
the left and right guillemets (none of that 1-7-4, 1-7-5 keying
on the NumberPad!). The best place to put guillemets is on,
say, CTRL-< and CTRL->, using **three byte codes** in the KBD
file, like this:

XPLeNCODE v2.0
b-gin [UNTITLED]
51=[255+065+069][cr|lf]52=[255+065+070][cr|lf]
-nd
XPLeNCODE

You can also get this program in native form at XyWWWeb:

 http://users.datarealm.com/xywwweb/MARKUP.ZIP

R.
----------------------------------------
XPLeNCODE v2.0
b-gin MARKUP.PM
;*; MARKUP.PM Replace current markup pairs with new pairs RJH 8/
10/08[cr|lf];*;[cr|lf]{<}SV01,{<}A{>}{>}{<}SV96,A{>}{<}XS01,96,
02,,03{>}{<}SU04,{<}SV05,{>}{<}SV01,{>}{<}LBA{>}{<}SX96,{<}IS96{>
}+{<}IS05{>}{>}{<}GT06{>}{<}IF{<}VA$KC{>}<>28&{<}VA$KC{>}<>10
4{>}{<}SX07,{<}IS05{>}{>}{<}IF{<}IS05{>}=={<}IS02{>}{>}{<}SV0
7,[w<]{>}{<}EI{>}{<}IF{<}IS05{>}=={<}IS03{>}{>}{<}SV07,[w>]{>
}{<}EI{>}{<}SX01,{<}IS01{>}+{<}IS07{>}{>}{<}GLA{>}{<}EI{>}{<}
IF{<}VA|01{>}<1{>}{<}PRAbort{>}{<}EX1{>}{<}EI{>}{>}{<}SU06,{<
}IF{<}VA|96{>}>0{>}{<}PR@96{>}{<}EI{>}{<}LBB{>}{<}SX05,{<}RK{
{062}}{>}{<}IF"[$M_]"{240}{<}IS05{>}{>}{<}GLB{>}{<}EI{>}{<}IF{<}V
A$KC{>}<2{>}{<}PRAbort{>}{<}EX1{>}{<}EI{>}{>};*;[cr|lf]{<}SV9
6,CURRENT left-side START markup, e.g. * _ // [255+065+06
9]MDIT[255+065+070] etc: {>}{<}GT04{>}{<}SX08,{<}IS01{>}{>};*
;[cr|lf]{<}SV96,CURRENT right-side STOP markup, e.g. * _{032}
/ \\ [255+065+069]MDNM[255+065+070] etc: {>}{<}GT04{>}{<}SX09
,{<}IS01{>}{>};*;[cr|lf]{<}SV96,NEW left-side START markup}{<}GT04
{>}{<}SX10,{<}IS01{>}{>};*;[cr|lf]{<}SV96,NEW right-side STOP
 markup, e.g. * _ / \\ [255+065+069]MDNM[255+065+070] etc
: {>}{<}GT04{>}{<}SX11,{<}IS01{>}{>};*;[cr|lf][XP_]{<}SX50,{<
}CP{>}{>}[BX_]es 1[Q2_][BX_]ci {252}{<}PV08{>}{252}{<}PV08{>}
{252}[Q2_]{<}SX96,{<}VA$WC{>}{>}{<}SX96,{<}PV96{>}{>}[BX_]ci{032}
{252}{<}PV09{>}{252}{<}PV09{>}{252}[Q2_]{<}SX02,{<}VA$WC{>}{>
}{<}SX02,{<}PV02{>}{>}{<}IF{<}PV96{>}<1{>}{<}LBC{>}{<}SX96,"S
tring """+{<}IS08{>}+""" not found - Abort"{>}{<}LBD{>}{<}PR@
96{>}{<}EX{>}{<}EI{>}{<}IF{<}PV02{>}<1{>}{<}SX08,{<}IS09{>}{>
}{<}GLC{>}{<}EI{>}{<}IF{<}PV96{>}<>{<}PV02{>}{>}
{<}LBE{>}{<}SX96,"Uneven|Unbalanced numbers ("+{<}IS96{>}+"/"
+{<}IS02{>}+") of """+{<}IS08{>}+"/"+{<}IS09{>}+""" markups!{032}
Abort"{>}{<}GLD{>}{<}EI{>}{<}IF{<}IS08{>}=={<}IS09{>}{>}{<}SX
12,{<}PV02{>}/2{>}{<}IF{<}VA@12{>}{240}".5"{>}{<}GLE{>}{<}EI{
{062}}{<}EI{>}{<}SX12,1{>}{<}SV96,Verify each pair change? Y|n|Es
c{>}{<}GT06{>}{<}PR {>}{<}IF"Nn"{240}{<}IS05{>}{>}{<}SX12,0{>
}{<}EI{>}{<}SX01,0{>}{<}SV96,Change pair? Y|n|Esc{>}{<}LBF{>}
{<}IF{<}PV01{>}<{<}PV02{>}{>}{<}SX01,{<}PV01{>}+1{>}{<}IF{<}P
V12{>}>0{>}[BX_]se/f {252}{<}PV08{>}{252}[Q2_]{<}GT06{>}{<}IF
"Nn"{240}{<}IS05{>}{>}[CR_][BX_]se {252}{<}PV09{>}{252}[Q2_]{
<}GLF{>}{<}EI{>}{<}EI{>}[BX_]ch/1 {252}{<}PV08{>}{252}{<}PV10
{>}{252}[Q2_][BX_]ch/1 {252}{<}PV09{>}{252}{<}PV11{>}{252}[Q2
_]{<}GLF{>}{<}EI{>}[BX_]jmp PV50{>}[Q2_]{<}PRDone{>}{<}EX{>}[
cr|lf]
-nd
XPLeNCODE

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------