Upvote Upvoted 11 Downvote Downvoted
Another (online) log combiner (as userscript).
posted in Projects
1
#1
0 Frags +

Hello,
there are already quite some log combiners around, but a friend pointed out to me, that there are no real quick online log combiners around anymore, and that the python log combiner I wrote is difficult to first time set up.

So I thought a bit about it and got to the conclusion that the simplest solution would be a userscript directly for logs.tf => Meaning I wrote one in the last 2 days (based on my python version).

You can see the result as a single image here:

https://i.imgur.com/PvbewME.png

or a quick video on how to use and install it here.

It is available on my github page.

Now you may ask why should you use it instead of alternatives? - So here a quick list of advantages:

  • Installed as a userscript, meaning you are not dependent on a third party hoster but it is directly integrated into logs.tf (meaning you also don't need to copy URL's)
  • You do not need to setup any installation/environment like Java or Python
  • It automatically tries to fill in the map name for you (generated using the maps of the logs)
  • It tries to reduce logs to the important parts (for log parsing) so the resulting combined file is smaller than other log combiners
  • No need for an API key (although it requires the user to be logged in at least once with the script activated)

If you have any ideas / questions / suggestions feel free to tell me.

Changelog:

Show Content

0.1.6
Improved:
  • Further log minifying was replaced with an "advanced" algorithm which allows the accuracy stat to survive but still greatly minifies the log, it is now enabled by default - Be aware you lose up to 1% accuracy with every log added due to potential rounding errors
  • Now using a TamperMonkey function instead of the default window.open to prevent the pop up blocker from blocking openening the newly created log
  • Error messages are now more clear (it will tell you if the log was too big and tell you the error status code on http errors)

0.1.5
Improved:
  • You can now click the link in the footer to open a settings menu, there you can set a custom API key (which is not your own) and enable or disable further log minifying (which is disabled by default now) If you further minify the log you lose the accuracy stat

0.1.4
Improved:
  • If the user never generated a API key yet, the script will automatically generate one for him. (Also gets a key if it was previously wrong)

Notice:
Additionally the namespace changed here, so you have to reinstall the script and remove the old version

0.1.3
Improved:
  • If you are logged in at least once, the userscript will save your API key, if the script has an API key but no user is logged in, it will use the key instead for uploading. Like before if there is no user logged in or no API key most of the functionality will be hidden
Fixed:
  • A bug which made logs unreadable for the log parser (by adding an unwanted undefined)

0.1.2
Improved:
  • You can now also add and remove logs directly on the log page (instead of only in the overview list)
  • Logs on the uploads page are now correctly handled (for whatever reason you would combine logs from there)

0.1.1
Improved:
  • Prevent pressing the upload button multiple times
Hello,
there are already quite some log combiners around, but a friend pointed out to me, that there are no real quick online log combiners around anymore, and that the [url=https://github.com/NetroScript/Jacks-TF2LogCombiner]python log combiner[/url] I wrote is difficult to first time set up.

So I thought a bit about it and got to the conclusion that the simplest solution would be a userscript directly for logs.tf => Meaning I wrote one in the last 2 days (based on my python version).

You can see the result as a single image here:
[img]https://i.imgur.com/PvbewME.png[/img]

or a quick video on how to use and install it [url=https://streamable.com/a1b8v]here[/url].

It is available on my [url=https://github.com/NetroScript/Jacks-LogsTF-On-Page-Combiner]github page[/url].

Now you may ask why should you use it instead of alternatives? - So here a quick list of advantages:

[list]
[*] Installed as a userscript, meaning you are not dependent on a third party hoster but it is directly integrated into logs.tf (meaning you also don't need to copy URL's)
[*] You do not need to setup any installation/environment like Java or Python
[*] It automatically tries to fill in the map name for you (generated using the maps of the logs)
[*] It tries to reduce logs to the important parts (for log parsing) so the resulting combined file is smaller than other log combiners
[*] No need for an API key (although it requires the user to be logged in at least once with the script activated)
[/list]

If you have any ideas / questions / suggestions feel free to tell me.

[i][b]Changelog:[/b][/i]
[spoiler]

[b]0.1.6[/b]
Improved:
[list]
[*] Further log minifying was replaced with an "advanced" algorithm which allows the accuracy stat to survive but still greatly minifies the log, it is now enabled by default - Be aware you lose up to 1% accuracy with every log added due to potential rounding errors
[*] Now using a TamperMonkey function instead of the default window.open to prevent the pop up blocker from blocking openening the newly created log
[*] Error messages are now more clear (it will tell you if the log was too big and tell you the error status code on http errors)
[/list]

[b]0.1.5[/b]
Improved:
[list]
[*] You can now click the link in the footer to open a settings menu, there you can set a custom API key (which is not your own) and enable or disable further log minifying (which is disabled by default now) If you further minify the log you lose the accuracy stat
[/list]

[b]0.1.4[/b]
Improved:
[list]
[*] If the user never generated a API key yet, the script will automatically generate one for him. (Also gets a key if it was previously wrong)
[/list]

[u][b]Notice:[/b][/u]
Additionally the namespace changed here, so you have to reinstall the script and remove the old version

[b]0.1.3[/b]
Improved:
[list]
[*] If you are logged in at least once, the userscript will save your API key, if the script has an API key but no user is logged in, it will use the key instead for uploading. Like before if there is no user logged in or no API key most of the functionality will be hidden
[/list]
Fixed:
[list]
[*] A bug which made logs unreadable for the log parser (by adding an unwanted undefined)
[/list]

[b]0.1.2[/b]
Improved:
[list]
[*] You can now also add and remove logs directly on the log page (instead of only in the overview list)
[*] Logs on the uploads page are now correctly handled (for whatever reason you would combine logs from there)
[/list]

[b]0.1.1[/b]
Improved:
[list]
[*] Prevent pressing the upload button multiple times
[/list]
[/spoiler]
2
#2
2 Frags +

Well done. :3

Well done. :3
3
#3
2 Frags +

:3

:3
4
#4
2 Frags +

:3

:3
5
#5
1 Frags +

Good job. :3
It would be nice if you could make it combine accuracy if possible.

The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394179

Good job. :3
It would be nice if you could make it combine accuracy if possible.

The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394179
6
#6
2 Frags +
R3mmyGood job. :3
It would be nice if you could make it combine accuracy if possible.

The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394179

Good point, currently it removes that too to make the log smaller (shot_hit and shot_fired) - when I have time for it I will make an options menu where you can enter an API key and a toggle box for decreased log size (so by default accuracy will be kept intact)

[At least I assume they are used for that]

[quote=R3mmy]Good job. :3
It would be nice if you could make it combine accuracy if possible.

The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394179[/quote]

Good point, currently it removes that too to make the log smaller (shot_hit and shot_fired) - when I have time for it I will make an options menu where you can enter an API key and a toggle box for decreased log size (so by default accuracy will be kept intact)

[At least I assume they are used for that]
7
#7
1 Frags +
R3mmyGood job. :3
It would be nice if you could make it combine accuracy if possible.

The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394179

The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.

[quote=R3mmy]Good job. :3
It would be nice if you could make it combine accuracy if possible.

The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394179[/quote]

The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.
8
#8
1 Frags +
Jack_5515The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.

Well done on updating it quickly.
However on the previously mentioned logs It would give me an error when trying to add the accuracy stat
"An error happened on the request. -SyntaxError: Unexpected token < in JSON at position 0"

I deleted the combined logs when trying to get the accuracy stat so here are the logs again
The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394462

[quote=Jack_5515]
The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.[/quote]

Well done on updating it quickly.
However on the previously mentioned logs It would give me an error when trying to add the accuracy stat
"An error happened on the request. -SyntaxError: Unexpected token < in JSON at position 0"

I deleted the combined logs when trying to get the accuracy stat so here are the logs again
The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394462
9
#9
0 Frags +
R3mmyJack_5515The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.

Well done on updating it quickly.
However on the previously mentioned logs It would give me an error when trying to add the accuracy stat
"An error happened on the request. -SyntaxError: Unexpected token < in JSON at position 0"

I deleted the combined logs when trying to get the accuracy stat so here are the logs again
The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394462

This seems to be quite the misleading error. I also tried to combine the logs you have and looking at the network and console output you can see the server responds with a 413 http status code, meaning

REQUEST ENTITY TOO LARGE

. The log you try to combine would be 15.16 MB big and that size is most likely above the upload limit. (It once was 5MB but I think it is bigger than that now, although I don't know the exact size). I will look into maybe a more clear error message (f.e. something like Log was too big to upload). I will also check again if there could be more done to minimize the log (I already know a way, but it is rather dirty and more like a hack and not good practice).

[quote=R3mmy][quote=Jack_5515]
The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.[/quote]

Well done on updating it quickly.
However on the previously mentioned logs It would give me an error when trying to add the accuracy stat
"An error happened on the request. -SyntaxError: Unexpected token < in JSON at position 0"

I deleted the combined logs when trying to get the accuracy stat so here are the logs again
The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394462[/quote]

This seems to be quite the misleading error. I also tried to combine the logs you have and looking at the network and console output you can see the server responds with a 413 http status code, meaning [code]REQUEST ENTITY TOO LARGE[/code]. The log you try to combine would be 15.16 MB big and that size is most likely above the upload limit. (It once was 5MB but I think it is bigger than that now, although I don't know the exact size). I will look into maybe a more clear error message (f.e. something like Log was too big to upload). I will also check again if there could be more done to minimize the log (I already know a way, but it is rather dirty and more like a hack and not good practice).
10
#10
0 Frags +

Looking at your specific log I think there is some data which is removable which won't lose any stats, I will do a testing version of the log combiner and see if all your important stats stay and it is uploadable.

Looking at your specific log I think there is some data which is removable which won't lose any stats, I will do a testing version of the log combiner and see if all your important stats stay and it is uploadable.
11
#11
0 Frags +
R3mmyJack_5515The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.

Well done on updating it quickly.
However on the previously mentioned logs It would give me an error when trying to add the accuracy stat
"An error happened on the request. -SyntaxError: Unexpected token < in JSON at position 0"

I deleted the combined logs when trying to get the accuracy stat so here are the logs again
The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394462

Please install the most recent version (version 0.1.6) and then try again. (The newest version now removes shots_hit and shots_fired, but only in such a proportion that the accuracy remains the same. Well you lose up to 1% to rounding errors per added log, but I think that should be fine considering it enables you to combine f.e. your 4 logs).

And to be honest, I am questioning myself why I didn't have the idea before which I now use to minify the log.
While trying to reduce the log I found methods to get the size down up till 11.2 MB, until I got the idea which is implemented now which doesn't use questionable tricks to slim the log size and still is almost sub 5 MB. (Although I still have the code, so there is potential for even smaller logs should the future need it).

[quote=R3mmy][quote=Jack_5515]
The latest version (0.1.5) should work correctly now, feel free to try it out. (You now have a settings menu when clicking the Jacks Log Combiner link on the bottom right).

To install just open the userscript page again on GitHub.[/quote]

Well done on updating it quickly.
However on the previously mentioned logs It would give me an error when trying to add the accuracy stat
"An error happened on the request. -SyntaxError: Unexpected token < in JSON at position 0"

I deleted the combined logs when trying to get the accuracy stat so here are the logs again
The logs used in combining
http://logs.tf/2393547
http://logs.tf/2393578
http://logs.tf/2393595
http://logs.tf/2393638

The combined logs
http://logs.tf/2394462[/quote]

Please install the most recent version (version 0.1.6) and then try again. (The newest version now removes shots_hit and shots_fired, but only in such a proportion that the accuracy remains the same. Well you lose up to 1% to rounding errors per added log, but I think that should be fine considering it enables you to combine f.e. your 4 logs).

And to be honest, I am questioning myself why I didn't have the idea before which I now use to minify the log.
While trying to reduce the log I found methods to get the size down up till 11.2 MB, until I got the idea which is implemented now which doesn't use questionable tricks to slim the log size and still is almost sub 5 MB. (Although I still have the code, so there is potential for even smaller logs should the future need it).
12
#12
0 Frags +

That was 100x faster fix that i would ever expect, thank you and well done.
I can finally now flex my trash aim with this!

That was 100x faster fix that i would ever expect, thank you and well done.
I can finally now flex my trash aim with this!
Please sign in through STEAM to post a comment.