Skip to content

Commit 5ff8262

Browse files
authored
Add crate-version to CLI
1 parent 8003d55 commit 5ff8262

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

rocrate/cli.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ def cli():
9292
metavar="NAME",
9393
help="Exclude files or directories from the metadata file. NAME may be a single name or a comma-separated list of names.",
9494
)
95+
@click.option(
96+
"--crate-version",
97+
default="1.2",
98+
type=str,
99+
help="Version of the RO-Crate standard to initialize the crate with.",
100+
)
95101
@OPTION_CRATE_PATH
96-
def init(crate_dir, gen_preview, exclude):
97-
crate = ROCrate(crate_dir, init=True, gen_preview=gen_preview, exclude=exclude)
102+
def init(crate_dir, gen_preview, exclud, crate_version):
103+
crate = ROCrate(crate_dir, init=True, gen_preview=gen_preview, exclude=exclude, version=crate_version)
98104
crate.metadata.write(crate_dir)
99105
if crate.preview:
100106
crate.preview.write(crate_dir)

0 commit comments

Comments
 (0)