File tree 2 files changed +20
-4
lines changed
2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 2
2
name : " ffmpeg - convert to gif"
3
3
tools :
4
4
- name : imagemagick
5
+ - name : file-exists
6
+ description : check if a file exists
7
+ parameters :
8
+ type : object
9
+ properties :
10
+ path :
11
+ type : string
12
+ container :
13
+ image : busybox:latest
14
+ volumes :
15
+ - " {{path|safe}}:{{path|safe}}"
16
+ command :
17
+ - test
18
+ - -f
19
+ - " {{path|safe}}"
5
20
- name : ffmpeg
6
21
description : run the ffmpeg command
7
22
parameters :
@@ -25,7 +40,8 @@ model: claude-3-5-sonnet-20241022
25
40
26
41
# prompt user
27
42
28
- You will convert /Users/slim/vids/UsingPuppeteer.mp4 to a gif using ffmpeg.
43
+ Ask for a video file to convert to a gif. Check that the file exists and if it does not,
44
+ then ask again.
29
45
30
46
Figure out the basedir for this file and use that as the basedir parameter when running ffmpeg.
31
47
Original file line number Diff line number Diff line change 82
82
{:image " alpine/git:latest" }
83
83
(if (string/starts-with? (str dir) " /prompts" )
84
84
{:workdir (str dir)
85
- :volumes [" docker-prompts-git:/git" ]
85
+ :volumes [" docker-prompts-git:/git"
86
+ " docker-prompts:/prompts:rw" ]
86
87
:command (concat [" clone" " --depth" " 1" (format " https://github.com/%s/%s" owner repo)]
87
88
(when ref [" -b" ref])
88
- [(format " /prompts/%s" ref-hash)])
89
- :mounts [" docker-prompts:/prompts:rw" ]}
89
+ [(format " /prompts/%s" ref-hash)])}
90
90
{:host-dir (str dir)
91
91
:volumes [" docker-prompts-git:/git" ]
92
92
:command (concat [" clone" " --depth" " 1" (format " https://github.com/%s/%s" owner repo)]
You can’t perform that action at this time.
0 commit comments