Nerian Posted November 7, 2017 Share Posted November 7, 2017 I am executing the workflow like this [1]. Notice the two hotkeys. I have got a hotkey – cmd + . – linked to the `pin` filter. So I just click those two keys and start typing. You are of course correct, I see now there is a cache. I guess you don't face my problem because you type `pin` instead of using a hotkey, so the delay is not noticeable in your case. In my case if you click fast enough you definitely miss some keys. I think this is just the delay in the execution of the script that loads the results; input is not handled while waiting for the initial script results. No way to work around that. I second your suggestion to decrease the update frequency. [1] Link to comment
deanishe Posted November 7, 2017 Share Posted November 7, 2017 13 minutes ago, Nerian said: I have got a hotkey – cmd + . – linked to the `pin` filter. Are you sure you don't still have a finger on ⌘ when Alfred "ignores" a letter? That's by far the most common cause when that happens. 21 minutes ago, Nerian said: In my case if you click fast enough you definitely miss some keys. I think this is just the delay in the execution of the script that loads the results Again, I don't think it's related to the workflow. Alfred pops up its window, ready for input, and then loads the workflow. If you're sure you're letting go of ⌘, then I think it's most likely that you're trying to enter your query before Alfred's window has taken focus and is accepting input. You can test this by adding sleep 2 to the script. The workflow now takes 2 seconds longer to load, but Alfred doesn't take 2 seconds longer to be responsive. 27 minutes ago, Nerian said: I second your suggestion to decrease the update frequency. I think a workflow/environment variable would be a good fit for that. 10 minutes is perhaps a great choice for hardcore Pinboarders, but I only add a couple of bookmarks a week, so every few hours would be much more appropriate for me. FWIW, if you don't have a huge number of bookmarks, you could try combining this workflow with my fuzzy search helper. It'd take a bit of wrangling (you'd need to move the main Script Filter into an external script), but that would match "art" to "deviantart". But as noted above, it will be significantly slower than using Alfred's native search, which will become very noticeable if you have over, say, 2000 bookmarks. Link to comment
nikivi Posted November 7, 2017 Share Posted November 7, 2017 (edited) Not really relevant to this workflow per say. But I was always curious, why do people use Pinboard? I don't see any value in it because you can do all the same things with a normal bookmark manager, I think. Aside from sharing publicly your bookmarks with other Pinboarders. And that OCR text index that Pinboard provides which is probably useful. Oh and you can already tag bookmarks natively by simply adding the tags after the bookmark name like so : What I do is that I expose nearly all my bookmarks through my Alfred Mind workflow so that anyone can tap into into the bookmarks I use at any time. Perhaps there is something I am missing but I tried Pinboard free trial once and didn't get it. The only thing I appreciate about Pinboard is its popular tab which occasionally has some interesting stuff. Edited November 7, 2017 by nikivi Link to comment
deanishe Posted November 7, 2017 Share Posted November 7, 2017 I use my bookmarks for pages I will visit regularly. Pinboard is for things I that I know I will probably want again at some point, but not regularly. Things like articles about SQL joins or interesting libraries, which I know I won’t remember. It also offers good integration with apps and other tools. I’ve had a Pinboard account for many years, so I don’t pay a subscription for it. Link to comment
TheDonk Posted November 7, 2017 Share Posted November 7, 2017 I rarely use Safari when I have power, but always on battery. Pinboard, especially with an Alfred workflow, is a smooth way to have bookmarks independent of your browser. I assume there are other solutions, but habit and so on. Link to comment
deanishe Posted November 7, 2017 Share Posted November 7, 2017 12 minutes ago, TheDonk said: I assume there are other solutions, but habit and so on. I use the BookMacster app to sync bookmarks between browsers, but it's a bit buggy and I still don't really fully understand how to use it (the UI is extremely complicated). Out of interest, how do you handle switching between browsers? Do you just change the default browser so Alfred/the workflow opens URLs in the correct app, or is it some workflow magic? Link to comment
TheDonk Posted November 7, 2017 Share Posted November 7, 2017 18 minutes ago, deanishe said: I use the BookMacster app to sync bookmarks between browsers, but it's a bit buggy and I still don't really fully understand how to use it (the UI is extremely complicated). Out of interest, how do you handle switching between browsers? Do you just change the default browser so Alfred/the workflow opens URLs in the correct app, or is it some workflow magic? I use this one to change default browser, there is also a cli tool "defaultbrowser", so it's possible to use something like Hammerspoon to react to system events (like on AC or not) and call it. In addition, I have a small workflow if I want to keep all my tabs - https://www.dropbox.com/s/w14q8t4vk6utvpu/Switch Browser.alfredworkflow?dl=0 . It just takes all tabs from Vivaldi and opens them in Safari or vice versa deanishe 1 Link to comment
deanishe Posted November 7, 2017 Share Posted November 7, 2017 Thanks. That’s really interesting. I had no idea Hammerspoon could do that. I’ll have to look into that, as I currently use ControlPlane for that sort of thing, but I find it terribly clunky. Link to comment
vitor Posted November 8, 2017 Author Share Posted November 8, 2017 Update. Added minutes_between_checks variable. It defaults to 10 and can never be lower than that. Pinboard’s API documentation says it should never be lower than 5, but it pays to be careful. Maciej seems generally fair, but he’s also ruthless with blocking API abusers (unlikely in regular human usage). Everything else has already been answered (thank you @deanishe!). To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
WyldKard Posted November 15, 2017 Share Posted November 15, 2017 (edited) Installed this workflow and I can use the hotkey to add unread bookmarks fine, and I can search for bookmarks fine also. However, when I use "pa", no window pops up for me to add a regular bookmark. In Safari, Develop -> Allow JavaScript from Apple Events, is checked. Safari is not blocking pop-up windows. What else am I missing? Edited November 15, 2017 by WyldKard typo gingerbeardman 1 Link to comment
vitor Posted November 16, 2017 Author Share Posted November 16, 2017 @WyldKard Open the debugger, set the log output to “All Information”, and post the output. Link to comment
gingerbeardman Posted November 16, 2017 Share Posted November 16, 2017 (edited) I'm also not seeing anything when I do pa debug output: [2017-11-16 12:06:13][input.keyword] Processing output of 'action.script' with arg '' [2017-11-16 12:06:13][action.script] Processing output of 'action.script' with arg '' Interestingly, hotkey trigger does work. I just added this page to pinboard using the hotkey. pa did nothing I'm using Safari 11.0.1 (13604.3.5), macOS 10.13.1 (17B48) Develop "Allow JavaScript" options enabled Edited November 16, 2017 by gingerbeardman Link to comment
WyldKard Posted November 16, 2017 Share Posted November 16, 2017 My debug output is the same a gingerbeardman's: [2017-11-16 15:11:23][input.keyword] Processing output of 'action.script' with arg '' [2017-11-16 15:11:23][action.script] Processing output of 'action.script' with arg '' Link to comment
vitor Posted November 17, 2017 Author Share Posted November 17, 2017 @gingerbeardman @WyldKard Unfortunately, without an error there’s not much I can do in terms of debugging, since I can’t reproduce what is happening in your setups. What version of macOS are you both using? Link to comment
WyldKard Posted November 17, 2017 Share Posted November 17, 2017 Latest version of High Sierra. Link to comment
vitor Posted November 17, 2017 Author Share Posted November 17, 2017 2 hours ago, WyldKard said: Latest version of High Sierra. I suspected as much. I’m not yet on High Sierra, so I can’t test. No ETA yet as to when I’m going to upgrade; I always do a clean install so it requires some planning and free time. Link to comment
gingerbeardman Posted November 18, 2017 Share Posted November 18, 2017 (edited) Same, latest High Sierra. Edited November 20, 2017 by gingerbeardman Link to comment
dfay Posted November 18, 2017 Share Posted November 18, 2017 Back to the discussion of why people use Pinboard....because del.icio.us went yahoo and mag.nol.ia had an irrecoverable data loss.... I started using delicious about 12 years ago when I wanted a way to sync my bookmarks in Opera for win xp with my new iMac. Switched to Pinboard a couple years later and never looked back. Even though I’ve been off Windows since 2006 or so I’d never consider leaving now, mostly because of the tag-based organization - vastly preferable to folders for reference materials. deanishe and gingerbeardman 2 Link to comment
gingerbeardman Posted November 20, 2017 Share Posted November 20, 2017 (edited) pa doesn't work for me but the hotkey does still work. Odd, right? This means the issue on High Sierra is in the open_gui function, which only calls the run_bookmarklet JavaScript. Which got me thinking... why run one line of ruby, to run another line of ruby, to run some JavaScript? Seems overly complicated. So I replaced the ruby script action (which ran open_gui ruby, which ran run_bookmarklet javascript) with an action that runs an osascript JS with the code from run_bookmarklet pasted in directly. Now pa works just fine for me. Feel free to include this change in your workflow. I thought about uploading my modified workflow but settled on these screenshots instead. Edited November 20, 2017 by gingerbeardman vitor 1 Link to comment
vitor Posted November 21, 2017 Author Share Posted November 21, 2017 23 hours ago, gingerbeardman said: pa doesn't work for me but the hotkey does still work. Odd, right? Not really. They use very different methods of adding a bookmark. pa relies only on your browser and the Hotkey solely on the Pinboard API. 23 hours ago, gingerbeardman said: why run one line of ruby, to run another line of ruby, to run some JavaScript? For internal script consistency and because the open_gui originally didn’t work like that and might change in the future. 23 hours ago, gingerbeardman said: So I replaced the ruby script action (which ran open_gui ruby, which ran run_bookmarklet javascript) with an action that runs an osascript JS with the code from run_bookmarklet pasted in directly. Now pa works just fine for me. Feel free to include this change in your workflow. I thought about uploading my modified workflow but settled on these screenshots instead. I’m glad you got it working! I’ll consider making the change, though at the time I’m more interested in why that isn’t working on High Sierra and would rather explore that after I upgrade. Link to comment
gingerbeardman Posted November 26, 2017 Share Posted November 26, 2017 I got your new version and you seem to have solved the problem? Link to comment
vitor Posted November 26, 2017 Author Share Posted November 26, 2017 2 hours ago, gingerbeardman said: I got your new version and you seem to have solved the problem? Good to know! I was fixing another (related) bug and did wonder if it’d fix this one. Link to comment
WyldKard Posted December 5, 2017 Share Posted December 5, 2017 Can confirm - working here now also. vitor 1 Link to comment
vitor Posted April 7, 2018 Author Share Posted April 7, 2018 Update. When adding unread, show tab title and URL in notification. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted April 22, 2018 Author Share Posted April 22, 2018 (edited) Update. If you have the PinPlus app installed, pa opens that instead. This is particularly useful in cases where you want to add an incognito tab or from another profile where you’re not logged in, since the app will already have that information. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Edited April 22, 2018 by vitor Link to comment
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