Skip to content

Commit 3a818f5

Browse files
committed
Write the pif to the directory
1 parent 095280b commit 3a818f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/dfttopif

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ if len(sys.argv) != 2:
88
print("Usage: diftopif <path to directory or tarfile>")
99
sys.exit(1)
1010

11-
print(pif.dumps(directory_to_pif(sys.argv[1], quality_report=True), indent=4))
11+
pif_contents = directory_to_pif(sys.argv[1], quality_report=True)
12+
with open(os.path.join(sys.argv[1], "pif.json"), "w") as f:
13+
pif.dump(pif_contents, f)
14+
15+
print(pif.dumps(pif_contents, indent=4))

0 commit comments

Comments
 (0)