alfred-tableplus icon indicating copy to clipboard operation
alfred-tableplus copied to clipboard

macOS Monterey Support

Open vmitchell85 opened this issue 3 years ago • 9 comments

This workflow no longer works in macOS Monterey. I presume this is due to php no longer being installed by default.

I actually have php installed via brew but it is not picking that up either.

I tried updating the Script Filter to use the full path to php and it seems to work.

image

Alfred has some guidance on using homebrew to install PHP. I ended up converting one of my workflows to use JavaScript instead.

vmitchell85 avatar Oct 29 '21 12:10 vmitchell85

Found this library... it seems to work well: https://github.com/TooTallNate/plist.js

Tested some simple code to parse the plist file:

var fs = require('fs');
var plist = require('plist');

var obj = plist.parse(fs.readFileSync('/Users/{username}/Library/Application Support/com.tinyapp.TablePlus/Data/Connections.plist', 'utf8'));
console.log(JSON.stringify(obj));

vmitchell85 avatar Oct 29 '21 12:10 vmitchell85

I also found this JavaScript library that helps with Alfred Workflows: https://github.com/sindresorhus/alfy

vmitchell85 avatar Oct 29 '21 12:10 vmitchell85

Thanks @vmitchell85. I am planning on updating my Mac soon so will take a look

chrisrenga avatar Nov 04 '21 12:11 chrisrenga

This seems to work

if [ -f "/opt/homebrew/bin/php" ]; then
    /opt/homebrew/bin/php tableplus.php "$1"
elif [ -f "/usr/local/bin/php" ]; then
    /usr/local/bin/php tableplus.php "$1"
elif [ -f "/usr/bin/php" ]; then
    /usr/bin/php tableplus.php "$1"
fi

Taken from https://github.com/tillkruss/alfred-laravel-docs

Plytas avatar Dec 08 '21 10:12 Plytas

Definitely missing this extension myself. Any luck @chrisrenga ?

Akkadius avatar Jan 03 '22 22:01 Akkadius

@Akkadius there's a manual workaround in this pull request until it gets merged https://github.com/chrisrenga/alfred-tableplus/pull/9

Plytas avatar Jan 04 '22 11:01 Plytas

@chrisrenga this can be closed once new version gets tagged.

Plytas avatar Jan 05 '22 13:01 Plytas

v1.1 is now available. I like the idea of getting this to work without having to install PHP so I'll keep this open for now.

chrisrenga avatar Jan 19 '22 12:01 chrisrenga

Install php by homebrew, it should set display_errors = Off in /opt/homebrew/etc/php/8.1/php.ini, Otherwise the result will not show correctly.

winterbesos avatar Feb 28 '22 03:02 winterbesos