Switch to full style
Want / Need a feature added? Have a great idea you would like to share with us? Do so here!
Post a reply

Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 2:22 pm

Nearly every day, several times a day, Steve has to go police the want to sell ads to prompt the sellers to change the title of their ad to include "WTS", or "WTT", or whatever to abide by the rules. I'm sure he enjoys this immensely.

It would seem like it would be easy to write a RegEx that tests each new add title looking for the variants of WTS / WTT, etc. and automatically send a PM to the offending ad writer, and / or auto respond in the thread so Steve doesn't have to do it all day every day.

So as an example using this simple regex: ^WTS|WTT|WTB|FT|FS
You would get a fail on the first two ad titles and a success on the last three on these I've pulled randomly from today

357 Black Talon
Poor mans bullet feeder 9mm. Hornady
WTS Once Fired 7.65x53 Rifle Brass
FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.
WTB: HK P30 LEM NO SAFETY

So pseudocode would go like this:

Code:
//declare a new regex for the strings you want to have in the ad
string re = new Regex("^WTS|WTT|WTB|FT|FS");
//check an array of new ads over the past hour or whatever:
string[] NewAdTitles = {
    "357 Black Talon",
    "Poor mans bullet feeder 9mm. Hornady",
    "WTS Once Fired 7.65x53 Rifle Brass",
    "FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.",
    "WTB: HK P30 LEM NO SAFETY" };
//look for a non-match in the ad title, if the required substrings aren't found somewhere in the string, send reminders to offending authors
foreach(string s in NewAdTitles)
{    if(!re.match(s)
    {
        sendMailToRemindAuthorToFollowRules(s.author);
        autoRespondInAdSoSteveDoesntHaveTo(s)
    }
}

Re: Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 5:43 pm

The new software, when we get around to it, will have strict rules built into the classifieds that require a suffix.

Re: Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 6:10 pm

All the WTS ad's that are wrong and need policing give Steve meaning.
He loves that shit.
Oh, and don't bump your ad early or make any chit chat either. He is on that shit like a Pitbull on a Pork Chop.
You won't even have time to edit once you hit "submit" before the PM comes. :peep:

Re: Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 6:19 pm

Steve really only has one purpose in life, and that's to police us.

Re: Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 8:39 pm

Massivedesign wrote:The new software, when we get around to it....


Image

Oh, I'm ready to give my one purpose, any time . . . I wouldn't miss it for a second.

Re: Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 10:30 pm

usrifle wrote:All the WTS ad's that are wrong and need policing give Steve meaning.
He loves that shit.
Oh, and don't bump your ad early or make any chit chat either. He is on that shit like a Pitbull on a Pork Chop conspiracy theory.
You won't even have time to edit once you hit "submit" before the PM comes. :peep:

Early bumps are my domain dammit! :bitchfight:

Re: Run a script on new ads that prompts for "WTS"?

Wed Aug 26, 2020 11:25 pm

Sinus211 wrote:
usrifle wrote:All the WTS ad's that are wrong and need policing give Steve meaning.
He loves that shit.
Oh, and don't bump your ad early or make any chit chat either. He is on that shit like a Pitbull on a Pork Chop conspiracy theory.
You won't even have time to edit once you hit "submit" before the PM comes. :peep:

Early bumps are my domain dammit! :bitchfight:


Not with Steve "Working" from home. :wink05:

Re: Run a script on new ads that prompts for "WTS"?

Thu Aug 27, 2020 5:36 am

I think Steve leaves us nuggets, so we feel like we are a part of the team too. Or, he's testing us.

Re: Run a script on new ads that prompts for "WTS"?

Thu Aug 27, 2020 6:53 am

Bump

Re: Run a script on new ads that prompts for "WTS"?

Thu Aug 27, 2020 9:20 am

delliottg wrote:Nearly every day, several times a day, Steve has to go police the want to sell ads to prompt the sellers to change the title of their ad to include "WTS", or "WTT", or whatever to abide by the rules. I'm sure he enjoys this immensely.

It would seem like it would be easy to write a RegEx that tests each new add title looking for the variants of WTS / WTT, etc. and automatically send a PM to the offending ad writer, and / or auto respond in the thread so Steve doesn't have to do it all day every day.

So as an example using this simple regex: ^WTS|WTT|WTB|FT|FS
You would get a fail on the first two ad titles and a success on the last three on these I've pulled randomly from today

357 Black Talon
Poor mans bullet feeder 9mm. Hornady
WTS Once Fired 7.65x53 Rifle Brass
FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.
WTB: HK P30 LEM NO SAFETY

So pseudocode would go like this:

Code:
//declare a new regex for the strings you want to have in the ad
string re = new Regex("^WTS|WTT|WTB|FT|FS");
//check an array of new ads over the past hour or whatever:
string[] NewAdTitles = {
    "357 Black Talon",
    "Poor mans bullet feeder 9mm. Hornady",
    "WTS Once Fired 7.65x53 Rifle Brass",
    "FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.",
    "WTB: HK P30 LEM NO SAFETY" };
//look for a non-match in the ad title, if the required substrings aren't found somewhere in the string, send reminders to offending authors
foreach(string s in NewAdTitles)
{    if(!re.match(s)
    {
        sendMailToRemindAuthorToFollowRules(s.author);
        autoRespondInAdSoSteveDoesntHaveTo(s)
    }
}

Dude!

You left out the part where it asks for credit card info, then sends me two bucks!
Post a reply