Skip to content

Commit

Permalink
Merge pull request #122 from nulib/IngestMicroforms
Browse files Browse the repository at this point in the history
Fixed
  • Loading branch information
SoFrans authored Oct 1, 2024
2 parents 18a1918 + 7563a51 commit 0547bc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions nulrdcscripts/ingestMicro/Ingest_Sheet_Maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,13 @@ def analyze_file(self, filename: str, parent_dir: str, prepend: str = ""):
if self.work_type == "IMAGE":
role = item["role"]
label = item["label"]
file_accession_number = item["file_accession_number"]
else:
pass
# prepend to file_accession_number
if prepend:
file_accession_number = prepend + file_accession_number
else:
file_accession_number, ext = os.path.splitext(filename)
file_accession_number, ext = os.path.splitext(u_file)
# create meadow dict for file
meadow_file_dict: dict[str, str] = {
"work_type": self.work_type,
Expand Down
4 changes: 3 additions & 1 deletion nulrdcscripts/ingestMicro/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

import sys
from nulrdcscripts.ingest.params import args
from nulrdcscripts.ingest.Ingest_Sheet_Maker import Ingest_Sheet_Maker
from nulrdcscripts.ingestMicro.Ingest_Sheet_Maker import Ingest_Sheet_Maker

if sys.version_info[0] < 3:
raise Exception("Python 3 or a more recent version is required.")


def main():
"""
Creates an Ingest_Sheet_Maker, loads an inventory, and creates the ingest sheet.
Expand All @@ -31,5 +32,6 @@ def main():
# TODO final check that all ihidden files and folderstems from filename list are accounted for in the final inventory
# TODO add early warning if spreadsheet is missing important columns like work_accession_number


if __name__ == "__main__":
main()

0 comments on commit 0547bc1

Please sign in to comment.