Skip to content

Commit

Permalink
chore: update asset scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
comfysage committed Jun 22, 2024
1 parent 3068765 commit 38e20c2
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
temp.tape
Binary file added assets/asset.show-neovim.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions assets/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
rec_assets = $(wildcard rec.*.tape) $(wildcard **/rec.*.tape)
screenshot_assets = $(wildcard screenshot.*.tape) $(wildcard **/screenshot.*.tape)
recs = $(rec_assets:rec.%.tape=asset.%.gif)
screenshots = $(screenshot_assets:screenshot.%.tape=asset.%.png)

prefix_file = static.prefix.tape
suffix_file = static.suffix.tape
temp_tape = temp.tape
temp_out = out.gif

all: $(recs) $(screenshots)

asset.%.gif: rec.%.tape
@echo "Output $@" > ${temp_tape}
@cat ${prefix_file} >> ${temp_tape}
@cat $< >> ${temp_tape}
@cat ${suffix_file} >> ${temp_tape}
@echo vhs $<
@vhs ${temp_tape} -o $@

asset.%.png: screenshot.%.tape
@echo "Output ${temp_out}" > ${temp_tape}
@cat ${prefix_file} >> ${temp_tape}
@cat $< >> ${temp_tape}
@echo "Show" >> ${temp_tape}
@echo "Screenshot $@" >> ${temp_tape}
@echo "Sleep 100ms" >> ${temp_tape}
@echo vhs $<
@vhs ${temp_tape} -o ${temp_out}

clean:
-rm $(recs) $(screenshots)
-rm ${temp_tape} ${temp_out}

.PHONY: all clean
5 changes: 5 additions & 0 deletions assets/rec.show-neovim.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Set Height 320

Type "sk show neovim"
Sleep 100ms
Enter
15 changes: 15 additions & 0 deletions assets/static.prefix.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Set Framerate 24
Set Width 1280
Set Height 920
Set Padding 16
Set Margin 0

Set LineHeight 1.1
Set FontFamily "JetBrainsMono Nerd Font"
Set FontSize 26

Set TypingSpeed 0.1

Set Theme GruvboxDark

Require sk
1 change: 1 addition & 0 deletions assets/static.suffix.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sleep 2.5s

0 comments on commit 38e20c2

Please sign in to comment.