Quantcast Updating stuff on the Wiki - reloaded (2016+) - ESOUI
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,022
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.


    [highlight="Lua"]
    local reference = {}

    local function parseLuaLine(currentLine)
    local eventName = string.match(currentLine, "^.*EVENT.*]")
    reference[eventName] = {text = currentLine}
    end

    local function parseReference(file)

    local referenceFile = io.open(file ,"r")
    io.input(referenceFile)

    local linesToRead = true
    while linesToRead do

    local currentLine = io.read("*l")

    if currentLine then
    parseLuaLine(currentLine)
    else
    linesToRead = false
    end

    end

    io.close(referenceFile)

    end

    local function rewriteWikiFile(file)

    local wikiFile = io.open(file ,"r")
    local newData = ""
    io.input(wikiFile)

    local linesToRead = true
    while linesToRead do

    local currentLine = io.read("*l")

    if currentLine then
    local eventName = string.match(currentLine, "^.*EVENT.*]")
    if eventName then
    if reference[eventName] then
    newData = newData .. reference[eventName].text .. "\n"
    reference[eventName].found = true
    else
    print("Event found on Wiki but not in ZOS ref -> " .. currentLine)
    end
    else
    newData = newData .. currentLine .. "\n"
    end
    else
    linesToRead = false
    end

    end

    io.close(wikiFile)

    local newWikiFile = io.open(file .. ".new.txt" ,"w")
    io.output(file .. ".new.txt")
    io.write(newData)
    io.close(newWikiFile)

    for entryName, data in pairs(reference) do
    if not data.found then
    print("New ZOS event -> " .. data.text)
    end
    end

    end

    local function EventsRewriter()

    if arg[1] and arg[2] then
    parseReference(arg[1])
    rewriteWikiFile(arg[2])
    else
    error("No args, please add referenceFile and wikiFile as args")
    end

    end

    EventsRewriter()[/highlight]







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===

__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil

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,022
Reserved post
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
  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,022
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.
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
  Reply With Quote
05/23/17, 03:06 PM   #4
decay2
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 68
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