Bookmark feature
Opened this issue · 1 comments
DF-Forum Post by LordKnows
"...one feature I think would enhance this utility greatly would be a bookmark feature. If it could carry over several xml dumps of the same world it would be especially great, but even without it it would be awesome to have a quick list of bookmarked pages you want to keep track of, even if it is just some kind of raw text you can then search for in later dumps of the same world."
For your pleasure:
https://github.com/Algorithman/Legends-Viewer/tree/bookmarks_develop
Not done yet, but it shows it works.
What it can do:
At the moment it can store and restore Map, Chart and HTML-Control for HistoricalFigure, Artifact, EntityPopulation, Site, War, Entity, Beastattack, Abduction (tho i didn't find any), Battle and Structure.
It stores the bookmarks in a single file 'Bookmarks.json'. (Needs to be changed, so you don't have bookmarks of other worlds in the list).
Things to do for you (since i probably don't have the time in the near future):
- When getting the bookmark identifier string with GetBookmark(), also get a nice name for the bookmark
- Load bookmarks by World-Name in AfterLoad instead of one file for all (which also would filter out all 'otherworldly' bookmarks)
- Add functionality to remove bookmarks
- Add missing GetBookmark code (returning the id and classname)
- Message if WorldObject is not found
Thats all i can think of just now