From 82b73b1455570e260f5c0d3f757f1fee9c733556 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 28 Mar 2018 22:54:02 +0200 Subject: Initial --- bigletters.py | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 404 insertions(+) create mode 100755 bigletters.py diff --git a/bigletters.py b/bigletters.py new file mode 100755 index 0000000..eaed4ee --- /dev/null +++ b/bigletters.py @@ -0,0 +1,404 @@ +#!/usr/bin/env python +import sys + +table = r""" + + + + +| +| +. + +,, + + + + N +=O= + N + +.|' +'|\ +.|/ + +o / + / +/ o + +/\ +|/. +\X + +| + + + + / + | + \ + +\ +| +/ + +\|/ +-*- +/|\ + + | +-+- + | + + + +J + + +--- + + + + +o + + / + / +/ + +.^^. +|--| +'__' + +/| + | +_|_ + +/^\ + / +/__ + +^^\ +--< +__/ + +/ | ++-+ + | + +|^^ +'-. +__' + + / ++-. +'_' + +^^/ +-+ +/ + +.^. +>-< +'_' + +.^. +'-+ + / + +o + +o + +o + +J + + / +< + \ + +___ +--- + + +\ + > +/ + +^^\ + -' + o + +/^\ +|O' +\_/ + +.^^. +|__| +| | + +|^^) +|--: +|__) + +.^^ +| +'__ + +T^^. +| | +|__' + +|^^ +|-- +|__ + +|^^ +|-- +| + +/^^^ +| -+ +\__| + +| | +|--| +| | + +^|^ + | +_|_ + +^^| + | +._' + +| / +|+ +| \ + +| +| +|__ + +|\/| +| | +| | + +|\ | +| \| +| | + +.^^. +| | +'__' + +|^^\ +|--' +| + +/^^\ +| ./ +\_/\ + +T^^\ +|-+' +| \ + +/^^\ +\--. +.__/ + +^T^ + | + | + +| | +| | +'__' + +\ / + \ / + V + +| | +' . ' + V V + +\ / + X +/ \ + +\ / + Y + | + +^^/ + / +/__ + + |^ + | + |_ + +\ + \ + \ + +^| + | +_| + +.^. + + + + + +___ + +\ + + + +.^^. +|__| +| | + +|^^) +|--: +|__) + +.^^ +| +'__ + +T^^. +| | +|__' + +|^^ +|-- +|__ + +|^^ +|-- +| + +/^^^ +| -+ +\__| + +| | +|--| +| | + +^|^ + | +_|_ + +^^| + | +._' + +| / +|+ +| \ + +| +| +|__ + +|\/| +| | +| | + +|\ | +| \| +| | + +.^^. +| | +'__' + +|^^\ +|--' +| + +/^^\ +| ./ +\_/\ + +T^^\ +|-+' +| \ + +/^^\ +\--. +.__/ + +^T^ + | + | + +| | +| | +'__' + +\ / + \ / + V + +| | +' . ' + V V + +\ / + X +/ \ + +\ / + Y + | + +^^/ + / +/__ + + /^ + > + \_ + +| +| +| + +^\ + < +_/ + + +.^.^ + +"""; + +table = [s.split("\n") for s in table[1:-1].split("\n\n")] +for let in table: + assert len(let) == 3 + m = max(len(l) for l in let) + for i in range(len(let)): + let[i] = (let[i] + " "*m)[:m] + +for line in sys.stdin: + rows = ["", "", ""] + for c in line: + if ord(c) < 32 or ord(c) >= 127: + continue + + let = table[ord(c) - 32] + for i in range(3): + rows[i] += " " + let[i] + + for i in range(3): + print(rows[i]) -- cgit v1.2.3-70-g09d2