Download
(30 Kb)
Download
Updated: 10/31/23 10:40 PM
Pictures
File Info
Compatibility:
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Updated:10/31/23 10:40 PM
Created:04/10/14 02:17 AM
Monthly downloads:1,674
Total downloads:199,946
Favorites:344
MD5:
Categories:Miscellaneous, Character Advancement, RolePlay, Utility Mods
Librarian Book Manager  Popular! (More than 5000 hits)
Version: 3.11
by: Flamage, Orionik
Librarian records every book your character reads in-game and keeps a list of when it was found and whether you have marked it as read, allowing you to continue questing (and not hold up other players) while being confident you won't forget to read anything later.

Any suggestions, bugs or general discussion about the addon can be posted in the comments tab above, in my author portal (button on the right) or in this forum thread.

Features:
- Ability to mark books as read / unread. Books are marked as unread initially so you can feel free to skip reading while questing and know that your book will be easily found later.
- When reading a book, an is shown for books not marked as read (can be disabled in the settings)
- Displays the books in the default book reader interface.
- Imports books you have already read from the Lore Library / Eidetic Memory.
- Records the time each book was first discovered.
- Optionally view books found on your other characters.
- Sorting by unread / read status, time discovered, book title and word count.
- Full text search of all the books in your collection.
- Displays a count of the total number of books found so far and the number that are unread.
- Key binding to open the Librarian window (and a bonus keybind for /reloadUI).
- Optional reminder to /reloadui (and force a save of Librarian data) when a certain number of new books have been discovered, to help prevent loss of data if the client crashes.
- Add some icons in "Lore Library" to see which books are read and which aren't and add possibility to mark them as read/unread there (can be disabled in the settings)

How to use:
- Bind a key for Librarian in the Controls, Keybinds settings menu, or type /librarian into the chat window to open Librarian.
- Click a book or press the action button ('E' by default) while hovering over a title to read that book.
- Hover over a title and press the secondary action button ('R' by default) to toggle the unread state of the highlighted book. You can also toggle the unread state of a book while reading it.
- Click on the column headers to sort by that field. Click again to sort in descending order.

SavedVariables warning:
Librarian relies on SavedVariables to store information about the books you have found. If this file is lost or corrupted, that information will be lost. Therefore, it is important to backup your saved variables regularly. This is quite simple:
1 - Go to your SavedVariables folder (on windows, this can be found at MyDocuments\Elder Scrolls Online\live\SavedVariables.
2 - Create a folder called Backup.
3 - Select Librarian.lua and right click, select copy.
4 - Open the Backup folder, and paste the file.

With version 3, the save was entirely adapted to fix some issues and allow to reduce its size but it is better to copy it elsewhere before updating the addon in order to easily rollback in case of a problem.

Although, if you encounter an issue and didn't copied your save before the update, you can rollback your save by editing your save file (MyDocuments\Elder Scrolls Online\live\SavedVariables\Librarian.lua) and replacing the sections "characterBooks" and "books" of the "Librarian_SavedVariables" table with the content of "LibrarianDeprecation_SavedVariables_Backup" which is in LibrarianDeprecation.lua (next to Librarian.lua). Then you can, install back the previous version of the addon.

Dependency:
- LibAddonMenu-2.0

Starting from v3.5, Librarian is able to display books added by "The Librarium" add-on. If you want more books and see what the ESO community can produce, you should check it out. Big thanks to Alianym for making this collaboration possible.
3.11 2023-11-01
- Updated API for Secret of the Telvanni (101040)

3.10 2023-08-23
- Updated API for 2023 update of quality of life (101039)

3.9 2023-06-05
- Updated API for Necrom (101038)
- Fix book reader scene is now "loreReaderDefault" instead of "loreReaderInteraction"
- Add back PlaySound when opening the reader (but it seems the bug is coming from eso as there is no sound when opening a book from the lore library since the update)

3.8 2022-11-02
- Updated API for Scribes of Fate (101037)

3.7 2022-11-13
- Add chinese translation, credit goes to KomeSake who posted it in the comment section of Librarian in esoui.com

3.6 2022-11-02
- Updated API for Firesong (101036)

3.5 2022-10-03
- Add API for external addon to be able to register their own books to Librarian

3.4 2022-09-11
- Add keybind in lore reader only when the book is recognized by Librarian (it avoids conflicting with other addon like TheLibrarium)
- Add possibility to delete books which don't have a category

3.3 2022-08-23
- Updated API for Lost Depths (101035)
- Widden "Found" column for 12Hour format

3.2 2022-08-06
- Create separate lib for deprecation in order to make eso create a second file for the save variables.

3.1 2022-08-02
- Improve deprecation
- Prevent from opening a book that the current character doesn't know

3.0 2022-07-25
- Updated API for High Isle (101034)
- Fix issues
- Add icons in lore library
- Add option to mark book as read directly from lore library
- Remove Import from before patch option which was meant for save created back in 2015
- Remove some deprecation code for save before 2015
- Deprecate global saves to use bookId as identifiers instead of the title (several books had the same name) and remove all data that could be retrieved thanks to ESO API now that we have the bookId (title, body, medium, showTitle, wordCount). It lightens the save (~2MB for all the books on one character) and allow the player to switch language (although a few books can't be retrieved with their bookId because they don't have a category/collection so for them all the data are kept). Keep for now the previous save in a separate table in case there is a mistake in order to be able to roll back)
- Deprecate characterBooks save, it now references the bookId instead of the title and fill at the same time the unreadPerCollection list
- Optimize ImportFromLoreLibrary by removing the Refresh every frame (without it, past 1000 books, the game slow down a lot and at 4000 you end up with less than 1fps)
- Activate back auto importation from init now that it is quick enough
- Add full localization and support for french language
- Add a small timer before refreshing the list when doing a research as we could trigger a crash if we were typing a search too fast when we have too many books
- Improve settings (better integration with LibAddonMenu and add a few options)
- Add category column in Librarian UI
- Use smaller font in order to fit all of the text in the UI
- Add button to select if you want to search through the Full-Text or just the Title of the books

2.0 (2/12/18)
- Updated API for Dragon Bones (100022)
- Fixed issue with ZOS function LoreReader, and new issue with ZO_SceneManager. Currently closes back to
UI and not Librarian list, will update that soon.

1.9 (9/10/17)
- Updated API for Horns Of The Reach (100020)
- Updated LAM to 2.0 r24
- Fixed issue with ZOS function LoreReader

1.8 (6/10/17)
- Updated API for Morrowind (100019)

1.7 (2/5/17)
- Updated LAM to 2.0 r23
- Updated to API 18 (Homestead)

1.6.3 2016-09-10
- Import feature working much better thanks some input from Votan (Thank You!)

1.6.2 2016-09-10
- Updated to LibAddonMenu 2.0 r17
- Updated for Shadows of the Hist, API 100016, also confirmed working for 100017
TODO: Looking at building language localizations and some category filters for book types. Also looking at improving the import function.

1.6.1
- Added License for LibAddonMenu

1.6.0
- Updated TOC for Tamriel Unlimited
- Updated LibAddonMenu

1.5.0
- Updated TOC for patch 1.5
- Updated LibAddonMenu 2.0

1.4.0
- Updated TOC for patch 1.4

1.2.6 2014-9-5
- Added an option to disable the character spin when opening the Librarian window.
- Added a shortcut button to the setting window in the top right of Librarian.
- Compatibility fixes for version 1.4 from the PTS.

1.2.5 2014-8-18
- Exiting the book reader interface now returns to Librarian rather than the base scene. Also fixes this behaviour with books opened from the inventory and the lore library.

1.2.4 2014-8-15
- Modified the SavedVariable import process to fix data for all accounts, not just the currently logged-in account.

1.2.3 2014-8-6
- Added missing references to LibAddonMenu.lua files that was causing an error.

1.2.2 2014-8-6
- Fixed a bug where full-text search would show an error if a book was missing its body.

1.2.1 2014-8-5
- Fixed a error caused by a change to the Scene Manager in 1.3
- Added a function to migrate data from the "empty" account that was created by the GetDisplayName() bug in 1.2.3

1.2.0 2014-6-25
- Updated to LibAddonMenu 2.0.
- Added a SavedVariable backup reminder.

1.1.2 2014-6-24
- Fixed a bug with the "Waterlogged Journal" from Craglorn that was caused a user to lose all their data. A more robust fix will be deployed later.

1.1.1 2014-6-14
- Temporarily disabled integration with the LoreLibrary which was causing connection time-outs for some users. This feature will be re-enabled when a fix for it is found.

1.1.0 2014-5-23
- Update API version to 100004. Addon appears to be stable, so I have moved to version 1.1.0.

1.0.18 2014-5-8
- Fixed a bug with upgrading old databases that would result in an error.

1.0.17 2014-5-7
- Fixed a bug in the settings panel when a newer version of LibAddonMenu was loaded.
- Updated the bundled version of LibAddonMenu to 1.0r7

1.0.16 2014-5-5
- Added a new optional reloadui reminder feature. By default, after finding 5 new books the game reminds you in a chat message to reloadui so that you do not lose much progress in the case of a crash.
- Fixed a bug with non-english clients that was preventing keybindings from working.
- Added the current version number to the UI.

1.0.15 2014-4-30
- Fixed an error that occurred when viewing a book that was not already in the collection.

1.0.14 2014-4-30
- Added a new unread indicator to the book reader. The indicator can be disabled in the settings.

1.0.13 2014-4-30
- Added the ability to toggle a book's unread status while reading it.

1.0.12 2014-4-29
- Added full-text search feature.

1.0.11 2014-4-28
- Added the LoreLibrary import feature.
- Fixed a error when changing the time display setting.

1.0.10 2014-4-28
- Fixed an error that was occurring when upgrading users of an older version of Librarian. Sorry I missed that!

1.0.9 2014-4-25
- From user feedback, performance looks to have been fixed! Moving back onto features.
- Added an unread book counter

1.0.8 2014-4-24
- Completely revamped the code to use ZO_SortFilterList as the basis of the Librarian book list. Hopefully performance is significantly improved, both for scrolling, and loading / exiting the game.

1.0.7 2014-4-21
- Added a setting to specify whether or not to display alerts in chat and/or as a banner-type alert.

1.0.6 2014-4-17
- Fixed a bug with the keybinding unread / read display when a book is highlighted.
- Replaced the chat alert when finding a new book with an alert similar to when finding a new lore book.

1.0.5 2014-4-17
- Fixed a bug with toggling the read / unread status of books.

1.0.4 2014-4-17
- Account-wide book access. There is a checkbox available at the bottom of the Librarian interface to toggle the showing of books seen across any of your characters. Initially, you will need to log in each character once to move their data to the account-wide Library.
- Big changes on the data storage side. Actual book data is stored in an account-wide variable, and only the time found is stored per-character.

1.0.3 2014-4-15
- Added a settings screen which can be accessed from the standard settings menu.
- Added a time format setting so the user can choose between 12 and 24 hour time. This setting should default to 12 hour for english and 24 hour for other languages, which is the same logic the game itself uses.
- Fixed the bug where times were always being displayed as "P.M."

1.0.2 2014-4-14
- Added a book count header.
- Fixed a bug with highlighting of sort headers.
- Known issue: book found times are still inconsistent.

1.0.1 2014-4-13
- Added a wordcount field.
Archived Files (51)
File Name
Version
Size
Uploader
Date
3.10
30kB
Orionik
10/10/23 06:08 PM
3.10
31kB
Orionik
08/23/23 07:00 AM
3.9
30kB
Orionik
06/05/23 11:04 PM
3.8
30kB
Orionik
03/13/23 10:17 PM
3.7
30kB
Orionik
11/13/22 12:29 PM
3.6
28kB
Orionik
11/01/22 07:31 PM
3.5
28kB
Orionik
10/10/22 07:40 PM
3.4
24kB
Flamage
09/11/22 05:04 PM
3.3
23kB
Orionik
08/23/22 09:45 PM
3.2
23kB
Orionik
08/06/22 09:56 AM
3.1
22kB
Orionik
08/02/22 11:03 AM
3.0
21kB
Orionik
07/25/22 12:00 PM
2.0
56kB
calia1120
02/13/18 12:56 AM
1.9
55kB
calia1120
09/10/17 08:59 PM
1.8
53kB
calia1120
06/11/17 01:02 AM
1.7.0
53kB
calia1120
02/05/17 03:00 AM
1.6.3
41kB
calia1120
09/10/16 05:51 AM
1.6.2
41kB
calia1120
09/10/16 02:09 AM
1.6.1
38kB
Flamage
03/29/15 03:59 PM
1.6.0
34kB
Flamage
03/22/15 09:38 PM
1.5.0
34kB
Flamage
11/05/14 03:47 PM
1.4.0
34kB
Flamage
09/15/14 08:58 PM
1.2.6
34kB
Flamage
09/04/14 10:57 AM
1.2.5
33kB
Flamage
08/17/14 04:44 PM
1.2.4
33kB
Flamage
08/14/14 04:56 PM
1.2.3
33kB
Flamage
08/05/14 05:52 PM
1.2.2
32kB
Flamage
08/05/14 04:22 PM
1.2.1
32kB
Flamage
08/04/14 05:01 PM
1.2.0
31kB
Flamage
06/26/14 05:22 AM
1.1.3
14kB
Flamage
06/25/14 04:29 AM
1.1.2
14kB
Flamage
06/24/14 04:49 AM
1.1.0
14kB
Flamage
06/13/14 05:32 PM
1.1.0
14kB
Flamage
05/23/14 05:02 AM
1.0.18
14kB
Flamage
05/08/14 01:55 AM
1.0.17
14kB
Flamage
05/06/14 03:20 PM
1.0.16
13kB
Flamage
05/05/14 05:22 AM
1.0.15
12kB
Flamage
04/30/14 02:23 AM
1.0.12
12kB
Flamage
04/29/14 06:05 PM
1.0.14
12kB
Flamage
04/29/14 04:42 PM
1.0.13
12kB
Flamage
04/29/14 03:49 PM
1.0.12
12kB
Flamage
04/28/14 04:01 PM
1.0.10
11kB
Flamage
04/27/14 03:11 PM
1.0.9
11kB
Flamage
04/24/14 04:19 PM
1.0.7
12kB
Flamage
04/20/14 09:54 PM
1.0.6
11kB
Flamage
04/17/14 07:03 AM
1.0.5
12kB
Flamage
04/16/14 10:57 PM
1.0.4
11kB
Flamage
04/16/14 03:10 PM
1.0.3
10kB
Flamage
04/14/14 04:16 PM
1.0.2
5kB
Flamage
04/13/14 04:00 PM
1.0.1
5kB
Flamage
04/12/14 07:48 PM
1.0
4kB
Flamage
04/10/14 02:23 AM


Post A Reply Comment Options
Unread 08/15/14, 08:30 AM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
how to disable chat messages?
mby add such option?

also, very nice addon, btw why we need reloadui after certain amount of books?
Report comment to moderator  
Reply With Quote
Unread 08/13/14, 01:40 AM  
Flamage
 
Flamage's Avatar
AddOn Author - Click to view AddOns

Forum posts: 60
File comments: 68
Uploads: 1
Re: losing library with 2nd character

Originally Posted by mbeetley
Just installed the new version. When I log in for the first time, it looks like the whole library is there. But when I log out and then in with another character, I get a UI Error and the librarian is empty (the librarian.lua file is empty, it's not just an interface prob). Have I just missed something? I do have a backup of my datafiles so I can start the process over again. Here's the error text:

user:/Saved Variables/Librarian.lua:17143:}expected (to close { at line 17141) near '['

Any ideas? I suppose I can just go in and add a bracket there after doing the initial import to see if that fixes it, but if something else is going awry I should probably deal with it. Thanks in advance!
I'd love it if you would post the backup copy of your saved variables to the Librarian thread in the forums so I can reproduce it on my system. Without that, it will be difficult for me to figure out what is wrong.

*edit* Thanks to mbeetley's assistance, I've just released a new version (1.2.4) which fixes this issue.
Last edited by Flamage : 08/14/14 at 09:08 PM.
Report comment to moderator  
Reply With Quote
Unread 08/12/14, 06:21 PM  
mbeetley

Forum posts: 1
File comments: 3
Uploads: 0
losing library with 2nd character

Just installed the new version. When I log in for the first time, it looks like the whole library is there. But when I log out and then in with another character, I get a UI Error and the librarian is empty (the librarian.lua file is empty, it's not just an interface prob). Have I just missed something? I do have a backup of my datafiles so I can start the process over again. Here's the error text:

user:/Saved Variables/Librarian.lua:17143:}expected (to close { at line 17141) near '['

Any ideas? I suppose I can just go in and add a bracket there after doing the initial import to see if that fixes it, but if something else is going awry I should probably deal with it. Thanks in advance!
Report comment to moderator  
Reply With Quote
Unread 08/12/14, 07:25 AM  
tweva
Premium Member

Forum posts: 4
File comments: 52
Uploads: 0
Re: Re: Re: Re: Wondering if I can import from a backup on a fresh install.

Originally Posted by Flamage
Originally Posted by tweva
I was mostly hoping for a way to merge files, or maybe copy my previous back-up file in SavedVariables into my new SavedVariables.
I'm not sure exactly what your situation is, or why you have multiple files, but if you post them in the Librarian forum thread I'll have a look at merging them for you.
I appreciate your offer, truely, but I know you have better things to do. I managed to get back about 90 books, and I'm just going to move forward.

And I'm just grateful for the add-on as it is. I accept that the prob is with the ESO client causing the turmoil.

I'll continue on, and keep using this mod to make the game a better environment.

Thanks for the work you put in on our behalf.
Thumbs-up to you.
Last edited by tweva : 08/12/14 at 07:26 AM.
Report comment to moderator  
Reply With Quote
Unread 08/10/14, 03:13 PM  
Flamage
 
Flamage's Avatar
AddOn Author - Click to view AddOns

Forum posts: 60
File comments: 68
Uploads: 1
Re: Re: Re: Wondering if I can import from a backup on a fresh install.

Originally Posted by tweva
I was mostly hoping for a way to merge files, or maybe copy my previous back-up file in SavedVariables into my new SavedVariables.
I'm not sure exactly what your situation is, or why you have multiple files, but if you post them in the Librarian forum thread I'll have a look at merging them for you.
Report comment to moderator  
Reply With Quote
Unread 08/10/14, 11:33 AM  
Aenra

Forum posts: 0
File comments: 38
Uploads: 0
Many, many thanks for continuing this
Report comment to moderator  
Reply With Quote
Unread 08/10/14, 06:17 AM  
tweva
Premium Member

Forum posts: 4
File comments: 52
Uploads: 0
Re: Re: Wondering if I can import from a backup on a fresh install.

Originally Posted by Flamage
Originally Posted by tweva
Text posted in yellow on the description page at ESO:

"..... open Librarian settings and click the "Import from before Patch" button. ....."

I don't see this button anywhere.
Am I doing something wrong, or assuming I'll be able to re-import the contents of a saved folder?
Version 1.2.3. installed today.

I backed up all the add-ons in my SavedVariable folder before deleting the working folder and reinstalling all my add-ons.

Thanks for any insight.
The button only appears if there is is a pre-1.3.3 section in your SavedVariables to import from. Do you have books appearing in Librarian? Are you missing a bunch of them?
I had weeks worth of books, Librarian was in my back-ups as far back as June-25, when it was 982KB. It was over 1400KB at the last back-up.

I was mostly hoping for a way to merge files, or maybe copy my previous back-up file in SavedVariables into my new SavedVariables.
If not, oh, well.... Thanks anyway.
I was just trying to save one database after my 5 zone HarvestMap file went bad.
Again.
This game is just getting to be too high maintenance.
Report comment to moderator  
Reply With Quote
Unread 08/09/14, 10:19 PM  
Flamage
 
Flamage's Avatar
AddOn Author - Click to view AddOns

Forum posts: 60
File comments: 68
Uploads: 1
Re: Wondering if I can import from a backup on a fresh install.

Originally Posted by tweva
Text posted in yellow on the description page at ESO:

"..... open Librarian settings and click the "Import from before Patch" button. ....."

I don't see this button anywhere.
Am I doing something wrong, or assuming I'll be able to re-import the contents of a saved folder?
Version 1.2.3. installed today.

I backed up all the add-ons in my SavedVariable folder before deleting the working folder and reinstalling all my add-ons.

Thanks for any insight.
The button only appears if there is is a pre-1.3.3 section in your SavedVariables to import from. Do you have books appearing in Librarian? Are you missing a bunch of them?
Report comment to moderator  
Reply With Quote
Unread 08/09/14, 07:01 PM  
tweva
Premium Member

Forum posts: 4
File comments: 52
Uploads: 0
Wondering if I can import from a backup on a fresh install.

Text posted in yellow on the description page at ESO:

"..... open Librarian settings and click the "Import from before Patch" button. ....."

I don't see this button anywhere.
Am I doing something wrong, or assuming I'll be able to re-import the contents of a saved folder?
Version 1.2.3. installed today.

I backed up all the add-ons in my SavedVariable folder before deleting the working folder and reinstalling all my add-ons.

Thanks for any insight.
Report comment to moderator  
Reply With Quote
Unread 08/05/14, 05:54 PM  
Flamage
 
Flamage's Avatar
AddOn Author - Click to view AddOns

Forum posts: 60
File comments: 68
Uploads: 1
Originally Posted by Harven
Hey Flamage,
Here's some error that appears. I downloaded the newest version today. I'm not sure if it's libaddonmenu fault or librarian:
Thanks a lot for that report, it looks like I was incorrectly referencing LibAddonMenu but if another addon also referenced it properly, the error didn't appear, which is why I didn't experience it until I disabled everything apart from Librarian.

I've just released version 1.2.3 which fixes this issue. If you grab that you should be right to go.
Report comment to moderator  
Reply With Quote
Unread 08/05/14, 05:20 PM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 135
File comments: 275
Uploads: 31
Hey Flamage,
Here's some error that appears. I downloaded the newest version today. I'm not sure if it's libaddonmenu fault or librarian:

Code:
Reason: function expected instead of nil
At: Librarian/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:155
Stack:
Librarian/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:155: function lam:RegisterAddonPanel
Librarian/LibrarianSettings.lua:143: function LibrarianSettings:Initialise
Librarian/LibrarianSettings.lua:24: function LibrarianSettings:New
Librarian/Librarian.lua:77: function Librarian:Initialise
Librarian/Librarian.lua:44: function Librarian:New
Librarian/Librarian.lua:470: function OnAddonLoaded
Librarian is the only one addon that uses LAM (any version) in my configuration. I even tried disabling all addons except librarian but still the same.

Cheers!
Report comment to moderator  
Reply With Quote
Unread 08/04/14, 05:04 PM  
Flamage
 
Flamage's Avatar
AddOn Author - Click to view AddOns

Forum posts: 60
File comments: 68
Uploads: 1
I've just released version 1.2.1 which fixes the error that was being displayed as a result of patch 1.3.

Patch 1.3 also fixed the GetDisplayName() bug, so I've added a button in the settings menu to migrate your data back to its rightful location. You should use this button if you log in and find your library is empty. As always, I recommend that at least before each patch, and before enabling out-of-date addons, you take a backup of your saved variables.
Report comment to moderator  
Reply With Quote
Unread 07/04/14, 11:45 AM  
tap3ah

Forum posts: 0
File comments: 15
Uploads: 0
For those of you who managed to make a backup of your data I made small PHP script you can use to convert it into new format usable with new version of API.
You can get PHP CLI from here. Make sure you enable mbstring support. To do that (1) rename `php.ini-development' to `php.ini' (2) uncomment (remove ';') lines extension_dir = "ext" and extension=php_mbstring.dll.
Save the script code into a file with .php extension and execute it from Command Prompt:
<path to php.exe>/php.exe <script name> <your eso saved vars folder>
It won't overwrite your data. It will create new file named Librarian.lua.new besides the original Librarian.lua who will remain unchanged. But, just in case MAKE SURE YOU CREATE THE BACKUP. DON'T HOLD ME RESPONSIBLE IF YOU LOOSE YOUR DATA. You need to rename Librarian.lua.new into Librarian.lua to use it with the addon.

Code:
<?php

if ($argc < 2) {
  echo "Usage  : php " . $argv[0] . " <ESO saved variables directory>" . PHP_EOL;
  echo "Example: php " . $argv[0] . " \"C:\\Users\\Administrator\\Documents\\Elder Scrolls Online\\liveeu\\SavedVariables\"" . PHP_EOL;
  exit(1);
}
$eso_sv_dir = $argv[1];
if ("\\" != substr($eso_sv_dir, strlen($eso_sv_dir) - 1, 1))
  $eso_sv_dir .= "\\";
$eso_sv_libfile_in = $eso_sv_dir . "Librarian.lua";
$eso_sv_libfile_out = $eso_sv_dir . "Librarian.lua.new";

define("STRLEN_LIMIT", 1024);

if (FALSE === ($f_staro = file_get_contents($eso_sv_libfile_in))) {
  echo "Can not open `" . $eso_sv_libfile_in . "' for reading." . PHP_EOL;
  exit(1);
}

$f_staro = preg_replace('/( *\[")@[^"]+("\] = *\r?\n)/', '$1$2', $f_staro);
$f_staro = preg_replace('/( *\["(title|alertStyle)"\] = )\[\[(.+)\]\](, *\r?\n)/', '$1"$3"$4', $f_staro);
$f_novo  = "";

$in_string = FALSE;
$string = "";
$strlen = strlen($f_staro);
$i = 0;
while ($i <= $strlen) {
  $char = substr($f_staro, $i, 1);
  if ($in_string)
    if ($char == "]") {
      if (substr($f_staro, $i + 1, 1) == "]") {
        $in_string = FALSE;
        $string = str_replace("\r", "", $string);
        $strglued = "";
        $strlength = mb_strlen($string, "UTF-8");
        for ($j = 0; $j < $strlength; $j += STRLEN_LIMIT)
          $strglued .= "                            [" . ((int)($j / STRLEN_LIMIT) + 1) . "] = \"" . addcslashes(mb_substr($string, $j, STRLEN_LIMIT, "UTF-8"), "\n\t\"[]\\") . "\"," . PHP_EOL;
        $f_novo .= PHP_EOL . "                        {" . PHP_EOL . $strglued . PHP_EOL . "                        }";
        ++$i;
      } else
        $string .= $char;
    } else
      $string .= $char;
  else
    if ($char == "[")
      if (substr($f_staro, $i + 1, 1) == "[") {
        $in_string = TRUE;
        $string = "";
        ++$i;
      } else
        $f_novo .= $char;
    else
      $f_novo .= $char;
  ++$i;
}

if (FALSE === file_put_contents($eso_sv_libfile_out, $f_novo)) {
  echo "Can not open `" . $eso_sv_libfile_out . "' for writing." . PHP_EOL;
  exit(1);
}

?>
Last edited by tap3ah : 07/04/14 at 03:55 PM.
Report comment to moderator  
Reply With Quote
Unread 06/27/14, 02:42 PM  
Eldorhaan
 
Eldorhaan's Avatar

Forum posts: 2
File comments: 142
Uploads: 0
Thank You Flammage for your dedication to this addon, that is for me the Addon number one. Anyway, keep continuing to update it and good luck.
Report comment to moderator  
Reply With Quote
Unread 06/26/14, 03:58 PM  
Flamage
 
Flamage's Avatar
AddOn Author - Click to view AddOns

Forum posts: 60
File comments: 68
Uploads: 1
Originally Posted by Faustus
Originally Posted by dominoid
Ouch. Booted up the game and lost my saved variable file. That being said, not a huge deal as your add-on used to rebuild from the Lore Library and Eidetic Memory. Any chance at getting those back soonish?
Same here. Problem is, Eidetic Memory is bugged too . Only a fraction of the books are getting properly marked as read, thus the addons import is limited.
I released 1.2.0 last night which adds the Lore Library import back in, which is no longer automatic but can be run manually from the Librarian settings menu. This is to prevent timeouts some users were having during login when the import was automatic. I also updated to the new LibAddonMenu so the addon configuration should be (arguably) a little cleaner and consistent.

I do see your point about eidetic memory though, my librarian shows 742 books discovered, but if I wipe the library and run an import I only get 320 from the game. Unfortunately, there is nothing I can do about this.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: