[Script] Reformat log files to legible html
by BetaSteward
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
4 posts
• Page 1 of 1
[Script] Reformat log files to legible html
by Forty-Bot » 05 Jul 2015, 15:01
I wanted to view my game logs in a more viewing-friendly way than html-ish, so I made a bash one-liner which adds linebreaks and a sensible background color.
- Code: Select all
for file in *.txt; do cat "${file}"|sed ':a;N;$!ba;s/\n/\<br \/\>\n/g;s/\<body\>/body bgcolor\=\"\#222222\"/g' > "${file%%.*}.html"; done
Re: [Script] Reformat log files to legible html
by LevelX » 05 Jul 2015, 17:16
It's a thing already longer on my list of tasks to cut the HTML and linebreaks to make the logs better readable.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: [Script] Reformat log files to legible html
by Laqutis » 06 Jul 2015, 12:02
thx for the conversion bash file
. When i first found the game logs I was always under the assumption that a replay feature was "in the pipeline" but not implemented yet cause it seemed like the files were meant to be read by a program not a human reader lol
maybe someone could do the same for windows platforms as unless i am mistaken this is for linex/unix machines right ?

maybe someone could do the same for windows platforms as unless i am mistaken this is for linex/unix machines right ?
Re: [Script] Reformat log files to legible html
by Forty-Bot » 06 Jul 2015, 20:24
I mean, you could always install cygwin. It's just standard unix utilities.Laqutis wrote:maybe someone could do the same for windows platforms as unless i am mistaken this is for linex/unix machines right ?
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 35 guests