Skip to content

Commit 8e154ca

Browse files
committed
refactor: simplify CLI - remove -t flag, use -l to enable translation
1 parent 0c264dc commit 8e154ca

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

app/summarizer.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ def setup_argparse():
1515
"-u", "--url", required=True, help="URL of the document to summarize"
1616
)
1717
parser.add_argument(
18-
"-t", "--translate", action="store_true",
19-
help="Translate the summary to a target language"
20-
)
21-
parser.add_argument(
22-
"-l", "--language", default="Spanish",
23-
help="Target language for translation (default: Spanish)"
18+
"-l", "--language",
19+
help="Target language for translation (if specified, translation is enabled)"
2420
)
2521
return parser.parse_args()
2622

@@ -95,8 +91,8 @@ def main():
9591
print(summary)
9692
print()
9793

98-
# Translate if requested
99-
if args.translate:
94+
# Translate if language is specified
95+
if args.language:
10096
print("=" * 60)
10197
print(f"TRANSLATION TO {args.language.upper()}")
10298
print("=" * 60)

0 commit comments

Comments
 (0)