F3Nation-Community / PAXminer

PAXminer is a set of tools to automatically pull, parse, capture, and store workout information from F3 Beatdowns. Check it out! Any and all contributions are welcome.
GNU General Public License v3.0
6 stars 5 forks source link

Smarter backblast detection #22

Closed evanpetzoldt closed 2 months ago

evanpetzoldt commented 7 months ago

It would be nice to close the loop on the issue of PAXminer trying to scrape any post that starts with "backblast"... This is a common mistake, and causes a lot of confusion. I would recommend that if a post has a trigger word but doesn't match on anything else (the DATE:, PAX:, etc lines) that we ignore. Or, we could say it has to be at least __ characters long.

Alternatively, maybe just a hint in the error message would suffice "hey, you may have accidentally started a message with 'backblast'"

farrellw commented 7 months ago

Right now, I think it's searching the entire string for backblast. Not even the first few words. We could probably get almost all of the way there by only looking at the first 40 characters of the string, or first line only.

farrellw commented 7 months ago

There is an actual minimum right now. 32 characters long for a full message, and has to contain some word similar to slackblast or backblast.

What do we think the logic should be.

length 32 ( or 40? ) 
AND 
contains backblast like word 
AND ( 
 AO: in backblast OR PAX: in backblast OR Date: in backblast OR Q: in backblast
farrellw commented 2 months ago

Deployed and running @evanpetzoldt.