docs/readme.mdwn
changeset 144 690b5524b895
parent 129 ea30cf6c5bea
child 148 b222f4d111d9
equal deleted inserted replaced
143:4232a5da1af2 144:690b5524b895
     1 
     1 
     2 # Lua scripting for MCabber
     2 # Lua scripting for MCabber
     3 
     3 
     4 This module creates lua interpreter environment and puts some lua
     4 This module creates lua 5.1 or 5.2 interpreter environment and puts some lua
     5 functions in it to interact with mcabber. Module provides command 'lua'
     5 functions inside for your code to interact with mcabber.
     6 to run lua expressions in that environment.
       
     7 
     6 
     8 Lua interface is available in api reference, built with 'docgen' help.
     7 Module provides mcabber command `/lua5.1` or `/lua5.2` respectively and adds
     9 It is also available online.
     8 an alias `/lua` for that command. This command evaluates argument as lua code in
       
     9 created by module environment.
    10 
    10 
    11 In 'examples' dir there are some example scripts, that may be used as
    11 Note: If you load both versions - `lua5.1` and `lua5.2`, alias will point to
    12 is or for reference. See also 'README' in 'examples' dir.
    12 which was loaded last.
       
    13 
       
    14 Lua functions, available in environment are described in api reference, built
       
    15 with `docgen` help. It is also available online.
       
    16 
       
    17 In `examples` dir there are some example scripts, that may be used as is or for
       
    18 reference. See also `README` in `examples` dir.
    13 
    19 
    14 # Installation
    20 # Installation
    15 
    21 
    16 To install it, you need:
    22 To install it, you need:
    17 
    23 
    35     # make install
    41     # make install
    36 
    42 
    37 Debian users can instead of make install do:
    43 Debian users can instead of make install do:
    38 
    44 
    39     $ make package
    45     $ make package
    40     # dpkg -i libmcabber-lua_*.deb
    46     # dpkg -i mcabber-mod-lua5.?_*.deb
    41 
    47 
    42 Users of other distributions can select appropriate package generator,
    48 Users of other distributions can select appropriate package generator,
    43 using cache editor.
    49 using cache editor.
       
    50 
       
    51 # Building options
       
    52 
       
    53 Through `make edit_cache` action you can adjust module parameters. Notably: if
       
    54 you set `WANT_LUA52`, module will be built against lua5.2, even if lua5.1 is
       
    55 present; you can disable aliasing `lua` command at module loading time by
       
    56 unsetting `ENABLE_LUA_ALIAS`; you can adjust mcabber option names to be
       
    57 version-specific, if you need both versions running simultaneously via
       
    58 `OPT_MLUA_RC` and `OPT_MLUA_DEBUG`.
    44 
    59 
    45 # License
    60 # License
    46 
    61 
    47 This code underlies terms of GNU GPL v2 or later. You can find it in
    62 This code underlies terms of GNU GPL v2 or later. You can find it in
    48 file COPYING from this distribution or on a GNU web-site
    63 file COPYING from this distribution or on a GNU web-site