Work on libgopher

This commit is contained in:
Robert Miles 2018-07-03 00:56:07 -04:00
parent 85c2af7a37
commit 584fc75856
2 changed files with 15 additions and 2 deletions

View File

@ -26,5 +26,15 @@ def figlet(tex,**opts):
ct.append("-"+k)
ct.append(opts[k])
ct.append(tex)
for line in subprocess.check_output(ct).decode("ascii").split("\n"):
text(line)
out(ct)
def command_lines(ct):
for l in subprocess.check_output(ct).decode("ascii").split("\n"):
yield l
def out(ct,f=text):
for l in command_lines(ct):
f(l)
def command_t(ct):
out(ct)

View File

@ -6,3 +6,6 @@ text("")
text("libgopher is a python lib for making")
text("gopher CGI scripts. it defines functions")
text("which allow for easy formatting of output.")
text("")
text("uptime")
command_t(["/usr/bin/uptime"])