Increase nice value of Markov bot

This commit is contained in:
Klaus-Uwe Mitterer 2017-02-21 16:38:33 +01:00
parent 654954de92
commit 1ce7470fac

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import dbtools, setuptools, twitools import dbtools, setuptools, twitools
import argparse, html, markovify, nltk, operator, random, re, string, sys import argparse, html, markovify, nltk, operator, os, random, re, string, sys
class Possy(markovify.NewlineText): class Possy(markovify.NewlineText):
def word_split(self, sentence): def word_split(self, sentence):
@ -37,4 +37,5 @@ def markovifyText(text):
return Possy(text).make_short_sentence(130).replace("@", "@") return Possy(text).make_short_sentence(130).replace("@", "@")
if __name__ == "__main__": if __name__ == "__main__":
os.nice(5)
twitools.tweet(markovifyText(getText()), section = setuptools.MARKOV) twitools.tweet(markovifyText(getText()), section = setuptools.MARKOV)