Skip to content

Commit

Permalink
Merge pull request #1135 from nexusformat/1132-add-NXDL-version-to-vo…
Browse files Browse the repository at this point in the history
…cabulary

add NeXus version metadata to vocabulary file
  • Loading branch information
prjemian authored Jun 26, 2022
2 parents b097bb8 + 55af51a commit 7a506f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils/nxdl2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,21 @@ def key_from_anchor(self, anchor):
return key

def write(self):
# fmt: off
version = open(repo_root_path / "NXDL_VERSION", "r").read().strip()
contents = dict(
_metadata=dict(
datetime=datetime.datetime.utcnow().isoformat(),
title="NeXus NXDL vocabulary.",
subtitle="Anchors for all NeXus fields, groups, attributes, and links.",
subtitle=(
"Anchors for all NeXus fields,"
" groups, attributes, and links."
),
version=version,
),
terms=self.registry,
)
# fmt: on

self._write_yaml(contents)
self._write_json(contents)
Expand Down

0 comments on commit 7a506f0

Please sign in to comment.