Skip to content

Commit

Permalink
Adds log parser python script for extracting LoreHound entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthfiredrake committed Aug 22, 2017
1 parent b536173 commit 48ac71b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Version 1.3.0
+ Lore recategorizations:
+ Mobs drops in dungeons have been recategorized as Drop lore (instead of Triggered)
+ Several entries in KD have been recategorized as Triggered (instead of Placed), due to requiring actions/missions to appear
+ Log output has been slightly reformatted and a basic python script has been included to quickly parse relevant entries
+ Usage requires a suitable python interpreter to be installed, and will dump the data into a LoreHound.txt file in the LoreHound directory

Version 1.2.4
+ By request: Waypoint colour may now be customized to something less like a sabotage mission marker
Expand Down Expand Up @@ -186,6 +188,8 @@ Master/Head is the most recent packaged release. Develop/Head is usually a commi

Once built, 'LoreHound.swf' and the contents of 'config' should be copied to the directory 'LoreHound' in the game's mod directory. '/reloadui' is sufficient to force the game to load an updated swf or mod data file, but changes to the game config files (LoginPrefs.xml and Modules.xml) will require a restart of the client and possible deletion of .bxml caches from the mod directory.

If the LogParser.py tool is required, it should be copied to the instal directory as well.

## License and Attribution
Copyright (c) 2017 Earthfiredrake<br/>
Software and source released under the MIT License
Expand Down
20 changes: 20 additions & 0 deletions tools/LogParser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import sys
import os.path

def Main(argv=None):
if argv is None:
argv = sys.argv
try:
lines = []
with open('..\..\..\..\..\ClientLog.txt', 'r') as logFile:
newLines = [line.split(' - ', 1)[1] for line in logFile if '.LoreHound' in line]
lines.extend(newLines)
with open('.\LoreHound.txt', 'a+') as outFile:
outFile.writelines(lines)
except Exception as e:
print(e)
return 1

if __name__ == '__main__':
sys.exit(Main())

0 comments on commit 48ac71b

Please sign in to comment.