Skip to content

Commit

Permalink
dev: generate all header files
Browse files Browse the repository at this point in the history
  • Loading branch information
swharden committed Aug 2, 2023
1 parent b19b2f6 commit a9a2b0f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dev/python/2023-08-02 create header files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import sys
import pathlib

try:
PATH_HERE = pathlib.Path(__file__).parent
PATH_ABFS = PATH_HERE.joinpath("../../data/abfs/").resolve()
PATH_SRC = PATH_HERE.joinpath("../../src/").resolve()
print(PATH_SRC)
sys.path.insert(0, str(PATH_SRC))
import pyabf
except:
raise EnvironmentError()


if __name__ == "__main__":
for abf_path in pathlib.Path(PATH_ABFS).glob("*.abf"):
print(abf_path)
abf = pyabf.ABF(abf_path)
pathlib.Path(f"test-{abf.abfID}.txt").write_text(abf.headerText)
pathlib.Path(f"test-{abf.abfID}.html").write_text(abf.headerHTML)

0 comments on commit a9a2b0f

Please sign in to comment.