Preping for Releases.

His Dad [04-26-15 - 01:56]
Preping for Releases.
Filename
Doc/Changelog.txt
Doc/Description.txt
Doc/offline_use.txt
HistOffline.lua
Screenshots/Properties of Shortcut.jpg
en.lua
history.lua
history.txt
shortcuts/Addons path.jpg
shortcuts/Properties.jpg
diff --git a/Doc/Changelog.txt b/Doc/Changelog.txt
index 46a7483..600e3e0 100644
--- a/Doc/Changelog.txt
+++ b/Doc/Changelog.txt
@@ -1 +1,3 @@
-Alpha Code, Not tracking changes at the moment.
\ No newline at end of file
+2015-04-26
+	Version 1
+	Beta Code, no known bugs.
diff --git a/Doc/Description.txt b/Doc/Description.txt
index 4f1357c..d5476a8 100644
--- a/Doc/Description.txt
+++ b/Doc/Description.txt
@@ -7,14 +7,14 @@ If you've ever had a conversation like this..
 Then you know the motivation for this addon.


-Dad's History Addon collects significant information from your adventuring and presents it to a Desktop application called HistOffline.lua. This runs under windows.
+Dad's History Addon collects significant information from your adventuring and presents it to a Desktop application called HistOffline.lua. This runs under windows using the IUP toolkit.
 [B]The addon has no in-game user interface.[/B]

 The game does not have to be running to use histoffline.

 Game information is updated when your character logs out.

-Histoffline presents infomation on your Dungeon achievements and leveling stats.
+Histoffline presents information on your Dungeon achievements and leveling stats.
 It is ideal for seeing which dungeons you haven't completed.

 When installed for the first time, it will load your achievement list, which populates the Dungeon panels.
@@ -29,7 +29,7 @@ If more than one account is used on the computer, you have an option to select t
 [*]All Dungeons uncompleted have pale red text.
 [*]Group and Public Dungeons are complete if you have the "Conqueror" Achievement. Yes I know Coldharbor doesn't.
 [*]An Alliance is Complete (The column heading is Green) if you have the Alliance Conqueror Achievement.
-[*]Veteran Dungeons are odd since there are several achievements. This is a number after the Dungeon Name. If you think you should have the acheivement but don't, make a comment on the website.
+[*]Veteran Dungeons are odd since there are several achievements. This is a number after the Dungeon Name. If you think you should have the achievement but don't, make a comment on the website.
 [*]Undaunted pledges. As far as I can see, there is no difference between a Undaunted pledge Dungeon and the Dungeon at other times.
 [/LIST]

@@ -37,13 +37,13 @@ If more than one account is used on the computer, you have an option to select t
 [LIST]

 [*]Refer to the Screenshot. One line per level. Play time is Accumulative.
-[*]L27 "First Death" is missing, because the addon was still in development a that time.
+[*]L27 "First Death" is missing, because the addon was still in development at that time.
 [/LIST]

 [SIZE=4]Locations[/SIZE]
 [LIST]
 [*]Visits are counted on load screens (Activation). Sometimes maps change without Activation, leaving a city for example. This is not captured at the moment.
-[*]"First Visited", again mostly blank because the addon was still in development a that time.
+[*]"First Visited",  a date. Again mostly blank because the addon was still in development at that time.
 [*]"First Level" means level at first visit
 [*]"Times Leveled" means number of times you leveled up in that map.
 [*]"First Death" your level when you first snuffed it.
@@ -62,35 +62,61 @@ There is no keybinding or user interface.

 [SIZE=4]Installing the Offline viewer[/SIZE]
 This is mandatory as there is no other way of reporting on data.
-This addon uses the IUP Lua Toolit. It only has to be installed once and doesn't need to be changed when the addon changes.
+This addon uses the IUP Lua Toolit. It only has to be installed once and doesn't need to be changed when the addon updates.
 If you use my Research Timer, you will already have it.

 [LIST]
 [*]Search the net for IUP for windows, or go here  http://sourceforge.net/projects/iup/
-[*]Unzip IUP into a folder. No other installation procedure is required. I.E its portable.
+[*]Unzip IUP into a folder. No other installation procedure is required. I.E it's portable.
 The only folder required is "Lua52", you can delete everything else, if you wish.
-
+[/LIST]
 I will assume you are using the folder path  C:\IUP\Lua52

 Log in to the game with a character and log out. That will ensure the savedvariable file exists.

-
-[*]In the Lua52 folder. Run the iuplua52.exe, which will give  a little graphical dialog.
+[SIZE=3]First, some testing[/SIZE]
+[*]In the Lua52 folder. Run the iuplua52.exe, which will give a little graphical dialog.
 [*]User the load button to navigate to the Histoffline.lua file. (Do not move it from its location or it won't be able to find its datafile.)
 [*]Press "execute" to run it. If there is an error, please cut and paste into a message on the webpage so I can debug.

-Now that you now it works, create a shortcut to run it directly.
-
-
-
-
-
-
+[SIZE=3]Create Shortcuts[/SIZE]
+Now that you now it works, create a shortcut to run it directly from your desktop.


+An Example shortcut is in the shortcuts folder. You can copy it to your desktop and edit it. A screenshot of the properties dialog is included.
+The [B]Target[/B] is: C:\iup\Lua52\wlua52.exe Histoffline.lua
+This does not change for the mega-server or PTS.

+The [B]Start in:[/B] is:   "D:\data\John\Documents\Elder Scrolls Online\live\AddOns\History"
+This is for user 'John'. This user has had his documents folder redirected, which is why we don't use %USERPROFILE%/Documents   [I]It is not Reliable in cases like this.[/I]
+[LIST]
+[*]"Start in" varies for each user.
+[*]"Start in" varies for each mega-server.
+[*][B]Note that path has spaces in it, so the path is enclosed in quotes.[/B] This can be hard to see as the field doesn't show the right side, although pressing the END key will put the cursor there.
+[*]If you use more than one server, install the addon to that server and create a shortcut for that server with the correct "Start in:". You don't have to change IUP.
+[/LIST]

+The easiest way of getting the correct path is to
+[LIST]
+[*]Delete contents of the Start in: Field on the Shortcut.
+[*]Use explorer to Navigate to the history addon folder. See Screenshot.
+[*]Click in the address bar to highlight it.
+[*]Ctrl-C to copy the path.
+[*]Click inside the Start in: Field on the Shortcut.
+[*]Ctrl-P to Paste it into the Start in: Field
+[*][B]Put the leading and trailing Quotes in.[/B]
+[*]Click OK
+[/LIST]

+You may want to rename the shortcut.

+[SIZE=3]Debugging[/SIZE]
+(Q)It worked from the iuplua52 test console, but the shortcut doesn't work.
+(A)The path is wrong.

+Enjoy. Please report bugs to the forum. This is work in progress. None of my characters have been to craglorn or done all the Vet dungeons so some stuff is untested.

+[SIZE=4]Licence[/SIZE]
+Some code taken from the Luatz project under the MIT Licence.
+The dump code function I found on the net. Sorry I don't know who wrote it.
+The rest is my code, use it as you wish, coz I don't care, assume MIT licence if you want.
diff --git a/Doc/offline_use.txt b/Doc/offline_use.txt
deleted file mode 100644
index 2c79a90..0000000
--- a/Doc/offline_use.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-The program "HistOffline.lua" will read the History saved variables file and presents a dialog on your windows desktop.
-To use it you need a copy of IUP for lua which you can download from here.
-
-The site page:  http://webserver2.tecgraf.puc-rio.br/iup/
-download http://sourceforge.net/projects/iup/files/3.13/
-
-
-
-This is a zip archive which contains 2 versions of Lua with the IUP Dlls.
-It also contains some exe programs that we don't need.
-Unzip it and move stuff around if you want.
-The necessary files are in  \IUP\Lua52  All else can be discarded.
-
-Lua52 contains a command line exe (lua52.exe) that has a console--good for debugging and a windows exe, wlua52.exe
-
-
-===Optional===
-Open HistOffline.lua in a text editor.
-Review this line at the top.
-
-local dateformat = "%Y-%m-%d, %H:%M"
-
-This formats the date display. That's for YYYY-MM-DD format. Change it as you wish.
-==============
-
-Create a shortcut on your desktop for the wlua52.exe.
-Edit its properties, change the "Start in" to the Addons/History Folder. You will probably need quotes around it.
-
-Run it and you will get a lua console
-Type dofile "HistOffline.lua"
-
-It should work fine. Otherwise it should give  something helpful as an error.
-
-When it works ok, you can edit the shortcut to use wlua52.exe and put HistOffline.lua in the "target" field after wlua52.exe
-
-There is a screenshot of the authors shortcut. My code is in D:,
-
-Feel free to edit. It's not rocket science.
-
-
--Dad
diff --git a/HistOffline.lua b/HistOffline.lua
index d798834..821eef4 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -1,4 +1,4 @@
--- Licence: No care and no responsibility
+-- Licence: MI Licence
 -- Some code from the luatz project (MIT Licence)

 -- Configuration ==========
@@ -17,16 +17,20 @@ dofile "../../SavedVariables/History.lua"

 --os.execute("copy  ..\\..\\SavedVariables\\History.lua ..\\..\\SavedVariables\\History_Bak\\History.lua")

+--[[
 -- ============== Setup storage for old characters.
 archivef = io.open("../../SavedVariables/History.Archive", "r")
 if archivef ==nil then	--create empty file
 	archivef = io.open("../../SavedVariables/History.Archive", "w")
 	archivef:write("Archive = {} \n")
 end
+
 archivef:close()
 dofile "../../SavedVariables/History.Archive"
--- ==============

+-- newf = assert(io.open("../../SavedVariables/History.new", "w"))
+-- ==============
+--]]
 function dump(o)
    if type(o) == 'table' then
       local s = '{ '
@@ -39,7 +43,7 @@ function dump(o)
       return tostring(o)
    end
 end
--- newf = assert(io.open("../../SavedVariables/History.new", "w"))
+

 -- Minimally effective quoting
 function quote(astring)
@@ -122,7 +126,7 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 	iup.SetAttribute(accounts[acc].logtable,  "ALIGNMENT0", "ACENTER")
 	iup.SetAttribute(accounts[acc].logtable,  "ALIGNMENT2", "ALEFT")
 	iup.SetAttribute(accounts[acc].logtable,  "WIDTH0", 80)
-	iup.SetAttribute(accounts[acc].logtable,  "WIDTH1", 85)
+	iup.SetAttribute(accounts[acc].logtable,  "WIDTH1", 100)
 	iup.SetAttribute(accounts[acc].logtable,  "WIDTH2", 300)
 	iup.SetAttribute(accounts[acc].logtable,  "READONLY", "YES")
 	-- Load log data
@@ -144,14 +148,7 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 	-- Setup Log Display
 	accounts[acc].log_tab=iup.vbox {
 			["tabtitle"] =L.LogTab,
-			iup.label{title="LogLabel",expand="HORIZONTAL"},
 			accounts[acc].logtable,
-			iup.label{SEPARATOR="HORIZONTAL"},	-- Bottom Area
-			iup.hbox { Alignment = "ACENTER",
-				btn_eraselog,
-				iup.label{title = L.EraseWarning, PADDING="10X0"},
-				iup.fill{},
-					},
 			iup.fill{}
 			}
 	accounts[acc].tabs =iup.tabs{}  -- Top level of Tabs, Character Info in Here
@@ -427,8 +424,6 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 		end


-
-
 	 -- ====================================
 	--  == Prepare for the user display tabs
 		accounts[acc].name[char].tab = iup.vbox{
@@ -464,7 +459,7 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 											},

 									iup.vbox {	["tabtitle"] =L.Leveling,
-												iup.label{title="LevLabel",expand="HORIZONTAL"},
+										--		iup.label{title="LevLabel",expand="HORIZONTAL"},
 												accounts[acc].name[char].leveling_box,
 												iup.fill{}
 											},
@@ -477,27 +472,22 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 							},
 					}  -- end of tabs for characters vbox
 		iup.Append(accounts[acc].tabs,accounts[acc].name[char].tab)
-		accounts[acc].panelsize =  tostring(#accounts[acc].names * 30 +550) ..  "x250"
+
+		local panel =(#accounts[acc].names * 90)
+		if panel < 650  then
+			panel = 650
+		elseif panel >950 then
+			panel = 950
+		end
+		accounts[acc].panelsize =  tostring(panel) ..  "x250"
 	end  -- Chars

 -- Add to end of Characters
 iup.Append(accounts[acc].tabs, accounts[acc].log_tab)
 end -- Accounts

--- Load the log first time
 --print_old()

-btn_eraselog=iup.button{title=L.EraseButton, FGCOLOR = "#FF0000"}
-
-
-
-function btn_eraselog:action()
-	History_SV["Default"][myaccount]["$AccountWide"]["log"] = {}
- 	write_data()	-- write new history
- --	Load_Log()
-	lbl_Status_bar.title = L.Erased
-end
-


 function select_account()
diff --git a/Screenshots/Properties of Shortcut.jpg b/Screenshots/Properties of Shortcut.jpg
deleted file mode 100644
index b5379ed..0000000
Binary files a/Screenshots/Properties of Shortcut.jpg and /dev/null differ
diff --git a/en.lua b/en.lua
index eb9c68d..8427be9 100644
--- a/en.lua
+++ b/en.lua
@@ -41,10 +41,7 @@ Area_names = {
 		LogTab = "System Log",
 		TStamp = "Time Stamp" ,
 		title = "History For  ",
-		EraseButton = "Erase Log",
-		EraseWarning = "Do not Erase the log while a Character is logged in to ESO. Your changes will be overwritten.",
 		Welcome = "Welcome to HisDad\'s offline history viewer.",
-		Erased = "The Log has been erased.",
 		FirstDeath = "First Death",
 		SelectA = "Select Account",
 		Locations = "Locations",
diff --git a/history.lua b/history.lua
index ac6c1c0..aa7d5c6 100644
--- a/history.lua
+++ b/history.lua
@@ -1,14 +1,13 @@
 hist = {
 	name = "history",
-	version = 2,
+	version = 1,
 	initialised = false,
 	SV={},
 	L={},
 	me = {},
 	player = "",
-	last="",
 	tz_offset =0,
-	debug = true
+	debug = false
 }

 local function log_truncate(max)
diff --git a/history.txt b/history.txt
index f2b5b92..24a561a 100644
--- a/history.txt
+++ b/history.txt
@@ -1,10 +1,9 @@
-## Title: History
+## Title: Dad's History
 ## APIVersion: 100011
 ## Version: 1
 ## Author: HisDad
-## Description: Record progress of all characters
+## Description: Record progress of all characters for offline viewing.
 ## SavedVariables: History_SV
-## OptionalDependsOn: TestAddon

 timetable.lua
 history.lua
diff --git a/shortcuts/Addons path.jpg b/shortcuts/Addons path.jpg
new file mode 100644
index 0000000..dd1ba32
Binary files /dev/null and b/shortcuts/Addons path.jpg differ
diff --git a/shortcuts/Properties.jpg b/shortcuts/Properties.jpg
new file mode 100644
index 0000000..ac83d02
Binary files /dev/null and b/shortcuts/Properties.jpg differ