Skip to content

Commit

Permalink
Check for vid file existence
Browse files Browse the repository at this point in the history
slimslenderslacks committed Jan 28, 2025
1 parent f7ae155 commit a3bc077
Showing 2 changed files with 20 additions and 4 deletions.
18 changes: 17 additions & 1 deletion prompts/examples/ffmpeg.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,21 @@
name: "ffmpeg - convert to gif"
tools:
- name: imagemagick
- name: file-exists
description: check if a file exists
parameters:
type: object
properties:
path:
type: string
container:
image: busybox:latest
volumes:
- "{{path|safe}}:{{path|safe}}"
command:
- test
- -f
- "{{path|safe}}"
- name: ffmpeg
description: run the ffmpeg command
parameters:
@@ -25,7 +40,8 @@ model: claude-3-5-sonnet-20241022

# prompt user

You will convert /Users/slim/vids/UsingPuppeteer.mp4 to a gif using ffmpeg.
Ask for a video file to convert to a gif. Check that the file exists and if it does not,
then ask again.

Figure out the basedir for this file and use that as the basedir parameter when running ffmpeg.

6 changes: 3 additions & 3 deletions src/git.clj
Original file line number Diff line number Diff line change
@@ -82,11 +82,11 @@
{:image "alpine/git:latest"}
(if (string/starts-with? (str dir) "/prompts")
{:workdir (str dir)
:volumes ["docker-prompts-git:/git"]
:volumes ["docker-prompts-git:/git"
"docker-prompts:/prompts:rw"]
:command (concat ["clone" "--depth" "1" (format "https://github.com/%s/%s" owner repo)]
(when ref ["-b" ref])
[(format "/prompts/%s" ref-hash)])
:mounts ["docker-prompts:/prompts:rw"]}
[(format "/prompts/%s" ref-hash)])}
{:host-dir (str dir)
:volumes ["docker-prompts-git:/git"]
:command (concat ["clone" "--depth" "1" (format "https://github.com/%s/%s" owner repo)]

0 comments on commit a3bc077

Please sign in to comment.