Skip to content

Commit

Permalink
iterate through all tables, not only the first
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Sep 12, 2023
1 parent 65f8834 commit 1559a3a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/arc-export/ARCExtension.fs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ type ARC with
yield $"{studyFoldername}/README.md"

//just allow any constructed path from cell values. there may be occasions where this includes wrong files, but its good enough for now.
for (kv) in s.Tables[0].Values do
let textValue = kv.Value.ToFreeTextCell().AsFreeText
yield textValue// from arc root
yield $"{studyFoldername}/resources/{textValue}" // from study root > resources
yield $"{studyFoldername}/protocols/{textValue}" // from study root > protocols
for table in s.Tables do
for kv in table.Values do
let textValue = kv.Value.ToFreeTextCell().AsFreeText
yield textValue// from arc root
yield $"{studyFoldername}/resources/{textValue}" // from study root > resources
yield $"{studyFoldername}/protocols/{textValue}" // from study root > protocols
]
)
|> Set.unionMany
Expand All @@ -61,11 +62,12 @@ type ARC with
yield $"{assayFoldername}/README.md"

//just allow any constructed path from cell values. there may be occasions where this includes wrong files, but its good enough for now.
for (kv) in a.Tables[0].Values do
let textValue = kv.Value.ToFreeTextCell().AsFreeText
yield textValue // from arc root
yield $"{assayFoldername}/dataset/{textValue}" // from assay root > dataset
yield $"{assayFoldername}/protocols/{textValue}" // from assay root > protocols
for table in a.Tables do
for kv in table.Values do
let textValue = kv.Value.ToFreeTextCell().AsFreeText
yield textValue // from arc root
yield $"{assayFoldername}/dataset/{textValue}" // from assay root > dataset
yield $"{assayFoldername}/protocols/{textValue}" // from assay root > protocols
]
)
|> Set.unionMany
Expand Down

0 comments on commit 1559a3a

Please sign in to comment.