Skip to content

Commit

Permalink
compute/lectures: Fix paths to generated gifs
Browse files Browse the repository at this point in the history
Update Makefile to generate all gifs in the media directory. Reference
the images using <section>/media/<file> to enable rendering on
Docusaurus, even though it breaks in-file links.

Signed-off-by: Alex Apostolescu <[email protected]>
  • Loading branch information
Alex-deVis authored and teodutu committed Nov 4, 2024
1 parent 5436a03 commit fb3d64b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions chapters/compute/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FFMPEG = ffmpeg

SLIDES ?= slides.mdpp
SLIDES_OUT ?= slides.md
MEDIA_DIR ?= generated-media
SITE ?= _site
OPEN ?= xdg-open

Expand All @@ -21,17 +20,17 @@ $(SITE): $(SLIDES)
$(RVMD) $(SLIDES_OUT) --static $@

videos:
mkdir -p $(MEDIA_DIR)
for TARGET in $(TARGETS); do \
TARGET_DIR=$$(find -name $$TARGET -type d | grep media); \
MEDIA_DIR=$$(dirname $$TARGET_DIR); \
$(FFMPEG) -framerate 0.5 -f image2 -y \
-i "$$TARGET_DIR/$$TARGET-%d.svg" -vf format=yuv420p $(MEDIA_DIR)/$$TARGET-generated.gif; \
-i "$$TARGET_DIR/$$TARGET-%d.svg" -vf format=yuv420p $$MEDIA_DIR/$$TARGET-generated.gif; \
done

open: $(SITE)
$(OPEN) $</index.html

clean:
-rm -f $(MEDIA_DIR)/*-generated.gif
-for i in $$(find -name "*-generated.gif"); do rm -f $$i; done
-rm -f *~
-rm -fr $(SITE) $(SLIDES_OUT)
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

#### Round-Robin - Live Scheduling

![Round-Robin Scheduling](../generated-media/round-robin-generated.gif)
![Round-Robin Scheduling](synchronization/generated-media/round-robin-generated.gif)

----

Expand Down

0 comments on commit fb3d64b

Please sign in to comment.