docs/readme.mdwn
changeset 148 b222f4d111d9
parent 144 690b5524b895
equal deleted inserted replaced
147:66a63c9609de 148:b222f4d111d9
     1 
     1 
     2 # Lua scripting for MCabber
     2 # Lua scripting for MCabber
     3 
     3 
     4 This module creates lua 5.1 or 5.2 interpreter environment and puts some lua
     4 This module creates lua 5.1, 5.2 or 5.3 interpreter environment and puts some
     5 functions inside for your code to interact with mcabber.
     5 lua functions inside for your code to interact with mcabber.
     6 
     6 
     7 Module provides mcabber command `/lua5.1` or `/lua5.2` respectively and adds
     7 Module provides mcabber command `/lua5.1`, `/lua5.2` or `/lua5.3` respectively
     8 an alias `/lua` for that command. This command evaluates argument as lua code in
     8 and adds an alias `/lua` for that command. This command evaluates argument as
     9 created by module environment.
     9 lua code in created by module environment.
    10 
    10 
    11 Note: If you load both versions - `lua5.1` and `lua5.2`, alias will point to
    11 Note: If you load multiple versions, alial will point to the one, loaded last.
    12 which was loaded last.
       
    13 
    12 
    14 Lua functions, available in environment are described in api reference, built
    13 Lua functions, available in environment are described in api reference, built
    15 with `docgen` help. It is also available online.
    14 with `docgen` help. It is also available
       
    15 [[online|http://www.isbear.org.ua/docs/mcabber-lua/api/]].
    16 
    16 
    17 In `examples` dir there are some example scripts, that may be used as is or for
    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.
    18 reference. See also `README` in `examples` dir. They may be outdated, though.
    19 
    19 
    20 # Installation
    20 # Installation
    21 
    21 
    22 To install it, you need:
    22 To install it, you need:
    23 
    23 
    48 Users of other distributions can select appropriate package generator,
    48 Users of other distributions can select appropriate package generator,
    49 using cache editor.
    49 using cache editor.
    50 
    50 
    51 # Building options
    51 # Building options
    52 
    52 
    53 Through `make edit_cache` action you can adjust module parameters. Notably: if
    53 Through `make edit_cache` action you can adjust module parameters.  Notably:
    54 you set `WANT_LUA52`, module will be built against lua5.2, even if lua5.1 is
    54 you can specify needed lua version with `WANT_LUA` variable, though you'll
    55 present; you can disable aliasing `lua` command at module loading time by
    55 need to do that from command line at first cache generation
    56 unsetting `ENABLE_LUA_ALIAS`; you can adjust mcabber option names to be
    56 (-DWANT_LUA=LUAX.X), otherwise cmake will not re-discover lua package; you can
       
    57 disable aliasing `lua` command at module loading time by unsetting
       
    58 `ENABLE_LUA_ALIAS`; you can adjust mcabber option names to be
    57 version-specific, if you need both versions running simultaneously via
    59 version-specific, if you need both versions running simultaneously via
    58 `OPT_MLUA_RC` and `OPT_MLUA_DEBUG`.
    60 `OPT_MLUA_RC` and `OPT_MLUA_DEBUG`.
    59 
    61 
    60 # License
    62 # License
    61 
    63 
    66 # Contact
    68 # Contact
    67 
    69 
    68 I will be happy to get feedback, patches, suggestions, etc.
    70 I will be happy to get feedback, patches, suggestions, etc.
    69 You can send me email or contact via jabber <isbear@unixzone.org.ua>.
    71 You can send me email or contact via jabber <isbear@unixzone.org.ua>.
    70 
    72 
    71   -- Myhailo Danylenko <isbear@ukrpost.net>
    73   -- Myhailo Danylenko <risbea@gmail.com>
    72 
    74