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

From Mudlet
Jump to navigation Jump to search
Line 39: Line 39:
 
| [[Manual:Lua_Functions#dirToNumber|dirToNumber]] || TLuaInterpreter  || done || [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
 
| [[Manual:Lua_Functions#dirToNumber|dirToNumber]] || TLuaInterpreter  || done || [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
 
|-
 
|-
| [[Manual:Lua_Functions#loadRawFile|loadRawFile]] || TLuaInterpreter  || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 more of an internal function], function needs update before promotion || SlySven
+
| [[Manual:Lua_Functions#loadRawFile|loadRawFile]] || TLuaInterpreter  || to do || to be documented as loadReplay instead || ?
 
|-
 
|-
 
| [[Manual:Lua_Functions#setMapperView|setMapperView]] || TLuaInterpreter  || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 seems broken], unpublish it already? Function was published but empty. Removed it with PR [https://github.com/Mudlet/Mudlet/pull/3149 #3149] || Kebap
 
| [[Manual:Lua_Functions#setMapperView|setMapperView]] || TLuaInterpreter  || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 seems broken], unpublish it already? Function was published but empty. Removed it with PR [https://github.com/Mudlet/Mudlet/pull/3149 #3149] || Kebap
Line 45: Line 45:
 
| [[Manual:Lua_Functions#insertHTML|insertHTML]] || TLuaInterpreter  || done || just calls insertText, as noted there in wiki  || ?  
 
| [[Manual:Lua_Functions#insertHTML|insertHTML]] || TLuaInterpreter  || done || just calls insertText, as noted there in wiki  || ?  
 
|-
 
|-
| [[Manual:Lua_Functions#auditAreas|auditAreas]] || TLuaInterpreter || to be added || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
+
| [[Manual:Lua_Functions#auditAreas|auditAreas]] || TLuaInterpreter || done || OK, documented. || ?
 
|-
 
|-
 
| [[Manual:Lua_Functions#resizeUserWindow|resizeUserWindow]] || TLuaInterpreter || done || was published as resizeWindow and already documented as such. Renamed internal function instead. OK || ?
 
| [[Manual:Lua_Functions#resizeUserWindow|resizeUserWindow]] || TLuaInterpreter || done || was published as resizeWindow and already documented as such. Renamed internal function instead. OK || ?
 
|-
 
|-
| [[Manual:Lua_Functions#removeMapMenu|removeMapMenu]] || TLuaInterpreter || to be added || ? || ?
+
| [[Manual:Lua_Functions#removeMapMenu|removeMapMenu]] || TLuaInterpreter || done || OK, documented. || ?
 
|-
 
|-
| [[Manual:Lua_Functions#getMapMenus|getMapMenus]] || TLuaInterpreter || to be added || ? || ?
+
| [[Manual:Lua_Functions#getMapMenus|getMapMenus]] || TLuaInterpreter || to do || ? || ?
 
|-
 
|-
| [[Manual:Lua_Functions#cut|cut]] || TLuaInterpreter || to be added || ? || ?
+
| [[Manual:Lua_Functions#cut|cut]] || TLuaInterpreter || to do || ? || ?
 
|-
 
|-
| [[Manual:Lua_Functions#setWindowWrapIndent|setWindowWrapIndent]] || TLuaInterpreter || to be added || ? || ?
+
| [[Manual:Lua_Functions#setWindowWrapIndent|setWindowWrapIndent]] || TLuaInterpreter || done || OK, documented. || ?
 
|-
 
|-
 
| [[Manual:Lua_Functions#getAllAreaUserData|getAllAreaUserData]] || TLuaInterpreter || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested], description added thanks to Liam DeFey || SlySven
 
| [[Manual:Lua_Functions#getAllAreaUserData|getAllAreaUserData]] || TLuaInterpreter || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested], description added thanks to Liam DeFey || SlySven
Line 63: Line 63:
 
| [[Manual:Lua_Functions#setMergeTables|setMergeTables]] || TLuaInterpreter || done || OK, documented. || ?
 
| [[Manual:Lua_Functions#setMergeTables|setMergeTables]] || TLuaInterpreter || done || OK, documented. || ?
 
|-
 
|-
| [[Manual:Lua_Functions#pasteWindow|pasteWindow]] || TLuaInterpreter || to be added || ? || ?
+
| [[Manual:Lua_Functions#pasteWindow|pasteWindow]] || TLuaInterpreter || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-704496987 more of an internal function] || Vadi
 
|-
 
|-
| [[Manual:Lua_Functions#setDefaultAreaVisible|setDefaultAreaVisible]] || TLuaInterpreter || to be added || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
+
| [[Manual:Lua_Functions#setDefaultAreaVisible|setDefaultAreaVisible]] || TLuaInterpreter || to do || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
 
|-
 
|-
 
| [[Manual:Lua_Functions#setDoor|setDoor]] || TLuaInterpreter  || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
 
| [[Manual:Lua_Functions#setDoor|setDoor]] || TLuaInterpreter  || done || [https://github.com/Mudlet/Mudlet/issues/1149#issuecomment-313997179 description details suggested] || SlySven
 
|-
 
|-
| [[Manual:Lua_Functions#hideGauge|hideGauge]] || GUIUtils.lua || to be added || to be reviewed || ?
+
| [[Manual:Lua_Functions#hideGauge|hideGauge]] || GUIUtils.lua || to do || to be reviewed || ?
 
|-
 
|-
 
| [[Manual:Lua_Functions#getOS|getOS]] || TLuaInterpreter || done || OK, documented || ?
 
| [[Manual:Lua_Functions#getOS|getOS]] || TLuaInterpreter || done || OK, documented || ?

Revision as of 14:26, 5 January 2021

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 ? done internal function, keep documentation in source Vadi
calcFontHeight ? done internal function, keep documentation in source Vadi
closeUserWindow TLuaInterpreter done 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 done more of an internal function SlySven
dirToNumber TLuaInterpreter done more of an internal function. Seems like it is not published at all? Comment in source changed accordingly. OK SlySven
loadRawFile TLuaInterpreter to do to be documented as loadReplay instead ?
setMapperView TLuaInterpreter done seems broken, unpublish it already? Function was published but empty. Removed it with PR #3149 Kebap
insertHTML TLuaInterpreter done just calls insertText, as noted there in wiki ?
auditAreas TLuaInterpreter done OK, documented. ?
resizeUserWindow TLuaInterpreter done was published as resizeWindow and already documented as such. Renamed internal function instead. OK ?
removeMapMenu TLuaInterpreter done OK, documented. ?
getMapMenus TLuaInterpreter to do ? ?
cut TLuaInterpreter to do ? ?
setWindowWrapIndent TLuaInterpreter done OK, documented. ?
getAllAreaUserData TLuaInterpreter done description details suggested, description added thanks to Liam DeFey SlySven
getRoomChar TLuaInterpreter done OK, documented. description details suggested SlySven
setMergeTables TLuaInterpreter done OK, documented. ?
pasteWindow TLuaInterpreter done more of an internal function Vadi
setDefaultAreaVisible TLuaInterpreter to do description details suggested SlySven
setDoor TLuaInterpreter done description details suggested SlySven
hideGauge GUIUtils.lua to do to be reviewed ?
getOS TLuaInterpreter done OK, documented ?
solveRoomCollisions TLuaInterpreter done Function was published but empty. Removed it with PR #3150 Kebap
permPromptTrigger TLuaInterpreter done OK, documented Vadi
setOverline TLuaInterpreter done OK, documented SlySven
setReverse TLuaInterpreter done OK, documented SlySven

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
to do /src/mudlet-lua/lua/CoreMudlet.lua 42 KB needs work, obsolete file containing only documentation
to do /src/mudlet-lua/lua/DB.lua 60 KB needs work, moving functional documentation to manual
done /src/mudlet-lua/lua/DebugTools.lua 7 KB moved many functional documentation from source to manual
done /src/mudlet-lua/lua/GMCP.lua 5 KB seems fine, only internal functions for handling GMCP
to do /src/mudlet-lua/lua/GUIUtils.lua 50 KB needs work, defines color_table and functions
to do /src/mudlet-lua/lua/KeyCodes.lua 14 KB needs work, defines mudlet.key table which was not found in manual
to do /src/mudlet-lua/lua/LuaGlobal.lua 6 KB not sure
to do /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
to do /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
unsure* /src/mudlet-lua/lua/geyser/GeyserColor.lua 6 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserContainer.lua 11 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserGauge.lua 6 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserGeyser.lua 3 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserHBox.lua 2 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserLabel.lua 24 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserMapper.lua 2 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserMiniConsole.lua 8 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserReposition.lua 1 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserSetConstraints.lua 6 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserTests.lua 6 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserUtil.lua 2 KB needs work, moving functional documentation to manual
unsure /src/mudlet-lua/lua/geyser/GeyserVBox.lua 2 KB needs work, moving functional documentation to manual
unsure /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