Merge pull request #5 from mothe-at/main
Added an option to set the 2-letter language code for the Wikipedia page
This commit is contained in:
@@ -68,9 +68,18 @@ parser.add_argument(
|
||||
default='yes',
|
||||
help="Specify whether to download images (yes or no).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--lang",
|
||||
type=str,
|
||||
default="en",
|
||||
help="The 2-letter language code for the Wikipedia page (default: 'en')."
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Set the language for Wikipedia if provided
|
||||
wikipedia.set_lang(args.lang)
|
||||
|
||||
topic = f"{args.topic}"
|
||||
download_images = args.dl_image == 'yes'
|
||||
|
||||
|
||||
@@ -47,9 +47,19 @@ parser.add_argument(
|
||||
type=str,
|
||||
help="The topic to generate a markdown file for.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--lang",
|
||||
type=str,
|
||||
default="en",
|
||||
help="The 2-letter language code for the Wikipedia page (default: 'en')."
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Set the language for Wikipedia if provided
|
||||
wikipedia.set_lang(args.lang)
|
||||
|
||||
topic = f"{args.topic}"
|
||||
|
||||
generate_markdown(topic)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user