Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion meta_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def main():
parser = ArgumentParser(description='Update codemeta.json and '
'.zenodo.json')
parser.add_argument('--set-version', dest='newversion')
parser.add_argument('--outdir', dest='outdir')
args = parser.parse_args()

for manipulator in (CodeMetaManipulator(), ZenodoManipulator()):
Expand All @@ -150,7 +151,10 @@ def main():
if args.newversion is not None:
manipulator.version(args.newversion)
manipulator.update_authors()
manipulator.save()
filename = None
if args.outdir is not None:
filename = f'{args.outdir}/{manipulator.default_filename}'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer a pathlib.Path based approach for this. Yes, not needed for us. But still nicer?

manipulator.save(filename)


if __name__ == '__main__':
Expand Down