lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Markup from HTML


From: Miklos Vajna
Subject: Re: Markup from HTML
Date: Thu, 22 Jan 2009 04:19:58 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jan 21, 2009 at 12:45:20PM +1000, M Watts <address@hidden> wrote:
> Bertalan Fodor (LilyPondTool) wrote:
> > Hi,
> >
> > does anyone of you have a script or a way to convert from (simple) 
> > html to markup like this:
> >
> > This is a me<b><i>lis</i></b>ma.
> >
> > To get:
> >
> > \markup { "This is a " \concat { "me" \bold \italic "lis" "ma." } }
> >
> 
> sed would do the job, but I'm too hazy on it to offer a solution.

$ echo "This is a me<b><i>lis</i></b>ma." | \
sed 's|\(.*\) \([^ ]\+\)<b><i>\(.*\)</i></b>\(.*\)|\\markup { "\1 " \\concat { 
"\2" \\bold \\italic "\3" "\4" } }|g'
\markup { "This is a " \concat { "me" \bold \italic "lis" "ma." } }

Something like this?

Attachment: pgpkNaUkIBA3u.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]