Skip to content

Commit

Permalink
cli: Add dev ai start script
Browse files Browse the repository at this point in the history
  • Loading branch information
juanibiapina committed Mar 28, 2024
1 parent f6525cd commit cb41500
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cli/libexec/ai/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# Summary: Start working on the Github repository currently opened in Vivaldi

set -e

# create an temporary image file
imagefile="$(mktemp -t image.XXXXXXXX).png"

# create a temporary text file
# tesseract takes this path and adds an extension .txt
textfile="$(mktemp -t text.XXXXXXXX)"

# capture the URL on vivaldi
shotgun -i 1354 -g 1993x23+218+81 "$imagefile"

# read the URL from the image
tesseract "$imagefile" "$textfile" 2>/dev/null

# start a dev session with the URL
cat "$textfile".txt | xargs dev start

# remove temporary files
rm "$imagefile"
rm "$textfile".txt

0 comments on commit cb41500

Please sign in to comment.