Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

now it wurks

  • Loading branch information...
commit 66e1d2f7bee5a564cf0914674fa2d49aec4752f7 1 parent d94ecbc
@bobuk authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 contrib/pangeya
View
10 contrib/pangeya
@@ -17,19 +17,17 @@ def steganoText(text, code, lang='ru'):
code_i = get_code_iter(code)
fin = []
repl = replacers[lang]
- rw = { l[0]:l[1] for l in zip(repl[0] + repl[1], repl[1]+repl[0])}
+ rw = { l[0]:l[1] for l in zip(repl[0], repl[1])}
for x in text:
t = (rw[x] if next(code_i) else x) if x in rw.keys() else x
- if t != x:
- print (t, x)
- else:
- print (x)
+ fin.append(t)
return ''.join(fin)
def main(args):
code = ' '.join(args) if args else 'bobuk'
block = sys.stdin.read()
- sys.stdout.write(steganoText(block, code))
+ text = steganoText(block, code)
+ sys.stdout.write(text)
if __name__ == '__main__':
main(sys.argv[1:])
Please sign in to comment.
Something went wrong with that request. Please try again.