diff --git a/.gitignore b/.gitignore index d42c3fd..393c494 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ !.vscode/extensions.json cache/* !cache/.gitkeep +*.DS_Store diff --git a/bin/echo-urls b/bin/echo-urls new file mode 100755 index 0000000..cfbf0f6 --- /dev/null +++ b/bin/echo-urls @@ -0,0 +1,15 @@ +#!/usr/bin/env dash + +SCRIPT_DIR=$(dirname "$(realpath "$0")") + +# Run the AppleScript and capture the output +urls=$(osascript "$SCRIPT_DIR/../scripts/get_safari_urls.scpt") + +# Convert the output to a list +IFS=', ' + +# Print the URLs (optional) +for url in $urls; do + echo + echo "$url" +done diff --git a/scripts/get_safari_urls.scpt b/scripts/get_safari_urls.scpt new file mode 100644 index 0000000..2ea32cb Binary files /dev/null and b/scripts/get_safari_urls.scpt differ