Redid the entire README
Solvaring [07-11-17 - 20:22]
diff --git a/.gitignore b/.gitignore
index a5086d5..a906609 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
esoapidef.lua
pluginesoapi.lua
*.zip
-.gitignore
\ No newline at end of file
+README_old.md
\ No newline at end of file
diff --git a/README.md b/README.md
index d28161e..0011656 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,18 @@
-# ESO_ZBS_APIcreator and finished ZBS API Definition files Currently made for API Version 100019
-I have wrapped this whole project into a plugin for ZBS, you can simply take ZBS_API_FILES/ESOXMLPlugin.lua and drop it into your packages directory of ZBS. If you ever need to update the api and I'm away from the game for a while, use the scripts described below to help you build a new api definition from the dump file. You can drop the lua api file into your api directory and link through user.lua config file, but if you want to update xml keywords and attributes as well, the process is still fairly simple and straightforward.
+This is a plugin to add autocomplete to ZBS for ESO API Version 100019
-**NOTE: You may still need to link the api in your user.lua, i'm running into some unexpected behavior. add the line in user.lua 'api = {"esoapi"}' I thought the plugin was autocompleting xml keywords as well, but that behavior came from the keyword list I had opened in the editor which the editor scanned to provide autocomplete. I can't seem to get the xml keywords to pop up in the autocomplete. I'll try and fix this soon.**
+Simply drop ESOXMLAPIPlugin.lua into your packages/ directory of ZBS
-Generate the lua api with the script, open the resulting file and change the line that has ` return { ` to
-` local api = { ` open up your plugin file (ESOAPIXMLPlugin.lua) and copy paste it right over the old api block, make sure the entire old api block is wiped out first. Then use the xmlapicreator2.lua to generate a list of xml keywords. Scroll down in your plugin file to the onRegister function. Copy and paste all the keywords from the file that xmlapicreator2 created over the old block of keywords, you can't miss it. The line says ` local keywords = self:GetConfig().keywords or [[ huge block of keywords here ]] `
+You can use apimaker2.lua to operate over ESOUIDocumentation.txt and build a new api table if I'm away from the game and haven't made an update. After generating ESOAPI.lua use regex search in notepad++ to find ` \}, ` (this will find all braces and commas that exist at the beginning of a line) and then hit replace all to wipe out these errant braces and commas.
-That's all there is to it, just generate lua api file, xml keywords, make an edit to the generated lua api file and then copy paste it all over the parts in the plugin that need replacing. Happy developing everyone!!!
+Afterwards just copy and paste it over the old api table in the plugin. Notepad++ works best for copying and pasting such large blocks of text. apimaker2.lua will generate a file ESOAPI.lua. You can use this file after replacing all the errant ` }, ` and place it in your api/lua directory of ZBS and then link through the config file user.lua with ` api = {"ESOAPI"} ` if you want to add it to the plugin change ` return { ` to ` local api = { ` and then copy and paste.
-Script to build an api definition file from the dump file provided at esoui in the format specified by Zerobrane Studio to provide autocomplete functionality and tooltips for the ESO Api in ZBS
+There is also another branch called closingbrace in this repo which uses a different method for generating ESOAPI.lua It will leave you with 2 small changes that need to be made to get the file working and I think the method used on that branch is actually preferred, but I wanted to leave both options open in case others find one method works better over another. It is described in detail in that branch's readme
-**There is a second branch called 'closingbrace' after running that branch's code for apimaker there will be only one '},' that needs to be moved to the very end of the file. There are now updated instructions if you switch to that branch, I found the bug and give instruction on how to fix the line that didn't properly close a table. I do believe that this is now a quicker and easier way to generate a lua api definition file. Go check it out!**
+xmlapicreator2.lua operates over esouixml.txt which is the XML section (final h2. section) of ESOUIDocumentation pasted into it's own separate file. it will create a file ESOXMLKeywordList.txt. Take this block of keywords and paste it over the large block of keywords at the bottom of the file on the line that says ` local keywords = self:GetConfig().keywords or [[Large block of keywords here]] ` So if you want to update this part yourself you will need to copy the final section of ESOUIDocumentation.txt into its own separate file and name it esouixml.txt
-The two main files you will need for this script to build an autocomplete for the lua api are **apimaker2.lua** and **ESOUIDocumentation.txt**. To build an autocomplete definition for the xml keywords you will need **esouixml.txt** and **xmlapicreator2.lua". If you want to have support for xml keywords you will need to use the plugin explained above. If for some reason you aren't using the plugin you will only have Lua API ZBS compliant file to be put into the api/ directory of zbs.
+xmlapicreator.lua operates over ESOXMLKeywordList.txt it will create a file called ESOXMLAPI.lua, you can copy and paste this file onto the bottom of the api table in the plugin to give yourself autocomplete for the xml keywords as well.
-If you want to use this to add autocomplete functionality to your Zerobrane Studio just drop ESOAPI.lua into /api/lua of your ZBS directory and then use the normal linking procedure through ZBS user.config or modification of an interpreter file. The final versions of this file is ready to be dropped into your api directory are located in ZBS_API_Files, the plugin is also located in that directory.
+I took inspiration and parts of code for the spec piece of the plugin from @farangkao's ESOADDONDEV which he wrote for ZBS back in 2014. It hasn't had an update in a long time and so I wanted to create something to give autocomplete that was up to date with the current api. Unfortunately I wasn't able to upgrade and port over his interpreter feature which allowed debugging of addons from within the IDE without having to start the game. If I can get a better grip on what's going on with that piece of his plugin I will try to update it and bring it over in the future.
-Updated API maker but the regex is sloppy and the file produced has some errant brackets and commas floating around. I cleaned it up with find and replace in notepad plus plus and am committing the cleaned up and working api definition file as ESOAPI.lua
+Happy Developing!
-
-Just open the resulting file this script creates ESOAPI.lua in notepad++, go to the find/replace tool and find all curly braces and commas at the beginning of a line with this regex "^\\}," then leave the replace field blank and 'replace all'
-
-After performing the instruction in the previous paragraph, go to the last line of the file and add a single closing curly brace '}'
-
-xmlapicreator2 operates over esouixml.txt which is the xml section of ESOUIDocumentation and xmlapicreator operates over ESOXMLKeywordlist which is created by xmlapicreator2, you can then copy and paste the content of ESOXMLAPI onto the bottom of the api table of the plugin.
-
-### Final notes:
-
-EVENT_MANAGER doesn't show up in the dump file that this script iterates over, I have gone through and added EVENT_MANAGER and it's methods manually at the top of the finished api file ESOAPI.lua in ZBS_API_FILES. The methods belonging to event manager do show up in the dump file, but get parsed into the finished file as standalone functions, as there is nothing in the dump file to indicate that these functions are actually methods of something else. I've tried to write these out by hand as best I could, but i'm finding some conflicting information on the arguments that AddFilterForEvent takes, I wouldn't trust the tooltips that pop up for these methods completely. Always do your own research and consult references on the esouiwiki
-
-I have not actually written any addons yet, I wanted to give myself autocomplete functionality in ZBS before setting out to craft my ideas into reality. As a result some tooltips like the ones described previously may not be accurate. Some functions may pop up when typing that are actually methods of another class like the ones described previously. Always go with your better judgement, this project is at its core, only meant to help you complete whatever you're typing to make development smoother, faster, and leaving some precious memory space in your brain so that you don't have to memorize every single function/method/xml tag etc.
-
-Credit for the plugin frame goes to @farangkao who developed the original ESOZBS plugin. I was unable to upgrade his interpreter as I didn't understand all of his code completely. When I decided to wrap my generated files into a plugin I took the bottom chunk of his code from the plugin and updated the api and keywords sections with the data that my lua scripts and regexes generated.
\ No newline at end of file