diff --git a/man/parser_standard_options.py b/man/parser_standard_options.py index 6d3c3431908..77d7dd029a7 100644 --- a/man/parser_standard_options.py +++ b/man/parser_standard_options.py @@ -14,7 +14,6 @@ import sys from typing import IO, TYPE_CHECKING -from urllib.request import urlopen from collections import defaultdict if TYPE_CHECKING: @@ -311,11 +310,6 @@ def _repr_html_(self): if __name__ == "__main__": - URL = ( - "https://raw.githubusercontent.com/OSGeo/grass/main/" - "lib/gis/parser_standard_options.c" - ) - parser = argparse.ArgumentParser( description="Extract GRASS default options from link." ) @@ -327,19 +321,12 @@ def _repr_html_(self): choices=["html", "csv", "grass", "markdown"], help="Define the output format", ) - parser.add_argument( - "-l", - "--link", - default=URL, - dest="url", - type=str, - help="Provide the url with the file to parse", - ) parser.add_argument( "-t", "--text", dest="text", help="Provide the file to parse", + required=True, ) parser.add_argument( "-o", @@ -371,7 +358,7 @@ def _repr_html_(self): if args.output is not None else contextlib.nullcontext(sys.stdout) ) as outfile, - open(args.text) if args.text is not None else urlopen(args.url) as cfile, + open(args.text) as cfile, ): options = OptTable(parse_options(cfile.readlines(), startswith=args.startswith)) outform = args.format