From 840098ff27e9ea68f0760a15954d8ae4407b541b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 15 Feb 2020 13:21:07 +0100 Subject: Add uri argument to ttl_news command This can be used to set the project URI when it can't be had from the wscript, or override the one found there. --- extras/autoship.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extras/autoship.py') diff --git a/extras/autoship.py b/extras/autoship.py index a54eac1..1b817dd 100755 --- a/extras/autoship.py +++ b/extras/autoship.py @@ -385,13 +385,14 @@ def ttl_news_command(): ap.add_argument("--template") ap.add_argument("--unsorted", action="store_true", help="don't sort items") ap.add_argument("--in-format", default="NEWS", choices=["NEWS", "turtle"]) + ap.add_argument("--uri", help="project URI") args = ap.parse_args(sys.argv[2:]) - info = get_project_info() entries = read_news(args.in_path, args.in_format, args.unsorted, True) + uri = args.uri if args.uri else get_project_info()["uri"] write_ttl_news( - entries, args.out_path, template=args.template, subject_uri=info["uri"] + entries, args.out_path, template=args.template, subject_uri=uri ) -- cgit v1.2.1