Skip to content

Commit

Permalink
Merge pull request #295 from nfdi4plants/img-index
Browse files Browse the repository at this point in the history
update img index
  • Loading branch information
Brilator authored Oct 26, 2023
2 parents baff144 + ed46d4d commit f25b864
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,34 @@ author:
orcid: https://orcid.org/0000-0001-9021-3197
---

Note, this is just a quick and dirty crawler to list all images and add them to the _ImageIndex.md
Note, this is just a quick and dirty crawler to list all images and add them to the $indexfile

# Crawl images and add to _imageIndex.md
# Crawl images and add to $indexfile

```bash
cd src/docs/img
cd src/docs/
indexfile=image-index.md
```

```bash

find . -type f > .tmp_all-files
find img -type f > .tmp_all-files
grep -v '.pptx' .tmp_all-files > .tmp_all-images-only
sed 's|^./|/docs/img/|g' .tmp_all-images-only > .tmp_all-images-absolute

rm -f _test.md
sed 's|^img/|./img/|g' .tmp_all-images-only > .tmp_all-images-relative

while IFS= read -r img;
do
if [ $(grep -c "$img" _ImageIndex.md) -eq 0 ]
if [ $(grep -c "$img" $indexfile) -eq 0 ]
then

echo '<a href="'$img'" target="_blank"><img src="'$img'" width="50px" alt="'$img'"/></a> | <a href="'$img'" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase'$img'</a> | | ' >> _ImageIndex.md
echo '<a href="'$img'" target="_blank"><img src="'$img'" width="50px" alt="'$img'"/></a> | <a href="'$img'" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase'$img'</a> | | ' >> $indexfile
fi
done < .tmp_all-images-absolute
done < .tmp_all-images-relative

rm .tmp_all-*


grep -v "_ImageIndex" _ImageIndex.md > tmpfile && mv tmpfile _ImageIndex.md
grep -v ".DS_Store" _ImageIndex.md > tmpfile && mv tmpfile _ImageIndex.md
grep -v ".DS_Store" $indexfile > tmpfile && mv tmpfile $indexfile


```
15 changes: 15 additions & 0 deletions src/docs/image-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,3 +556,18 @@ Thumbnail | Image URL | Source / Citation | License
<a href="./img/pid_collage.drawio.svg" target="_blank"><img src="./img/pid_collage.drawio.svg" width="50px" alt="./img/pid_collage.drawio.svg"/></a> | <a href="./img/pid_collage.drawio.svg" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase/docs/img/pid_collage.drawio.svg</a> | |
<a href="./img/cqc-error-email.png" target="_blank"><img src="./img/cqc-error-email.png" width="50px" alt="./img/cqc-error-email.png"/></a> | <a href="./img/cqc-error-email.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase/docs/img/cqc-error-email.png</a> | |
<a href="./img/creative_commons_brochure.png" target="_blank"><img src="./img/creative_commons_brochure.png" width="50px" alt="./img/creative_commons_brochure.png"/></a> | <a href="./img/creative_commons_brochure.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase/docs/img/creative_commons_brochure.png</a> | adapted from https://wiki.creativecommons.org/images/0/01/6licenses-folded.pdf | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode)
<a href="./img/arcitect-talinum-demo-ARC.png" target="_blank"><img src="./img/arcitect-talinum-demo-ARC.png" width="50px" alt="./img/arcitect-talinum-demo-ARC.png"/></a> | <a href="./img/arcitect-talinum-demo-ARC.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/arcitect-talinum-demo-ARC.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_addPerson.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_addPerson.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_addPerson.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_addPerson.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_addPerson.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_History.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_History.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_History.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_History.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_History.png</a> | |
<a href="./img/arcitect-download-TalinumARC.png" target="_blank"><img src="./img/arcitect-download-TalinumARC.png" width="50px" alt="./img/arcitect-download-TalinumARC.png"/></a> | <a href="./img/arcitect-download-TalinumARC.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/arcitect-download-TalinumARC.png</a> | |
<a href="./img/tpj16474-fig-0004-m.jpg" target="_blank"><img src="./img/tpj16474-fig-0004-m.jpg" width="50px" alt="./img/tpj16474-fig-0004-m.jpg"/></a> | <a href="./img/tpj16474-fig-0004-m.jpg" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/tpj16474-fig-0004-m.jpg</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_addAssay.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_addAssay.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_addAssay.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_addAssay.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_addAssay.png</a> | |
<a href="./img/tpj16474-fig-0002-m.jpg" target="_blank"><img src="./img/tpj16474-fig-0002-m.jpg" width="50px" alt="./img/tpj16474-fig-0002-m.jpg"/></a> | <a href="./img/tpj16474-fig-0002-m.jpg" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/tpj16474-fig-0002-m.jpg</a> | |
<a href="./img/arcitect-ARCPanel-study-protocol.png" target="_blank"><img src="./img/arcitect-ARCPanel-study-protocol.png" width="50px" alt="./img/arcitect-ARCPanel-study-protocol.png"/></a> | <a href="./img/arcitect-ARCPanel-study-protocol.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/arcitect-ARCPanel-study-protocol.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_Assay3.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_Assay3.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_Assay3.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_Assay3.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_Assay3.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_Assay4.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_Assay4.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_Assay4.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_Assay4.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_Assay4.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_Assay5.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_Assay5.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_Assay5.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_Assay5.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_Assay5.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_Assay6.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_Assay6.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_Assay6.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_Assay6.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_Assay6.png</a> | |
<a href="./img/arcitect-ARCPanel-Investigation.png" target="_blank"><img src="./img/arcitect-ARCPanel-Investigation.png" width="50px" alt="./img/arcitect-ARCPanel-Investigation.png"/></a> | <a href="./img/arcitect-ARCPanel-Investigation.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/arcitect-ARCPanel-Investigation.png</a> | |
<a href="./img/ARCitect_TalinumPhotosynthesis_Study-protocol.png" target="_blank"><img src="./img/ARCitect_TalinumPhotosynthesis_Study-protocol.png" width="50px" alt="./img/ARCitect_TalinumPhotosynthesis_Study-protocol.png"/></a> | <a href="./img/ARCitect_TalinumPhotosynthesis_Study-protocol.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/ARCitect_TalinumPhotosynthesis_Study-protocol.png</a> | |
<a href="./img/arcitect-ARCPanel-Investigation-people.png" target="_blank"><img src="./img/arcitect-ARCPanel-Investigation-people.png" width="50px" alt="./img/arcitect-ARCPanel-Investigation-people.png"/></a> | <a href="./img/arcitect-ARCPanel-Investigation-people.png" target="_blank">https://nfdi4plants.org/nfdi4plants.knowledgebase./img/arcitect-ARCPanel-Investigation-people.png</a> | |

0 comments on commit f25b864

Please sign in to comment.