lua-users home
lua-l archive

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

In message <CABcj=tkueH+yCnCe5MxfDr8gvdw49KMAXX3o8VVHPDfPPxDOCg@mail.g>
          Dirk Laurie <> wrote:

> You're writing an application in Lua. What are you presenting to the
> intended user?

> 1. A standalone in "pure" Lua.

> 2. A precompiled standalone.

> 3. A module.

> 4. A console application.

And with RISC OS

5. A StrongED script. StrongED is a popular texteditor (and
disassembler and much else). Drag the script onto the
appropriate icon of a StrongED window and the contents of the
window will be replaced by the output of the script. The
value of arg[1] in the script can be treated as the pathname
of a temporary file containing the original text displayed in
the window.

So, for example,

#! lua
io.input (arg[1])
text = "*all"
io.input ( )
io.write (text:gsub ("%b<>", ""))

will strip all tags from marked up text.

Gavin Wraith