|
|
|
It is currently Thu Apr 18, 2024 6:56 pm
|
|
Page 1 of 1
|
[ 10 posts ] |
|
Run a script on new ads that prompts for "WTS"?
Author |
Message |
delliottg
Site Supporter
Location: Duvall Joined: Thu Mar 17, 2011 Posts: 4604
Real Name: David
|
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) } }
_________________David Unique Treen
|
Wed Aug 26, 2020 2:22 pm |
|
|
Massivedesign
Site Admin
Location: Olympia, WA Joined: Fri Mar 11, 2011 Posts: 38307
Real Name: Dan
|
The new software, when we get around to it, will have strict rules built into the classifieds that require a suffix.
|
Wed Aug 26, 2020 5:43 pm |
|
|
usrifle
Site Supporter
Location: RENTON Joined: Fri Mar 25, 2011 Posts: 20771
Real Name: John
|
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.
_________________ Mr. Q wrote: so basically, if you have to smoke some asshole, make sure they become fertilizer and then Bounce? got it.
Guntrader wrote: Huh, maybe I was an asshole.
NRA Member/RSO SAF 5 Year Donor GOA Member
|
Wed Aug 26, 2020 6:10 pm |
|
|
Massivedesign
Site Admin
Location: Olympia, WA Joined: Fri Mar 11, 2011 Posts: 38307
Real Name: Dan
|
Steve really only has one purpose in life, and that's to police us.
|
Wed Aug 26, 2020 6:19 pm |
|
|
MadPick
Site Admin
Location: Renton, WA Joined: Sun Mar 13, 2011 Posts: 52032
Real Name: Steve
|
Massivedesign wrote: The new software, when we get around to it.... Oh, I'm ready to give my one purpose, any time . . . I wouldn't miss it for a second.
_________________SteveBenefactor Life Member, National Rifle AssociationLife Member, Second Amendment FoundationPatriot & Life Member, Gun Owners of AmericaLife Member, Citizens Committee for the Right to Keep and Bear ArmsLegal Action Supporter, Firearms Policy CoalitionMember, NAGR/NFGRPlease support the organizations that support all of us.Leave it cleaner than you found it.
|
Wed Aug 26, 2020 8:39 pm |
|
|
Sinus211
Site Moderator
Location: Marysville Joined: Thu Mar 22, 2012 Posts: 13503
Real Name: Mike
|
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. Early bumps are my domain dammit!
_________________Licensed/Bonded/Insured Hardwood Floor Installer/Finisher http://www.hardwoodfloorsnw.com/
|
Wed Aug 26, 2020 10:30 pm |
|
|
usrifle
Site Supporter
Location: RENTON Joined: Fri Mar 25, 2011 Posts: 20771
Real Name: John
|
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. Early bumps are my domain dammit! Not with Steve "Working" from home.
_________________ Mr. Q wrote: so basically, if you have to smoke some asshole, make sure they become fertilizer and then Bounce? got it.
Guntrader wrote: Huh, maybe I was an asshole.
NRA Member/RSO SAF 5 Year Donor GOA Member
|
Wed Aug 26, 2020 11:25 pm |
|
|
Massivedesign
Site Admin
Location: Olympia, WA Joined: Fri Mar 11, 2011 Posts: 38307
Real Name: Dan
|
I think Steve leaves us nuggets, so we feel like we are a part of the team too. Or, he's testing us.
|
Thu Aug 27, 2020 5:36 am |
|
|
KeystoneCowboy
Site Supporter
Location: Burlington Joined: Wed Aug 22, 2012 Posts: 5999
Real Name: Kyle
|
Bump
_________________ Looking for: S&W Schofield 2x (.38/357) Coonan 1911 Nemo Omen JM Marlin 39M Tikka T3 Tactical(.308) BAR(.308)
|
Thu Aug 27, 2020 6:53 am |
|
|
Selador
Site Supporter
Location: Index Joined: Thu Aug 23, 2012 Posts: 12963
Real Name: Jeff
|
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!
_________________ -Jeff
How can I help you, and/or make you smile, today?
You are entitled to your opinion. You are not entitled to tell me what mine must be.
Do justice. Love mercy.
“I would rather have questions that can't be answered than answers that can't be questioned.” ~ Richard P. Feynman
|
Thu Aug 27, 2020 9:20 am |
|
|
|
|
Page 1 of 1
|
[ 10 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 76 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|