Use pipeable.stdout instead of print.

This commit is contained in:
voussoir 2023-09-13 19:29:55 -07:00
parent a40dff9f49
commit db2fab6628
2 changed files with 4 additions and 3 deletions

View file

@ -5,13 +5,14 @@ import argparse
import pyperclip
import sys
from voussoirkit import pipeable
def clipboard_argparse(args):
if args.output_file:
open(args.output_file, 'w', encoding='utf-8').write(pyperclip.paste())
else:
text = pyperclip.paste()
text = text.replace('\r', '')
print(text)
pipeable.stdout(text)
return 0

View file

@ -1,4 +1,4 @@
from voussoirkit import pipeable
for line in pipeable.go():
print(repr(line))
pipeable.stdout(repr(line))