Skip to content

Commit

Permalink
[DOCS] Update listing of notebooks with badges (openvinotoolkit#1825)
Browse files Browse the repository at this point in the history
Improving generation of list of notebooks with Binder and Colab badges.
  • Loading branch information
sgolebiewski-intel authored Mar 18, 2024
1 parent 4e015a5 commit 9b6c6b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .ci/convert_notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ tagslist=$rstdir"/notebooks_tags.json"
mkdir -p $rstdir

# List all notebooks that contain binder or colab buttons based on readme
for n in $(git ls-files '*.ipynb' ':!:*utils.ipynb'); do
cat ${n%/*}"/README.md" | grep -oP "https://mybinder.org/v2.*?[0-9]{3}.*?ipynb" | sed 's#%2F#/#g' | xargs basename -a -s .ipynb {} | sort | uniq > $binderlist
cat ${n%/*}"/README.md" | grep -oP "https://colab.research.google.com/github.*?[0-9]{3}.*?ipynb" | xargs basename -s .ipynb {} | sort | uniq > $colablist
for n in $(git ls-files '*.md'); do
cat $n | grep -oP "https://mybinder.org/v2.*?[0-9]{3}.*?ipynb" | sed 's#%2F#/#g' | sed -e 's|[^/]*/||g' -e 's|.ipynb$||' | sort | uniq >> $binderlist
cat $n | grep -oP "https://colab.research.google.com/github.*?[0-9]{3}.*?ipynb" | sed -e 's|[^/]*/||g' -e 's|.ipynb$||' | sort | uniq >> $colablist
done
find notebooks -maxdepth 2 -name "*.ipynb" | sort > $notebooklist
taggerpath=$(git ls-files "*tagger.py")
Expand Down

0 comments on commit 9b6c6b7

Please sign in to comment.