alfred-tableplus
alfred-tableplus copied to clipboard
macOS Monterey Support
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.
Alfred has some guidance on using homebrew to install PHP. I ended up converting one of my workflows to use JavaScript instead.
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));
I also found this JavaScript library that helps with Alfred Workflows: https://github.com/sindresorhus/alfy
Thanks @vmitchell85. I am planning on updating my Mac soon so will take a look
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
Definitely missing this extension myself. Any luck @chrisrenga ?
@Akkadius there's a manual workaround in this pull request until it gets merged https://github.com/chrisrenga/alfred-tableplus/pull/9
@chrisrenga this can be closed once new version gets tagged.
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.
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.