Skip to content

Commit

Permalink
strencode: Remove --file parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmMoltony committed Feb 4, 2024
1 parent 4124685 commit 0857ea2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scripts/strencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def print_usage():
"""
Print script usage
"""
print("Usage: python strencode.py <string to convert> or --file <file to convert>")
print("Usage: python strencode.py <string to convert>")


def encode(str_ru: str):
Expand Down Expand Up @@ -123,13 +123,7 @@ def main():
print_usage()
sys.exit(1)

content = ""
if argv[1] == "--file":
with open(argv[2], "r", encoding="utf-8") as f:
content = f.read()
else:
content = " ".join(argv[1:])

content = " ".join(argv[1:])
print(encode(content))


Expand Down

0 comments on commit 0857ea2

Please sign in to comment.