all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Looking for good element parser
@ 2014-11-17  5:44 Paul Rankin
  2014-11-17  7:26 ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Rankin @ 2014-11-17  5:44 UTC (permalink / raw
  To: help-gnu-emacs

Hello,

I maintain a package that exports the Fountain screenplay markup to
HTML. Currently it uses text-properties set with font-lock to figure out
what elements are what, but I think this is perhaps not the best
approach.

I've been looking at org-element.el but it's a little overwhelming for
my Jedi skills. Can anyone point me in the direction of a good text
element parser that's maybe a little simpler than org-element.el?

Or, failing that, should I just use `while' through the buffer doing a
`cond' on every element? Seems like overkill...

Thanks :)

-- 
Paul W. Rankin
http://www.paulwrankin.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Looking for good element parser
  2014-11-17  5:44 Looking for good element parser Paul Rankin
@ 2014-11-17  7:26 ` Eric Abrahamsen
  2014-11-17  8:46   ` Paul Rankin
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2014-11-17  7:26 UTC (permalink / raw
  To: help-gnu-emacs

Paul Rankin <paul@tilk.co> writes:

> Hello,
>
> I maintain a package that exports the Fountain screenplay markup to
> HTML. Currently it uses text-properties set with font-lock to figure out
> what elements are what, but I think this is perhaps not the best
> approach.
>
> I've been looking at org-element.el but it's a little overwhelming for
> my Jedi skills. Can anyone point me in the direction of a good text
> element parser that's maybe a little simpler than org-element.el?
>
> Or, failing that, should I just use `while' through the buffer doing a
> `cond' on every element? Seems like overkill...

The Org export routine is only suited to exporting from an Org file to
something else, ie you'd be more likely to write your screenplay in Org
format, and then export it to Fountain markup. So that's probably not
what you're looking for.

If you give a little sample of what Fountain markup looks like, you'll
probably get better responses...

Yours,
Eric




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Looking for good element parser
  2014-11-17  7:26 ` Eric Abrahamsen
@ 2014-11-17  8:46   ` Paul Rankin
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Rankin @ 2014-11-17  8:46 UTC (permalink / raw
  To: Eric Abrahamsen; +Cc: help-gnu-emacs


Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> If you give a little sample of what Fountain markup looks like, you'll
> probably get better responses...

Ah, sorry. Fountain is about as rudimentary as it gets:

--8<---------------cut here---------------start------------->8---

INT. DR. MOROSE'S LAIR - DAY

DR. MOROSE
Welcome to my lair.

CUT TO:

INT. SPACESHIP

A facehugger chases the cat around. Benny Hill song plays.

EXT. SURFACE OF THE SUN

DR. MOROSE
Arrrrghhh!

--8<---------------cut here---------------end--------------->8---

More info at http://fountain.io

n.b. I'm not looking to reuse an existing element parser, just looking
for something to study to rewrite the existing fountain-mode one more
effectively.

--
Paul W. Rankin
http://www.paulwrankin.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-17  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17  5:44 Looking for good element parser Paul Rankin
2014-11-17  7:26 ` Eric Abrahamsen
2014-11-17  8:46   ` Paul Rankin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.