Created
December 18, 2023 22:23
-
-
Save graffhyrum/7073a3b87e4acf77fbc6f9bbc8fa7b3b to your computer and use it in GitHub Desktop.
Script to parse FFXIV text logs, returns a transcript for all logs that include any two characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script to parse FFXIV text logs, returns a transcript for all logs that include any two characters. | |
| # script will prompt for: | |
| # the name of the file (do not include extension, file should be in the same directory as the script) | |
| # The first name to look for | |
| # The second name to look for | |
| $file = Read-Host -Prompt "Enter the txt file name:" | |
| $nameOfUser = Read-Host -Prompt "Paste or enter the first character's name:" | |
| $personName = Read-Host -Prompt "Paste or enter the second character's name:" | |
| $input_path = $PSScriptRoot + "\" + $file + '.txt' | |
| $output_file = $PSScriptRoot + "\" + $file + "_" + $personName + '_parsedLog2.txt' | |
| $regex = '(^\[[^\]]+\] \W?(' + $personName + ').+)|(^\[[^\]]+\] \W?(' + $nameOfUser + ').+)' | |
| select-string -Path $input_path -Pattern $regex -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value } > $output_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment