LuaGlobal Improvements - help needed

lex
Posts: 55
Joined: Fri May 14, 2010 2:28 pm

Re: LuaGlobal Improvements

Post by lex »

Another update - mainly progress with LuaDoc visual side.
We can now easily amend generated HTML and css within
mudlet-lua/lua/luadoc/doclet/html
folder, so feel free to do any experiment and make it nicer.

Please have a look at TODO.TXT which contains some remaining tasks.

Source and generated doc are enclosed.

UPDATE:
We finished merge with babelfish, so please use following repo as source of all mudlet-lua
http://github.com/babelfish/mudlet-lua

(http://github.com/zaxes/mudlet-lua has been removed to prevent any confusion)
Attachments
mudlet-lua_v09.zip
(131.52 KiB) Downloaded 361 times

lex
Posts: 55
Joined: Fri May 14, 2010 2:28 pm

Re: LuaGlobal Improvements

Post by lex »

This update have few nice LuaDoc changes.
- I finish with LuaDoc guide, which is demonstrating usage
- you can now use @release tag within function to indicate when was the function introduced
- each function description now hold Source file, so it's much easier to navigate to source from full index
- I discovered way how to document tables and variable, see channel102 as an example
- few visual changes to LuaDoc template to make it more appealing

All is available through babelfish repository (snapshot with generated doc is enclosed).

all comments are welcomed
Attachments
mudlet-lua_v10.zip
(137.57 KiB) Downloaded 357 times

lex
Posts: 55
Joined: Fri May 14, 2010 2:28 pm

Re: LuaGlobal Improvements

Post by lex »

Hi All,

I have another update about LuaDoc documentation. I made very good progress, which is
deserving screen shoot.
luadoc.png
  • there is floating menu in the top left side (this is nicely working in FF and IE8, using only css style),
    which is available even if you are scrolling.
  • made huge improvements to links, so you can now link function from different file (we are assuming that
    all function names are unique)
  • we now have much better master index (it's index now which is referring real documentation in proper file)
  • few visual enhancements (for example amended default heading to make it more readable)

All this is enclosed (together with generated documentation).
You can get latest code as usual from babelfish's repo
http://github.com/babelfish/mudlet-lua


This is very nice, but we are still missing few final touches to make it perfect.
I would like to ask for your help with following:
  • change css to match Mudlet color schema
  • improve/fix lua documentation (within lua sources, there is simple guide enclosed)
  • generate doc and link it from main Mudlet site (possibly update manual and remove API section)
[/b]

I am sure that we'll make Mudlet Lua part much better and usable for everyone :)
Thanks in advance
Attachments
mudlet-lua v12.zip
(119.09 KiB) Downloaded 361 times

lex
Posts: 55
Joined: Fri May 14, 2010 2:28 pm

Re: LuaGlobal Improvements - help needed

Post by lex »

Hello,

I have another update for you. Now I did convert all API documentation into LuaDoc. (All is enclosed).
This allow you to easily find and use any lua function.

Main missing bits:
  • Lua code for Geyser, which I do believe will be included in next Mudlet version by default.
  • proper loading of all lua files from LuaGlobal (DB.lua, Geyser.lua)
There are also some missing doc that will need attention, so go ahead and let me know what to update
Attachments
mudlet-lua_v14.zip
(135.64 KiB) Downloaded 353 times

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: LuaGlobal Improvements - help needed

Post by naftali »

Don't know if anyone has told you, but this is AWESOME. Thanks so much for doing this!

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: LuaGlobal Improvements - help needed

Post by Heiko »

naftali wrote:Don't know if anyone has told you, but this is AWESOME. Thanks so much for doing this!
Yes, very nice.

lex
Posts: 55
Joined: Fri May 14, 2010 2:28 pm

Re: LuaGlobal Improvements - help needed

Post by lex »

Thanks for all responses. Yes we are making very good progress but there are still few things to solve.

Main changes:
- defined css for examples
- added Geyser code to repo (used version from forum, because I am not sure if there is some master copy)
- update some docs

All is enclosed and ready for comments (v15).

TODO task:
- compile this with upcoming Mudlet release and test it
- proper lua code loading
- make sure that we have all up to date lua code (db, geyser)
- add/update doc (e.g. clean up all todo items)
- generate this luadoc and link it from main Mudlet doc/site
Attachments
mudlet-lua_v15.zip
(174.1 KiB) Downloaded 366 times

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: LuaGlobal Improvements - help needed

Post by Heiko »

I've added the latest version and added code to load it properly, including db.lua + geyser.

Currently, it expects the entire mudlet-lua folder including all sub folders etc. in mudlet home root - not not in mudletHomeDir().

I needed to change LuaGlobla slightly to load it properly. This is only preliminary code to help test the new LuaGlobal package as I want to add a configurable mudletHomeDir() feature in the upcoming version to enable people to use Mudlet from a flash drive and I haven't yet made up my mind how to best accomplish this. Suggestions are welcome.

The problem is that I'd like to do it in such a way that it is as compatible with older installs as possible.

@lex:
I need your name + an email address of your choice to add to the Mudlet About dialog.

Here's my changes to rev. 15:
Code: [show] | [select all] lua
----------------------------------------------------------------------------------
--- Mudlet Lua packages loader
----------------------------------------------------------------------------------


if package.loaded["rex_pcre"] then rex = require "rex_pcre" end
if package.loaded["lpeg"] then lpeg = require "lpeg" end
--if package.loaded["luasql.sqlite3"] then require "luasql.sqlite3" end

local PATH_SEP = string.char(getMudletHomeDir():byte()) == "/" and "/" or "\\"
local MUDLET_DIR = string.format(getMudletHomeDir().."%s..%s..%s", PATH_SEP, PATH_SEP, PATH_SEP)

MUDLET_DIR = MUDLET_DIR .. "mudlet-lua" .. PATH_SEP .. "lua" .. PATH_SEP;
echo("MUDLET_DIR="..MUDLET_DIR.."\n")
local packages = {
        "StringUtils.lua",
        "TableUtils.lua",
        "Logging.lua",
        "DebugTools.lua",
        "DB.lua",
        "GUIUtils.lua",
        "Other.lua"
        }

for _, package in ipairs(packages) do
        local result = pcall(dofile, MUDLET_DIR .. package) or echo("Error attempting to load file: " .. package .. "\n")
end

-- load Geyser
 local result = pcall(dofile, MUDLET_DIR .. "geyser" .. PATH_SEP .. "geyser.lua") or echo("Error attempting to load file: " .. package .. "\n")

~     

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: LuaGlobal Improvements - help needed

Post by tsuujin »

Ah, is the new version using LPEG now?

Denarii
Posts: 111
Joined: Thu Dec 03, 2009 10:54 pm

Re: LuaGlobal Improvements - help needed

Post by Denarii »

We're including both lrexlib and lpeg.

Post Reply