Difference between revisions of "User:Kebap/documentation-in-wiki"

From Mudlet
Jump to navigation Jump to search
(→‎Documentation to be added to wiki: update list and added info)
Line 34: Line 34:
  
 
== Documentation to be added to wiki ==
 
== Documentation to be added to wiki ==
* '''auditAreas''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
+
* TLuaInterpreter::'''auditAreas''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
 
* <strike>resizeUserWindow</strike> No need, gets published as resizeWindow and is already documented as such.
 
* <strike>resizeUserWindow</strike> No need, gets published as resizeWindow and is already documented as such.
* '''removeMapMenu'''
+
* TLuaInterpreter::'''removeMapMenu'''
* '''getMapMenus'''
+
* TLuaInterpreter::'''getMapMenus'''
* '''cut'''
+
* TLuaInterpreter::'''cut'''
* '''setWindowWrapIndent'''
+
* TLuaInterpreter::'''setWindowWrapIndent'''
* '''getAllAreaUserData''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
+
* TLuaInterpreter::'''getAllAreaUserData''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
* '''getRoomChar''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
+
* TLuaInterpreter::'''getRoomChar''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
* '''setMergeTables'''
+
* TLuaInterpreter::'''setMergeTables'''
* '''pasteWindow'''
+
* TLuaInterpreter::'''pasteWindow'''
* '''setDefaultAreaVisible''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
+
* TLuaInterpreter::'''setDefaultAreaVisible''' - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven
 
* <strike>setDoor - - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven</strike> OK, documented.
 
* <strike>setDoor - - description details [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 suggested] by SlySven</strike> OK, documented.
 
* '''hideGauge(gaugeName)''' - Vadi says, this is publicly available. GUIUtils.lua to be reviewed.
 
* '''hideGauge(gaugeName)''' - Vadi says, this is publicly available. GUIUtils.lua to be reviewed.
* '''getOS'''
+
* <strike>TLuaInterpreter::getOS</strike> OK, documented.
 +
* TLuaInterpreter::'''dirToNumber''' - no need? Seems like it is not published at all? Then change comment in source.
 +
* TLuaInterpreter::'''loadRawFile'''
 +
* TLuaInterpreter::'''setMapperView'''
 +
* TLuaInterpreter::'''insertHTML'''
 +
* TLuaInterpreter::'''loadRawFile'''
  
 
== Files reviewed ==
 
== Files reviewed ==

Revision as of 10:39, 10 July 2019

History

Project aim

  • Put all documentation in wiki for users to read.
  • Until now, documentation was also in different lua files in Mudlet code. However, this code documentation is only visible for developers not for normal users.
  • On the other hand, sometimes code was documented only there and accidentally not in wiki.
  • Sometimes documentation in code was outdated, with or without documentation in wiki at the same time.
  • The aim of this project is to put all documentation in wiki, where it can be updated easily, and in code just put a link to wiki.

Internal functions

Only put user documentation in wiki manual. Do not put documentation there for functions, which are not available for public use in Mudlet. This means, developers would need a different wiki page or place outside wiki for documentation of such internal functions. Until now, internal documentation like this will remain in code, until a new place is settled:

  • calcFontWidth - Vadi confirms
  • calcFontHeight - Vadi confirms
  • list dicontinued. Internal functions are marked in source with comment (instead of link to wiki) // Documentation: ? - internal function

TODO: Create area in wiki for developers' internal documentation as opposed to user-side docs.

Undocumented / Deprecated functions

Some functions are publicly available but will still not be documented in manual, for example if they are deprecated:

  • Vadi says: closeUserWindow should stay undocumented, we've agreed that it doesn't really 'close' anyway. Instead, hideUserWindow is there to do the job. It's still left in because it was added eons ago and some scripts could have used it.
  • dirToString - more of an internal function as suggested by SlySven
  • dirToNumber - more of an internal function as suggested by SlySven
  • loadRawFile - more of an internal function as suggested by SlySven
  • setMapperView - seems broken as suggested by SlySven
  • insertHTML - just calls insertText

Current status

  • Kebap is working on this since 2017, taking much longer than expected, about 70% done.
  • Missing documentation will be continuously added / updated in wiki either from code or written anew. Documented functions will not be listed here due to high number. See version history of wiki manual for comparison.
  • Below only such functions will be listed, which can't or shouldn't be documented in wiki (yet)
  • First batch of changes was published in pull request: https://github.com/Mudlet/Mudlet/pull/1707

Documentation to be added to wiki

  • TLuaInterpreter::auditAreas - description details suggested by SlySven
  • resizeUserWindow No need, gets published as resizeWindow and is already documented as such.
  • TLuaInterpreter::removeMapMenu
  • TLuaInterpreter::getMapMenus
  • TLuaInterpreter::cut
  • TLuaInterpreter::setWindowWrapIndent
  • TLuaInterpreter::getAllAreaUserData - description details suggested by SlySven
  • TLuaInterpreter::getRoomChar - description details suggested by SlySven
  • TLuaInterpreter::setMergeTables
  • TLuaInterpreter::pasteWindow
  • TLuaInterpreter::setDefaultAreaVisible - description details suggested by SlySven
  • setDoor - - description details suggested by SlySven OK, documented.
  • hideGauge(gaugeName) - Vadi says, this is publicly available. GUIUtils.lua to be reviewed.
  • TLuaInterpreter::getOS OK, documented.
  • TLuaInterpreter::dirToNumber - no need? Seems like it is not published at all? Then change comment in source.
  • TLuaInterpreter::loadRawFile
  • TLuaInterpreter::setMapperView
  • TLuaInterpreter::insertHTML
  • TLuaInterpreter::loadRawFile

Files reviewed

Which files have been checked yet and have their documentation updated in wiki?

Status File Size Description
done /src/TLuaInterpreter.cpp 559 KB moved many functional documentation from source to manual
open /src/mudlet-lua/lua/CoreMudlet.lua 42 KB needs work, obsolete file containing only documentation
open /src/mudlet-lua/lua/DB.lua 60 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/DebugTools.lua 7 KB needs work, moving functional documentation to manual
done /src/mudlet-lua/lua/GMCP.lua 5 KB seems fine, only internal functions for handling GMCP
open /src/mudlet-lua/lua/GUIUtils.lua 50 KB needs work, defines color_table and functions
open /src/mudlet-lua/lua/KeyCodes.lua 14 KB needs work, defines mudlet.key table which was not found in manual
open /src/mudlet-lua/lua/LuaGlobal.lua 6 KB not sure
open /src/mudlet-lua/lua/Other.lua 27 KB needs work, moving functional documentation to manual
done /src/mudlet-lua/lua/StringUtils.lua 3 KB moved many functional documentation from source to manual
open /src/mudlet-lua/lua/TableUtils.lua 10 KB needs work, moving functional documentation to manual
done /src/mudlet-lua/lua/TTSValues.lua 1 KB seems fine, only values for Text to Speech, already in manual
done /src/mudlet-lua/lua/utf8_filenames.lua 116 KB seems fine, only overwrites existing lua functions
done /src/mudlet-lua/lua/geyser/Geyser.lua 1 KB seems fine, contains only comments
open /src/mudlet-lua/lua/geyser/GeyserColor.lua 6 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserContainer.lua 11 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserGauge.lua 6 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserGeyser.lua 3 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserHBox.lua 2 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserLabel.lua 24 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserMapper.lua 2 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserMiniConsole.lua 8 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserReposition.lua 1 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserSetConstraints.lua 6 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserTests.lua 6 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserUtil.lua 2 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserVBox.lua 2 KB needs work, moving functional documentation to manual
open /src/mudlet-lua/lua/geyser/GeyserWindow.lua 6 KB needs work, moving functional documentation to manual
  • Geyser documentation is still located outside wiki, being created semi-automatically from source.
    • Think about where and how to put Geyser documentation in wiki exactly
    • Manual:Geyser is already reserved for the Geyser introduction tutorial
    • Maybe Manual:Geyser Functions would be an appropiate site name
    • Then in there, how to group the different Geyser modules and their respective functions?
    • Until now, all "Functions" pages have one level, but Geyser may need two: modules and their functions
  • Are there more .cpp files defining lua functionality? Maybe create a reverse look-up table to see which gets defined where.

Tools used for project

  • my branch has current status
  • Useful Lua commands:
    • lua debug.getinfo(replace) - Find out, in which file is function "replace" (or others) defined?


Additional findings

  • Some functions internally have a different name than the later published version. Review and maybe rename internal functions?
  • Some files only have documentation, but no code in them. The code is in Mudlet core directly for example. We delete these files, put documentation in to core.
    • CoreMudlet.lua --> TLuaInterpreter.cpp