Thread Tools Display Modes
03/05/16, 10:15 AM   #1
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Updating stuff on the Wiki - reloaded (2016+)

Hello here


There has been some years that this forum didn't had love. Let's try to improve our way to do :






http://wiki.esoui.com/Main_Page

  • Need an update at each API



http://wiki.esoui.com/Updates
http://wiki.esoui.com/APIVersion
  • Should be merged -> Done by Ayantir
  • Need an update at each API




http://wiki.esoui.com/Raw_globals_dump

To delete



http://wiki.esoui.com/API
  • Need an update at each API
  • How-to Update :

  1. Grab the Patchnotes TXT File
  2. Copy/Paste in a new file in Notepad++
  3. Section h2. Game API

  4. Search/Replace (Notepad++) :

    ** _Returns:_ -> ** '''Returns:'''
    *string* -> '''string'''
    *bool* -> '''boolean'''
    *integer* -> '''number'''
    *number* -> '''number'''
    *luaindex* -> '''number'''
    *id64* -> '''id64'''
    *textureName* -> '''textureName'''
    *luaindex:nilable* -> '''number:nilable'''
    *string:nilable* -> '''string:nilable'''
    *integer:nilable* -> '''number:nilable'''
    *bool:nilable* -> '''boolean:nilable'''
    *number:nilable* -> '''number:nilable'''
    *id64:nilable* -> '''id64:nilable'''
    *textureName:nilable* -> '''textureName:nilable'''
    _ -> ''

  5. Search/Replace Regular expression :

    \*\[(\w+)\|\#(\w+)\]\* -> '''number''' [[Globals\#\1|\1]]
    \*\[(\w+)\|\#(\w+)\]\:nilable\* -> '''number:nilable''' [[Globals\#\1|\1]]
    (.+)\*private\*(.+) -> * {{Private function}} \1 \2
    (.+)\*protected\*(.+) -> * {{Protected function}} \1 \2
    \* (\w+)\( -> \* {{GitHubSearch|Search=\1}} [[\1]]\(
    \* (\{\{.*\}\}) \* (\w+) -> \* {{GitHubSearch|Search=\2}} \1 [[\2]]

  6. Search/Replace :

    Triple space -> Single space (I cannot write them here)
    () -> () (there is a space to remove before ())
    \}\} (\w+) ? -> }} [[\1]]



http://wiki.esoui.com/Events

  • Need an update at each API
  • How-to Update :



  1. Grab the Patchnotes TXT File
  2. Copy/Paste in a new file in Notepad++
  3. Copy section h2. Events -> next h2 to a new file

  4. Search/Replace :

    * EVENT[/b] -> * [[EVENT
    ([/b] - space before the "(" -> ]] ('''integer''' ''eventCode'',
    *string* -> '''string'''
    *bool* -> '''boolean'''
    *integer* -> '''number'''
    *number* -> '''number'''
    *luaindex* -> '''number'''
    *id64* -> '''id64'''
    *object* -> '''object'''
    *luaindex:nilable* -> '''number:nilable'''
    _ - space before the _ -> '' - space before the ''
    _) -> '')
    _, -> '',

  5. Search/Replace (Regular Expression) :

    (\w)$ -> \1]] \('''number''' ''eventCode''\)
    \[\[(\w+)\]\] \('''number''' ''eventCode''
    -> {{GitHubSearch|Search=\1}} [[\1]] \('''number''' [[Constant_Values#\1|''eventCode'']]

    Run THIS script from a Lua console :


    Code:
    lua events.lua events.txt events-wiki.txt
    1st file is the file created with ZOS doc. 2nd is the copy paste of wiki source.


    Lua Code:
    1. local reference = {}
    2.  
    3. local function parseLuaLine(currentLine)
    4.     local eventName = string.match(currentLine, "^.*EVENT.*]")
    5.     reference[eventName] = {text = currentLine}
    6. end
    7.  
    8. local function parseReference(file)
    9.  
    10.     local referenceFile = io.open(file ,"r")
    11.     io.input(referenceFile)
    12.    
    13.     local linesToRead = true
    14.     while linesToRead do
    15.    
    16.         local currentLine  = io.read("*l")
    17.        
    18.         if currentLine then
    19.             parseLuaLine(currentLine)
    20.         else
    21.             linesToRead = false
    22.         end
    23.        
    24.     end
    25.    
    26.     io.close(referenceFile)
    27.  
    28. end
    29.  
    30. local function rewriteWikiFile(file)
    31.  
    32.     local wikiFile = io.open(file ,"r")
    33.     local newData = ""
    34.     io.input(wikiFile)
    35.    
    36.     local linesToRead = true
    37.     while linesToRead do
    38.    
    39.         local currentLine  = io.read("*l")
    40.        
    41.         if currentLine then
    42.             local eventName = string.match(currentLine, "^.*EVENT.*]")
    43.             if eventName then
    44.                 if reference[eventName] then
    45.                     newData = newData .. reference[eventName].text .. "\n"
    46.                     reference[eventName].found = true
    47.                 else
    48.                     print("Event found on Wiki but not in ZOS ref -> " .. currentLine)
    49.                 end
    50.             else
    51.                 newData = newData .. currentLine .. "\n"
    52.             end
    53.         else
    54.             linesToRead = false
    55.         end
    56.        
    57.     end
    58.    
    59.     io.close(wikiFile)
    60.    
    61.     local newWikiFile = io.open(file .. ".new.txt" ,"w")
    62.     io.output(file .. ".new.txt")
    63.     io.write(newData)
    64.     io.close(newWikiFile)
    65.    
    66.     for entryName, data in pairs(reference) do
    67.         if not data.found then
    68.             print("New ZOS event -> " .. data.text)
    69.         end
    70.     end
    71.  
    72. end
    73.  
    74. local function EventsRewriter()
    75.  
    76.     if arg[1] and arg[2] then
    77.         parseReference(arg[1])
    78.         rewriteWikiFile(arg[2])
    79.     else
    80.         error("No args, please add referenceFile and wikiFile as args")
    81.     end
    82.    
    83. end
    84.  
    85. EventsRewriter()







http://wiki.esoui.com/Constant_Values

  • Need an update at each API
  • How-to Update :



  1. DESACTIVATE ALL ADDONS
  2. Install Dumper addon
  3. /gd
  4. /reloadui
  5. Copy the constant part into a new file in Notepad++

  6. Search/Replace:

    [" (8 space before [) -> empty

    "] -> empty

  7. Use Excel

    1. Paste the data
    2. Sort by name
    3. Copy results back to Notepad++

  8. Search/Replace (Regular Expression) :

    (\w+) \= (\w*\.?\w*), -> |-|<div id="\1">\1</div>|\2
    (\w+) \= (\"\w*\"), -> |-|<div id="\1">\1</div>|\2
    (\w+) \= (-\d*\.?\d*), -> |-|<div id="\1">\1</div>| \2
    (\w+) \= (.*), -> |-|<div id="\1">\1</div>|\2

  9. Search/Replace:

    |-|<div -> |-\r\n|<div
    </div>| -> </div>\r\n|

  10. Add before the list :

    {| class="wikitable"

  11. Add after the list :

    |}


http://wiki.esoui.com/Globals
  • Need an update at each API
  • How-to Update :

  1. Grab the Patchnotes TXT File
  2. Copy/Paste in a new file in Notepad++
  3. Copy section h2. Global Variables -> next h2 to a new file

  4. Search/Replace : Regular expression :
    ^h5. (.*) -> ===\1===
    ^\* ([\w_]+) -> *[[Constant_Values\#\1|\1]]


http://wiki.esoui.com/Texture_List
  • Need an update at each API
  • How-to Update :


  1. Use EsoExtractData
  2. Extract both eso.mnf and game.mnf (200GB needed).
  3. In both folders : Windows Command line : dir /b /s *.dds > file.txt


http://wiki.esoui.com/Controls
  • Need an update at each API
  • How-to Update :


  1. Grab the Patchnotes TXT File
  2. Copy/Paste in a new file in Notepad++
  3. Copy section h2. Object API -> next h2 to a new file

  4. Search/Replace (Regular Expression) :

    ^h3. (.*) -> ===\1===
    \*\[(\w+)\|\#(\w+)\]\* -> '''number''' [[Globals\#\1|\1]]
    (.+)\*private\*(.+) -> * {{Private function}} \1 \2
    (.+)\*protected-attributes\*(.+) -> * {{Protected_attributes}} \1 \2
    \[\w+\|\#(\w+)\](,?) -> \n* [[\1]]\2

  5. Search/Replace :

    ** _Returns:_ -> ** '''Returns:'''
    *string* -> '''string'''
    *bool* -> '''boolean'''
    *integer* -> '''number'''
    *number* -> '''number'''
    *luaindex* -> '''number'''
    *id64* -> '''id64'''
    *object* -> '''object'''
    *function* -> '''function'''
    *integer:nilable* -> '''number:nilable'''
    * {{Private function}} * -> * {{Private function}}
    * {{Protected_attributes}} * -> * {{Protected_attributes}}
    *Control* -> ''Control''
    *AnimationObject* -> ''AnimationObject''
    *public* -> Empty string
    _ -> ''
    ( triple space before the "(" -> (

  6. Search/Replace (Regular Expression) :

    ^\* \[\[([\w]+)\]\](, )? -> * [[Controls\#\1|\1]]\2

  7. Search/Replace :

    * {{Protected'' -> * {{Protected_
    VERTEX''POINTS -> VERTEX_POINTS



http://wiki.esoui.com/UI_XML
  • Need an update at each API
  • How-to Update :


  1. Grab the Patchnotes TXT File
  2. Copy/Paste in a new file in Notepad++
  3. Copy section h2. UI XML Layout -> next h2 to a new file

  4. Search/Replace (Regular Expression) :

    ^h[45]. (.*) -> ===\1===
    \* (\w+) \*bool\* -> * '''boolean''' ''\1''
    \* (\w+) \*number\* -> * '''number''' ''\1''
    \* (\w+) \*integer\* -> * '''number''' ''\1''
    \* (\w+) \*string\* -> * '''string''' ''\1''
    \* (\w+) \*\[(\w+)\|\#(\w+)\]\* -> * '''number''' [[Globals\#\2|\3]] ''\1''
    \* \[(\w+)\: (\w+)\|\#(\w+)\] -> * [[#\3|\1: \2]]
    \* _(\w+)\:_ \*number\* _(\w+)_ -> * ''\1:'' '''number''' ''\2''
    \* _(\w+)\:_ \*string\* _(\w+)_ -> * ''\1:'' '''string''' ''\2''
    \* _(\w+)\:_ \*bool\* _(\w+)_ -> * ''\1:'' '''boolean''' ''\2''
    \* _(\w+)\:_ \*integer\* _(\w+)_ -> * ''\1:'' '''number''' ''\2''
    \* _(\w+)\:_ \*\[(\w+)\|#(\w+)\]\* _(\w+)_ -> * ''\1:'' '''[[Globals#\2|\3]]''' ''\4''
    \* ScriptArguments: local self(.*) -> * '''ScriptArguments:''' ''local self\1''

  5. Search/Replace :

    ===Attributes:=== -> ===Attributes===


Last edited by Ayantir : 01/09/18 at 03:11 PM.
  Reply With Quote
03/05/16, 10:16 AM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Reserved post
  Reply With Quote
03/05/16, 10:18 AM   #3
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Okay, I'll try to regroup all the info needed to update Main pages of the wiki.

Don't hesitate to do this yourself, I won't be alsways here.

For me
http://wiki.esoui.com/Updates
http://wiki.esoui.com/APIVersion

Should be merged (they're exactly sames).

And http://wiki.esoui.com/Raw_globals_dump should be deleted. We don't have access to an older api. only the current. But we should be sure that the stuff on those subpages is well listed on new updated pages.
  Reply With Quote
05/23/17, 03:06 PM   #4
Solinur
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 78
reviving thread corpse due to relevance
  Reply With Quote

ESOUI » Developer Discussions » Wiki » Updating stuff on the Wiki - reloaded (2016+)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off