Commit 68898cf0 authored by Steve Goering's avatar Steve Goering

fix

parent 2d209be8
......@@ -108,12 +108,16 @@ def get_keys_startswith(dictionary, searchkey):
def get_random_msg():
os.system("wget -qO - http://www.asciiartfarts.com/random.cgi | sed -n '/<pre>/,/<\/pre>/p' | sed -n '/<table*/,/<\/table>/p' | sed '1d' | sed '$d'")
cmd = "wget -qO - http://www.asciiartfarts.com/random.cgi | sed -n '/<pre>/,/<\/pre>/p' | sed -n '/<table*/,/<\/table>/p' | sed '1d' | sed '$d'"
import subprocess
output = subprocess.check_output(cmd, shell=True).decode("ascii")
from html import unescape
return unescape(output)
def main(args):
lInfo("read config")
get_random_msg()
lInfo("\n" + get_random_msg())
# read config file
try:
config = json.loads(read_file(os.path.dirname(os.path.realpath(__file__)) + "/config.json"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment