![]() |
|
[Ruby] Micro size Auditor [Updated] - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: [Ruby] Micro size Auditor [Updated] (/Thread-Ruby-Micro-size-Auditor-Updated) |
[Ruby] Micro size Auditor [Updated] - Inori - 03-24-2015 A long time ago, when I started learning Ruby, I made a censor that was upwards of 200 lines. I made this in about 5 minutes and chopped it down to 13, without copyright and credit. I plan on adding a wordlist (possibly in a separate txt so it can be customized) Anyway, enjoy! Code: #Micro auditor by Nightc||ed, ©2015
puts "Enter string:"
text = gets.chomp
puts "Text to audit:"
audit = gets.chomp
words = text.split(" ")
words.each do |word|
if word == audit
print "[snip] "
else
print word + " "
end
end
sleepUpdate: -Swapped user inputted omitting for wordlist Code: Code: #by Nightc||ed, ©2015
puts "Enter string: "
text = gets.chomp
redact = File.read("wordlist.txt").split(" ")
words = text.split(" ")
system "cls"
puts "Result:"
words.each do |word|
if redact.include? word
print "[snip] "
else
print word + " "
end
end
sleepcurrent wordlist: Spoiler: Highly profane (obviously)Code: anal anus arse ass ballsack balls bastard bitch blowjob blow job bollock bollocks bollok bolloks boner boob buttplug cock coon cunt damn dick dildo dyke fag fellate fellatio felching fuck fudgepacker flange Goddamn hell jerk jizz knobend muff nigger nigga penis piss prick pube pussy queer scrotum sex shit slut spunk tit tosser turd twat wank whore |