Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Announcement Window, a Python announcement filter.  (Read 44828 times)

Algee

  • Escaped Lunatic
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #15 on: November 09, 2015, 09:40:19 pm »

Ok, i've released version 1.1b. It has a few new features and it works fine with the old (python 2.7.5) and new (2.7.10) LNP package.

I've also hacked together a method to locate gamelog.txt when it's opened for the first time from a LNP utility folder.

Spoiler: Changelog (click to show/hide)
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #16 on: November 09, 2015, 10:09:22 pm »

Very nice!  I'm always a fan of things I don't need to configure at all :D
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

riskpeep

  • Escaped Lunatic
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #17 on: January 14, 2016, 12:10:36 pm »

Recent downloads of the windows lazy newb pack have been throwing an alert from my Symantec Endpoint Protection client that announcementwindow.exe potentially contains a trojan.  Downloading the executables provided on github (https://github.com/NuAoA/AnnouncementWindow/releases) show the same thing.  I haven't yet tried compiling locally, but is anyone else seeing this same behavior.  I'm not a fan of SEP, but my employer makes me use it.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #18 on: January 14, 2016, 01:29:50 pm »

That's the case with a lot of executables built with PyInstaller, it seems - PyLNP tends to cause issues as well. My best explanation is that those executables contain what's essentially a zip file that unpacks into a temporary folder so python can have the directory structure it needs, which might look suspicious to some AV programs. If you're really suspicious, you can install python and run announcement window from its source code instead of using the pre-built executable.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #19 on: January 14, 2016, 01:40:02 pm »

That's the case with a lot of executables built with PyInstaller, it seems - PyLNP tends to cause issues as well. My best explanation is that those executables contain what's essentially a zip file that unpacks into a temporary folder so python can have the directory structure it needs, which might look suspicious to some AV programs. If you're really suspicious, you can install python and run announcement window from its source code instead of using the pre-built executable.
And the AV will probably still find it suspicious.  For AV systems that crowdsource trust, whitelisting the app will signal to your vendor that it's okay.  If enough users do that, the next AV update will extend that whitelist to everyone.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

lethosor

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #20 on: January 14, 2016, 04:15:43 pm »

I haven't heard of any instances of that happening when running the source code with Python (for AW or PyLNP), so I'm pretty sure the AV software is complaining about the zip-expansion behavior, or something else generated by PyInstaller, rather than actual contents of the python files.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

KaelGotDwarves

  • Bay Watcher
  • [CREATURE:FIRE_ELF]
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #21 on: February 11, 2016, 03:33:38 am »

Been using this on my stream http://www.twitch.tv/kaelgotrice So just wanted to say thanks. Now most of the DF streamers on Twitch are using it as well. It's great, especially since it auto-scrolls unlike most others. Thank Armok.

However a lot of cancellation filters are still missing, and deaths will not show up at all until notification of body is found which is bad - even deaths which are witnessed are not reported. Does anyone know how to fix this?
Re: Announcement Window, a Python announcement filter.
« Reply #22 on: July 02, 2017, 04:42:40 am »

Sorry for bumping an old topic but is it working on 43.05 64bit version?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #23 on: July 02, 2017, 07:11:18 am »

It should be, because it only reads from gamelog.txt, which hasn't changed much in a while (besides new types of announcements).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Nihilist

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #24 on: March 12, 2018, 06:30:31 pm »

This is a great little app.

Is there anyway to increase the font size? It's just a wee bit too small for my play distance.

Edit: I figured it out. Modifying lines 25 and 49 in gui.dat from I10 to I20 double the font size.
« Last Edit: March 16, 2018, 03:31:11 am by Nihilist »
Logged

Death Dragon

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #25 on: December 13, 2018, 10:15:00 pm »

Love this utility. Does anyone per chance have an updated filters.txt that supports all the changes to the combat messages? I'm currently making my own, but it would be nice to know if someone else has already done it.

Edit:
Here's the updated filters.txt I made:
https://pastebin.com/y2uRMR7L
It's still missing some message lines, but it's way better than the outdated one the program comes with at least.
By the way, in my version, I give the [battle_attacks] lines a red color and the [battle] lines orange. That makes it very easy to see where the actual attacks are and what additional effects they had.
This is my filters.dat file, if anyone wants it:
https://pastebin.com/yPgmgYQq

Edit 2:
Updated the pastebins.
« Last Edit: December 31, 2018, 01:53:28 pm by Death Dragon »
Logged

Death Dragon

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #26 on: December 31, 2018, 02:11:05 pm »

I wish the program could be changed to make it possible to use multiple different colors or formatting in one line, like:
Different brightness:
The goblin spearman stabs the wood burner in the right hand with his ({iron spear}), tearing apart the fat through the x(pig tail right mitten)x!
Use of bold and italics formatting:
The goblin spearman stabs the wood burner in the right hand with his ({iron spear}), tearing apart the fat through the x(pig tail right mitten)x!
Different colours:
The goblin spearman stabs the wood burner in the right hand with his ({iron spear}), tearing apart the fat through the x(pig tail right mitten)x!

I've always wanted highlighted sections in the combat logs like that. I haven't done any coding in ages though, so I dunno if I can figure out how to implement that functionality into the python code on my own.
Logged

falcn

  • Bay Watcher
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #27 on: January 06, 2019, 09:05:59 pm »

So I tried to update this app for 44.12 before including it into a pack that I made (looks like Lazy Mac Pack is not maintained anymore).
http://www.bay12forums.com/smf/index.php?topic=158322.msg7911386#msg7911386
Updated filters.txt to the point where I don't see a single unrecognized message while parsing entire game log of 3 years for a busy fort.
filters.txt
https://pastebin.com/QMTT11bb
Changed some colors, although it's still work in progress
filters.dat
https://pastebin.com/8PJEhfXD
There is also a minor bug that locks all menu items after a first modal window is open and closed. I tried to fix it but failed.

Love this utility.

I wish the program could be changed to make it possible to use multiple different colors or formatting in one line, like:
It would be great. Take a look at DF Log, it already does all that.
It might also be useful to color damage done to enemy units and damage done to friendly units differently, much like in-game reports.
For fortress mode, damage done by (+)dwarf to a non-dwarf in blue color, and damage by non-dwarf to a dwarf in red would be correct 95% of times. Dwarf vs dwarf should be all red.
Unfortunately, projectiles are anonymous, and there are things like necro dwarves, goblin civ dwarves, hostile civ dwarves attacking your pets, they will be color-coded incorrectly.
Another option is to generate extended battle log using a custom dfhack plugin.
Logged

BrachystochroneSD

  • Escaped Lunatic
    • View Profile
Re: Announcement Window, a Python announcement filter.
« Reply #28 on: March 20, 2019, 11:49:36 am »

Hi everyone, I've just update the app to implement a word coloring feature.

Screenshot of the result

As you can see, it's not perfect right now, and it needs some tweaking (I'm working on it right now, tell me if you test it and find any issue). The addition feature let you customize the colors in the Settings.cfg text file and add words to be colored in the wordcolor.txt. I tried to explain it in the readme but I don't know if I did it properly.

Here's the github link of the fork. There's also a Windows (exe) release (release tab of the github page, version 1.2).

I'm also planning to implement icons (also customizable) and "background" highlighting, here's a little preview. But for know I'll try to make the simple coloring working properly.
I will also add the filters.txt and filters.dat of falcn, the default one seems to be outdated. Finally, the wordcolor.txt need to be supplemented with more words, I'm trying to be as exhaustive as possible for default settings.
Logged

Romeofalling

  • Bay Watcher
    • View Profile
    • The Art of Amul
Re: Announcement Window, a Python announcement filter.
« Reply #29 on: May 22, 2020, 02:38:57 pm »

Hello! I'm so happy to see Announcement Window back in the Lazy Mac Pack. I love this utility.

For some reason, it's not saving my font adjustments. My old man eyes just can't read the 12pt font on my second monitor. Is there a config file that I can edit so that it uses my preferences on startup?
Logged
Pages: 1 [2] 3