Skip to content

Commit

Permalink
update config
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Jul 16, 2024
1 parent c20f85d commit 5bc123f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
2024-07-15 Jan Kotanski <jankotan@gmail.com>
* create output dir is does not exists (#696)
* fix ScanFileinScanNameDir name to ScanNames (#694)
* fix support for ScanNames=False (#695)
* tagged as v4.11.1
* tagged as v4.12.0

2024-07-11 Jan Kotanski <jankotan@gmail.com>
* add --online-xml-file option for nxscreate stdcomp (#687)
Expand Down
20 changes: 20 additions & 0 deletions nxstools/nxsfileinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,9 @@ def show(self, root, options):
metadata = self.metadata(root, options)
if metadata:
if options.output:
fdir, fn = os.path.split(os.path.abspath(options.output))
if not os.path.isdir(fdir):
os.makedirs(fdir, exist_ok=True)
chmod = None
try:
chmod = int(options.chmod, 8)
Expand Down Expand Up @@ -3013,6 +3016,8 @@ def groupmetadata(cls, options):
elif options.group and options.group[0]:
if imfile:
metadir, _ = os.path.split(os.path.abspath(imfile))
if not os.path.isdir(metadir):
os.makedirs(metadir, exist_ok=True)
omfile = os.path.join(
metadir, "%s.scan.json" % options.group[0])
if options.writefiles:
Expand Down Expand Up @@ -3173,6 +3178,9 @@ def show(self, options):
metadata, datablocks, attachments = self.groupmetadata(options)
if metadata:
if options.output:
fdir, fn = os.path.split(os.path.abspath(options.output))
if not os.path.isdir(fdir):
os.makedirs(fdir, exist_ok=True)
chmod = None
try:
chmod = int(options.chmod, 8)
Expand Down Expand Up @@ -3517,6 +3525,9 @@ def show(self, options):
metadata = self.datablock(options)
if metadata:
if options.output:
fdir, fn = os.path.split(os.path.abspath(options.output))
if not os.path.isdir(fdir):
os.makedirs(fdir, exist_ok=True)
chmod = None
try:
chmod = int(options.chmod, 8)
Expand Down Expand Up @@ -3687,6 +3698,9 @@ def show(self, options):
metadata = self.sample(options)
if metadata:
if options.output:
fdir, fn = os.path.split(os.path.abspath(options.output))
if not os.path.isdir(fdir):
os.makedirs(fdir, exist_ok=True)
chmod = None
try:
chmod = int(options.chmod, 8)
Expand Down Expand Up @@ -4573,6 +4587,9 @@ def show(self, root, options):
metadata = self.attachment(root, options)
if metadata:
if options.output:
fdir, fn = os.path.split(os.path.abspath(options.output))
if not os.path.isdir(fdir):
os.makedirs(fdir, exist_ok=True)
chmod = None
try:
chmod = int(options.chmod, 8)
Expand Down Expand Up @@ -4731,6 +4748,9 @@ def show(self, options):
metadata = self.instrument(options)
if metadata:
if options.output:
fdir, fn = os.path.split(os.path.abspath(options.output))
if not os.path.isdir(fdir):
os.makedirs(fdir, exist_ok=True)
chmod = None
try:
chmod = int(options.chmod, 8)
Expand Down

0 comments on commit 5bc123f

Please sign in to comment.