(* txt2xhtml v.3.01 * writen: Sasaki Atsushi * last modified: 2004-05-05T12:39:51+09:00 *) set dfltDlm to AppleScript's text item delimiters set getTime to load script file ((path to scripts folder) & "lib:getTime.scpt" as string) set pad to load script file ((path to scripts folder) & "lib:pad.scpt" as string) set crrDate to current date tell getTime to set {monAbbr, monNum, d} to {getMon(crrDate, string), getMon(crrDate, number), day of crrDate} set artDate to monAbbr & ". " & d & ". " & year of crrDate as string tell pad to set {monNum, d} to {pad(monNum, 2), pad(d, 2)} set artId to "w" & year of crrDate & "." & monNum & "." & d & "-00" as string set rp to load script file ((path to scripts folder) & "lib:rp.scpt" as string) -- set safeSGMLchar to load script file ((path to scripts folder) & "lib:html:safeSGMLchar.scpt" as string) tell application "Jedit4" activate tell document 1 if html coloring then display dialog "This document may be already HTML. If you want to make a HTML doc anyway, turn off HTML coloring." buttons {"Continue", "Done"} default button "Done" with icon stop if button returned of result is "Done" then return false end if try inhibit redraw set selection to paragraphs 1 thru -1 set txt to selection -- tell safeSGMLchar to set txt to safeSGMLchar(txt) set AppleScript's text item delimiters to return & return set txt to every text item of txt as list set h to "

" & item 1 of txt & "

" set txt to rest of txt repeat with e in txt if e begins with tab & "o " then set contents of e to "" tell rp to set contents of e to rp(e, tab & "o ", "" & return & tab & "
  • ") tell rp to set contents of e to rp(e, "