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

From Mudlet
Jump to navigation Jump to search
(→‎Functions not documented in wiki: Morphed 3 sections of text into 1 joint table)
Line 35: Line 35:
 
| closeUserWindow || ? || deprecated || should [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-312166901 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. || Vadi
 
| closeUserWindow || ? || deprecated || should [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-312166901 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. || Vadi
 
|-
 
|-
| dirToString || ? || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function] || SlySven
+
| dirToString || TLuaInterpreter  || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function] || SlySven
 
|-
 
|-
| dirToNumber || ? || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function] || SlySven
+
| dirToNumber || TLuaInterpreter  || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function]. Seems like it is not published at all? Comment in source changed accordingly. OK || SlySven
 
|-
 
|-
| dirToNumber || ? || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function] || SlySven
+
| loadRawFile || TLuaInterpreter  || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function] || SlySven
 
|-
 
|-
| loadRawFile || ? || internal || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function] || SlySven
+
| setMapperView || TLuaInterpreter  || broken || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 seems broken] || SlySven
 
|-
 
|-
| setMapperView || ? || broken || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 seems broken] || SlySven
+
| insertHTML || TLuaInterpreter  || deprecated || just calls insertText  || ?  
|-
 
| insertHTML || ? || deprecated || just calls insertText  || ?  
 
 
|-
 
|-
 
| auditAreas || TLuaInterpreter || to be added || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
 
| auditAreas || TLuaInterpreter || to be added || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
Line 74: Line 72:
 
|-
 
|-
 
| getOS || TLuaInterpreter || added || OK, documented || ?
 
| getOS || TLuaInterpreter || added || OK, documented || ?
|-
 
| dirToNumber || TLuaInterpreter || internal || Seems like it is not published at all? Comment in source changed accordingly. OK || ?
 
|-
 
| loadRawFile || TLuaInterpreter || to be added || ? || ?
 
|-
 
| setMapperView || TLuaInterpreter || to be added || ? || ?
 
|-
 
| insertHTML || TLuaInterpreter || to be added || ? || ?
 
|-
 
| loadRawFile || TLuaInterpreter || to be added || ? || ?
 
 
|}
 
|}
+
 
 
== Files reviewed ==
 
== Files reviewed ==
 
Which files have been checked yet and have their documentation updated in wiki?
 
Which files have been checked yet and have their documentation updated in wiki?

Revision as of 20:49, 15 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.
  • 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 calcFontWidth and calcFontHeight will remain in code, until a new place is settled.
    • TODO: Create area in wiki for developers' internal documentation as opposed to user-side docs.

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
  • Comments in code follow these templates:
    1. // Documentation: https://wiki.mudlet.org/w/Manual:Lua_Functions#denyCurrentSend
    2. // No documentation available in wiki - internal function
    3. // Documentation: ? - public function missing documentation in wiki
  • Case 1 should be common case, 2 will not be avoidable, 3 should be transformed into 1

Functions not documented in wiki

Function File Status Description Responsible
calcFontWidth ? internal confirmation Vadi
calcFontHeight ? internal confirmation Vadi
closeUserWindow ? deprecated 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. Vadi
dirToString TLuaInterpreter internal more of an internal function SlySven
dirToNumber TLuaInterpreter internal more of an internal function. Seems like it is not published at all? Comment in source changed accordingly. OK SlySven
loadRawFile TLuaInterpreter internal more of an internal function SlySven
setMapperView TLuaInterpreter broken seems broken SlySven
insertHTML TLuaInterpreter deprecated just calls insertText ?
auditAreas TLuaInterpreter to be added description details suggested SlySven
resizeUserWindow TLuaInterpreter done was published as resizeWindow and already documented as such. Renamed internal function instead. OK ?
removeMapMenu TLuaInterpreter to be added ? ?
getMapMenus TLuaInterpreter to be added ? ?
cut TLuaInterpreter to be added ? ?
setWindowWrapIndent TLuaInterpreter to be added ? ?
getAllAreaUserData TLuaInterpreter to be added description details suggested SlySven
getRoomChar TLuaInterpreter to be added description details suggested SlySven
setMergeTables TLuaInterpreter to be added ? ?
pasteWindow TLuaInterpreter to be added ? ?
setDefaultAreaVisible TLuaInterpreter to be added description details suggested SlySven
setDoor ? done description details suggested SlySven
hideGauge GUIUtils.lua to be added to be reviewed ?
getOS TLuaInterpreter added OK, documented ?

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