|
|
@ -16,31 +16,26 @@ p.add_argument('--dry', '-d', action='store_true',
|
|
|
|
help='dry-run: will only print the metadata of each file that '
|
|
|
|
help='dry-run: will only print the metadata of each file that '
|
|
|
|
'will be upload, but does NOT upload')
|
|
|
|
'will be upload, but does NOT upload')
|
|
|
|
p.add_argument('--dir', required=True,
|
|
|
|
p.add_argument('--dir', required=True,
|
|
|
|
help='Full path of the image directory, that you wish to upload')
|
|
|
|
help='Required. Full path of the image directory, that you wish to upload')
|
|
|
|
|
|
|
|
|
|
|
|
p.add_argument('--title', required=True,
|
|
|
|
p.add_argument('--title', required=True,
|
|
|
|
help='Metadata **Title** value of publication. Must not exist yet'
|
|
|
|
help='Required. Must not exist yet in the wiki.')
|
|
|
|
' in the wiki.')
|
|
|
|
|
|
|
|
p.add_argument('--date', required=True,
|
|
|
|
p.add_argument('--date', required=True,
|
|
|
|
help='Metadata **Date** value of publication. Format yyyy/mm/dd '
|
|
|
|
help='Required. Format: yyyy/mm/dd '
|
|
|
|
'For dates without day or mont use 01 as default '
|
|
|
|
'For dates without day or month use 01 as default '
|
|
|
|
'ie. 1986: --date "1986/01/01" '
|
|
|
|
'ie. 1986: --date "1986/01/01" '
|
|
|
|
'March 1985: --date "1984/05/01"')
|
|
|
|
'March 1985: --date "1984/05/01"')
|
|
|
|
p.add_argument('--creator', required=False, action='append', default=[''],
|
|
|
|
p.add_argument('--creator', required=False, action='append', default=[''],
|
|
|
|
help='Metadata **Creator** value(s) of publication. Multiple '
|
|
|
|
help='Multiple values should be SEPARATED BY COMMA')
|
|
|
|
'values should be SEPARATED BY COMMA')
|
|
|
|
p.add_argument('--org', required=False, action='append', default=[''],
|
|
|
|
p.add_argument('--organization', required=False, action='append', default=[''],
|
|
|
|
help='Organization:Multiple values should be SEPARATED BY '
|
|
|
|
help='Metadata **Organization** value(s) of publication. '
|
|
|
|
'COMMA')
|
|
|
|
'Multiple values should be SEPARATED BY COMMA')
|
|
|
|
|
|
|
|
p.add_argument('--format', required=False, action='append', default=[''],
|
|
|
|
p.add_argument('--format', required=False, action='append', default=[''],
|
|
|
|
help='Metadata **Format** value(s) of publication. '
|
|
|
|
help='Multiple values should be SEPARATED BY COMMA')
|
|
|
|
'Multiple values should be SEPARATED BY COMMA')
|
|
|
|
|
|
|
|
p.add_argument('--event', required=False, action='append', default=[''],
|
|
|
|
p.add_argument('--event', required=False, action='append', default=[''],
|
|
|
|
help='Metadata **Event** value(s) of publication. '
|
|
|
|
help='Multiple values should be SEPARATED BY COMMA')
|
|
|
|
'Multiple values should be SEPARATED BY COMMA')
|
|
|
|
|
|
|
|
p.add_argument('--topic', required=False, action='append', default=[''],
|
|
|
|
p.add_argument('--topic', required=False, action='append', default=[''],
|
|
|
|
help='Metadata **Topic** value(s) of publication. '
|
|
|
|
help='Multiple values should be SEPARATED BY COMMA')
|
|
|
|
'Multiple values should be SEPARATED BY COMMA')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO ADD NEW PROPS
|
|
|
|
# TODO ADD NEW PROPS
|
|
|
|
args = p.parse_args()
|
|
|
|
args = p.parse_args()
|
|
|
@ -91,7 +86,7 @@ for n, _file in enumerate(lsimgs):
|
|
|
|
part=n + 1,
|
|
|
|
part=n + 1,
|
|
|
|
partof=len(lsimgs),
|
|
|
|
partof=len(lsimgs),
|
|
|
|
creator=(', ').join(args.creator[1:]),
|
|
|
|
creator=(', ').join(args.creator[1:]),
|
|
|
|
organization=(', ').join(args.organization[1:]),
|
|
|
|
organization=(', ').join(args.org[1:]),
|
|
|
|
format=(', ').join(args.format[1:]),
|
|
|
|
format=(', ').join(args.format[1:]),
|
|
|
|
event=(', ').join(args.event[1:]),
|
|
|
|
event=(', ').join(args.event[1:]),
|
|
|
|
topic=(', ').join(args.topic[1:])
|
|
|
|
topic=(', ').join(args.topic[1:])
|
|
|
@ -113,4 +108,6 @@ for n, _file in enumerate(lsimgs):
|
|
|
|
level='fail')
|
|
|
|
level='fail')
|
|
|
|
|
|
|
|
|
|
|
|
print(f'See image at {pageurl}')
|
|
|
|
print(f'See image at {pageurl}')
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
print(img_smw_prop_val)
|
|
|
|
|
|
|
|
|
|
|
|