Converting HTML to Jade?

Richard Gaskin ambassador at fourthworld.com
Thu Nov 12 11:01:40 EST 2015


Terry Vogelaar wrote:

 > Does anyone know if there is an easy way to convert HTML to Jade from
 > within a LiveCode script?
 >
 > I want to distill information from a website for personal use. But
 > HTML tags sometimes do and sometimes don’t have an end tag, and if
 > they do, they don’t have to be nested properly. So it can be very
 > tedious to get to the right content. Since this is much easier to
 > use Jade, I often find myself copying the HTML to the left field on
 > http://html2jade.aaron-powell.com 
<http://http//html2jade.aaron-powell.com> and manually convert it to 
Jade to copy the result back to
 > my LiveCode stack.
 >
 > I suspect there is a better, more automated solution I am not aware
 > of.

If this is for content scraping there are likely easier ways than 
translating HTML to Jade only to translate Jade into something usable in 
LiveCode.

For example, for many uses HTML content can strip tags as simply as:

    set the htmlText of the template field to tSomeHtml
    put the text of the templateField into tSomeText


Can you tell us more about the goal you're looking to achieve?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com





More information about the use-livecode mailing list