File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments