Exemplo n.º 1
0
def printline(input):
    debug(2, "Writing line '" + input + "'")
    writeraw("[-]")
    glob.bitcounter = 0
    for x in range(0, len(input)):
        printchar(input[x])
    printchar('\n')
Exemplo n.º 2
0
def portrait(imagepath):
  debug(3, "Writing portrait image at '"+imagepath+"'")
  if not os.path.exists(imagepath):
    print("ERROR: file not found: "+imagepath)
  image=asciify.runner(imagepath)
  writeraw("[-]")
  glob.bitcounter=0
  
  writeraw(">")
  storechar(chr(27))
  writeraw(">")
  storechar('[')
  writeraw(">")
  storechar('1')
  writeraw(">")
  storechar('C')
  writeraw("<<<<")

  printtext(chr(27)+"[f")
  for x in range(0,len(image)):
    if (image[x]=='@'):
      writeraw(">.>.>.>.<<<<")
    else:
      printchar(image[x])
    if (x==138):
      printtext(chr(27)+"E")
  writeraw(">[-]>[-]>[-]>[-]<<<<")
  flushcode()
Exemplo n.º 3
0
def printframe(path):
    debug(3, "Writing prerendered image at '" + path + "'")
    if not os.path.exists(path):
        print("ERROR: file not found: " + path)
    f = open(path, "r")
    printtext(chr(27) + "[f")
    writeraw("[-]")
    for c in f.read():
        if c == 'b':
            writeraw("<.>")
            writeraw("++++++[-]")  #Idle
        elif c == 'w':
            writeraw(">[.>]<[<]")
        else:
            glob.bitcounter = 0
            printchar(c)
            writeraw("[-]")
    f.close
    flushcode()
Exemplo n.º 4
0
def skipline(i):
    for x in range(0, i):
        printchar('\n')
Exemplo n.º 5
0
def printtext(input):
  debug(2, "Writing text '"+input+"'")
  writeraw("[-]")
  glob.bitcounter=0
  for x in range(0,len(input)):
    printchar(input[x])