Jump to content

Recommended Posts

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 : 

 

Y78gUW1.png 

 

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 by nikivi

Share this post


Link to post
Share on other sites

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 by nikivi

Share this post


Link to post
Share on other sites
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 by deanishe

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

 

Screen Shot 2017-10-29 at 02.45.03.jpg

Screen Shot 2017-10-29 at 02.51.22.jpg

Screen Shot 2017-10-29 at 02.45.jpeg

Edited by schrodinger_cat

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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:

  1. Type one query term.
  2. See results.
  3. Add another term to filter results further.
  4. 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 by schrodinger_cat

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...