mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2025-01-03 08:58:32 +00:00
20 lines
431 B
Python
20 lines
431 B
Python
#!/usr/bin/env python
|
|
import argparse
|
|
import fileinput
|
|
import sys
|
|
|
|
from butterfly.escapes import html
|
|
|
|
parser = argparse.ArgumentParser(
|
|
description="Butterfly html converter.\n\n"
|
|
"Output in html standard input.\n"
|
|
"Example: $ echo \"<b>Bold</b>\" | b html",
|
|
formatter_class=argparse.RawTextHelpFormatter)
|
|
|
|
parser.parse_known_args()
|
|
|
|
|
|
with html():
|
|
for line in fileinput.input():
|
|
sys.stdout.write(line)
|