nikivi Posted October 26, 2017 Share Posted October 26, 2017 (edited) Oh and I think it would also be useful to add "Open in a New Window" action to one of the TAB actions. I sometimes have to split two windows side by side and this action would be quite useful for that. There is a menu bar action for that in Window : So perhaps you can use that to achieve this. I think it would be quite useful to have and there is already Open in Private Window action. Thank you if you do decide to add it. Edited October 26, 2017 by nikivi Link to comment Share on other sites More sharing options...
nikivi Posted October 26, 2017 Share Posted October 26, 2017 (edited) And another thing that I think can be useful at least for me is an action to delete bookmarks. Right now it is quite cumbersome to delete a bookmark. Not sure if it is even possible to add it since it seems things changed in Sierra. I am still on El Captain. Edited October 26, 2017 by nikivi Link to comment Share on other sites More sharing options...
deanishe Posted October 26, 2017 Share Posted October 26, 2017 (edited) 2 hours ago, nikivi said: There is a menu bar action for that in Window That isn't what it does. The menu bar action takes the existing tab and puts it in a new window. That's not the same as grabbing the URL and reloading it in a new window (which is what the Open in Private Window script does). In either case, this is exactly why the workflow supports your own custom scripts. If you want to copy a URL and reload it in a new window, write a script to do that. If you want to move a tab to a new window, write a script to do that. Put them in the appropriate subdirectory of the workflow's data directory and you're good to go. If the script works well, you can ask me to add it to the default scripts. (If your script calls a menubar item, be sure to implement it in a language-agnostic way, so it works with a Russian Safari just as well as with an English one, or I won't consider adding it to the defaults.) 35 minutes ago, nikivi said: an action to delete bookmarks Same answer as above. Except AFAIK there's no AppleScript API for deleting bookmarks. The workflow will always treat Safari's data as read-only. Changing a running app's private data is an extremely bad idea. As a rule, it doesn't work and/or it breaks the application. Edited October 26, 2017 by deanishe Link to comment Share on other sites More sharing options...
schrodinger_cat Posted October 28, 2017 Author Share Posted October 28, 2017 On 10/24/2017 at 5:51 PM, deanishe said: Thanks for volunteering as a beta tester Here's the workflow. Here are the usage instructions. Feedback would be appreciated, especially a suggestion for a good name for the workflow. This workflow is awesome! I'll have some feedback after using it more. On 10/24/2017 at 7:00 PM, nikivi said: Oh and I think Safari Assistant is pretty good name. I can't really think of a better one. I have to agree to this. The name is exactly on point. Link to comment Share on other sites More sharing options...
schrodinger_cat Posted October 28, 2017 Author Share Posted October 28, 2017 (edited) On 10/24/2017 at 11:16 PM, deanishe said: It would be far too slow to load all the entries from the database (mine has ~55K rows), and the fuzzy search doesn't handle that many items very well either, so the history search (keyword hi) uses an SQL query to search the database (LIKE '%{query}%') and only loads the results. SQL search is not fuzzy. Is this also the reason why I cannot type search terms in any order? I'd love for space to act as logical AND in query like in almost all search engines. Edited October 29, 2017 by schrodinger_cat Link to comment Share on other sites More sharing options...
deanishe Posted October 29, 2017 Share Posted October 29, 2017 6 hours ago, schrodinger_cat said: Is this also the reason why I cannot type search terms in any order? Yup. SQLite does support fulltext search, which works the way you describe, but the Safari database isn’t set up for it. Link to comment Share on other sites More sharing options...
schrodinger_cat Posted October 29, 2017 Author Share Posted October 29, 2017 7 hours ago, deanishe said: Yup. SQLite does support fulltext search, which works the way you describe, but the Safari database isn’t set up for it. Why not to use multiple SQL queries then? Like this workflow is doing. Performance is perfectly fine for me with this one. Link to comment Share on other sites More sharing options...
deanishe Posted October 29, 2017 Share Posted October 29, 2017 I’ll look into it. The way that workflow does it is vulnerable to SQL injection. Maybe not a huge deal for local software, but I’d rather something that does it correctly. Link to comment Share on other sites More sharing options...
schrodinger_cat Posted October 29, 2017 Author Share Posted October 29, 2017 (edited) 3 minutes ago, deanishe said: I’ll look into it. The way that workflow does it is vulnerable to SQL injection. Maybe not a huge deal for local software, but I’d rather something that does it correctly. The thing is, it's kinda a big deal, the usefulness of this functionality is heavily dependant on the ability to specify search terms in any order. Typical use is: Type one query term. See results. Add another term to filter results further. Repeat until specific item is found. When adding another term (step 3), it's very rare when terms are in the exact order they're in bookmark name. The user shouldn't be expected to specify the exact string when searching. So yeah, if it's possible, I think it's worth investigating. Thank you! Edited October 29, 2017 by schrodinger_cat Link to comment Share on other sites More sharing options...
deanishe Posted October 29, 2017 Share Posted October 29, 2017 6 minutes ago, schrodinger_cat said: it's very rare when terms are in the exact order they're in bookmark name. That’s not been my experience. Like I said, I’ll look into it. Link to comment Share on other sites More sharing options...
deanishe Posted October 30, 2017 Share Posted October 30, 2017 Released v0.2.3, which uses AND semantics for history search. Link to comment Share on other sites More sharing options...
deanishe Posted October 31, 2017 Share Posted October 31, 2017 I've moved the workflow to GitHub. Please update to that version, as it supports auto-updating. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now