Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
50
Task/XML-Output/AutoHotkey/xml-output.ahk
Normal file
50
Task/XML-Output/AutoHotkey/xml-output.ahk
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
gosub constants
|
||||
names := xmlescape(names)
|
||||
remarks := xmlescape(remarks)
|
||||
|
||||
stringsplit, remarks, remarks, `n
|
||||
xml = "<CharacterRemarks>"
|
||||
|
||||
loop, parse, names, `n
|
||||
xml .= "<Character name=" . A_LoopField . ">" . remarks%A_Index%
|
||||
. "</Character>`n"
|
||||
|
||||
xml .= "</CharacterRemarks>"
|
||||
|
||||
msgbox % xml
|
||||
return
|
||||
|
||||
xmlescape(string)
|
||||
{
|
||||
static
|
||||
punc = ",>,<,<=,>=,',& ; "
|
||||
xmlpunc = ",>,<,<=,>=,',&
|
||||
if !punc1
|
||||
{
|
||||
StringSplit, punc, punc, `,
|
||||
StringSplit, xmlpunc, xmlpunc, `,
|
||||
}
|
||||
escaped := string
|
||||
loop, parse, punc, `,
|
||||
{
|
||||
StringReplace, escaped, escaped, % A_LoopField, % xmlpunc%A_Index%, All
|
||||
}
|
||||
Return escaped
|
||||
}
|
||||
|
||||
constants:
|
||||
#LTrim
|
||||
names =
|
||||
(
|
||||
April
|
||||
Tam O'Shanter
|
||||
Emily
|
||||
)
|
||||
|
||||
remarks =
|
||||
(
|
||||
Bubbly: I'm > Tam and <= Emily
|
||||
Burns: "When chapman billies leave the street ..."
|
||||
Short & shrift
|
||||
)
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue