Skip to content

Commit

Permalink
Merge pull request #24 from NFDI4BIOIMAGE/fix_document_duplication
Browse files Browse the repository at this point in the history
fix document duplication
  • Loading branch information
haesleinhuepf committed Oct 13, 2023
2 parents cb7f569 + 951c5af commit 3bdc8b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/generate_link_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def main():
filename = "content_types/" + supported_type
write_md(all, supported_type, "docs/" + filename + ".md")
type_toc = type_toc + " - file: " + filename + "\n"
print("COUNTS", all_content_types[supported_type], len(all))
replace_in_file(toc_file, "{type_toc}", type_toc)


# go through all tags and generate corresponding markdown files
all_tag_counts = collect_all_tags(content)
Expand Down Expand Up @@ -104,7 +104,10 @@ def find_anything(content, what_to_look_in, what_to_find):
for c in content['resources']:
if what_to_look_in in c:
try:
if what_to_find in c[what_to_look_in]:
list_to_look_at = c[what_to_look_in]
if type(list_to_look_at) is not list:
list_to_look_at = [list_to_look_at]
if what_to_find in list_to_look_at:
print("* listing", c['name'])
result[c['name']] = c
except:
Expand Down

0 comments on commit 3bdc8b4

Please sign in to comment.