Jump to content

PinAdd — Takes arguments as tags, and adds your browser’s frontmost tab as a pinboard bookmark


Recommended Posts

Wow, Vitor, it's crazy quick now!

I love it. I love it. I love it. I love it... THANKS! :D

Thanks for the update and the insight.  The new version is definitely faster.

 

Thank you all, it’s good to know the difference is as noticeable as I hoped it’d be.

 

I think squiggly brackets would work but something quicker to type would be perhaps splitting the description from tags with a forward slash,

 

e.g. pin onetag anothertag / This is my description, and if there is no slash then there is no description.

 

Agreed, something quicker would be more convenient, as would be having a single separator. My only worry is to not set something that could possibly be used as a tag, that’s why I’m a fan of repeated characters for this (something like “||” or even “,,”). I’ll do some tests.

Link to comment

After making some tests, I was able to reproduce the problem. The bad news is that there is currently no way to avoid that in Alfred unless the workflow goes back to its previous, slower, mode of operation. You can understand why, then, I’m a bit thorn on this.
 
The problem arises from how Alfred operates, even though it’s a feature, not a bug. You’ll notice it’s not the tags themselves that get truncated, it’s the full text you type into the workflow. This happens when the script filter didn’t have time to update with everything you typed. So we need to either give it a moment before pressing return, or go back to the previous version. Needless to say, I find neither of those options optimal, but unfortunately it is also out of my control, as this is something having to do with the way workflows in Alfred work.
 
The optimal solution, however, would be to not have that limitation at all, and I’ve started a thread with that request, where you can voice your opinion — the more interest there is, the more likely this is to be considered/implemented. There’s also another thread with a similar request, that you can follow.

Link to comment

Good news, everyone (cue Hubert Farnsworth).

You can now safely return to the newest version. Not only is the truncated tags issue solved, the workflow is even faster than it was. I thought about it, and found what I believe to be an acceptable solution. The workflow doesn’t look as good on the editing window, but why should that even be a factor?

Here’s the part that I don’t like — instead of showing you only the configuration options or only the bookmark adding options, it’ll now do a kind of hybrid. If you don’t have your account set, that option will appear, but so will the other two (add bookmark, and add private bookmark). However, since you probably will only need to configure it once, and that’ll be the first time you use it, Alfred should display this as the first option, which is good. When your account is already configured, the option will still show when you first type “pin”, but it’ll disappear once you type your first character after that (when you start inputting your tags); doing this is what allows it to still run the script that’ll get your tab’s url and title. Yes, it’s still possible to be so fast as to go past it (even though it would make it not add the bookmark, instead of truncating the text), but from my tests, you’d have to be stupidly fast — I could only do it while really trying hard, and had to be so fast I could only add a single one‐character tag, as even typing two characters was enough time for the workflow to catch everything correctly.

I’ve removed the old version and the warning from the original post, please try it out, and let me know if you find any issues.

Link to comment

Another update.

Configuration now has its own dedicated option. I removed the “resetpinaddsettings” way of work, you can now configure it via “configurepinadd” (issuing it again will overwrite your settings).

I did this so the option that disappears can now be more clear — by default it’ll just show you a message informing you that it’s getting the relevant url and title, and if your account isn’t yet set, it’ll warn you of that; it is also now simply called with “pi”, which means that by the time you finish writing “pin” to input your tags, it’ll have already started working on getting the tab’s url and title, making even more unlikely the previously mentioned scenario of being too fast typing.

Edited by Vítor
Link to comment

And one more update (yes, I should’ve probably waited to post everything at once, but I didn’t know I was actually going to implement anything else today).

It now supports descriptions. To use them, just precede them with “// ” (two forward slashes and a space); they are completely optional, but if you add both tags and a description, the description must come after the tags.

Also, tags are now optional — you can have a bookmark with only a description (you still need to precede it with “// ”), only tags, or even without them both.

Edited by Vítor
Link to comment

And one more update.

 

This is to fix a bug where private tags with description would be wrongly parsed.

 

Also now, choosing “Add a bookmark” will add it as a public one, regardless of your Pinboard defaults. I did this since leaving the people who have bookmarks as private by default without an option to add them as public was always something I considered changing. Alfred learns about what you use more, anyway, so this seems to me like a better option.

Link to comment

There is now.

Update to the latest version and set you browser as “depends” — that’ll use the browser that is you frontmost app, if any, at the time you call PinAdd to add a bookmark. Keep in mind that only the same browsers are supported, and that since from the way this works it’s not possible to interrupt Alfred in case your frontmost app is not a supported browser, you’ll still get the “Operation done” message, but no bookmark will be added.

Edited by Vítor
Link to comment

Alright, this is now in my favorite workflow list. So simple to use. Will make pinboard about 10x more useful for me.

 

Thank you. I’ve really strived to make it simple and easy to use (hence having tried a lot of different approaches regarding small details like the configuration), so it’s good to know it makes a difference.

Link to comment

Is there a way to add a bookmark as unread? If not, and it's possible, maybe you should consider it. Something like "pin tech news %unread"

 

It is planned, yes, and it should be relatively straightforward to implement. I was thinking of something more along the lines of “pin . atag anothertag” (so you would just need to set your first tag to be a period). I also thought about the possibility of having it as another option, next to add a bookmark and add a private bookmark, but then there’d be four options in total (the two there are now plus add as unread and add as unread private), and that already starts to feel like a hack. I could also possibly implement it as “rpin atag anothertag”; that way the two original options would still be present, but would also directly add as unread (that’d probably require more changes to the code, considering how the script is constructed).

I haven’t implemented it yet because the idea of having an option to add as unread also calls to me the notion of also being able to directly see and open unread bookmarks (via a script filter). This is the point where I start to think if it shouldn’t be a separate workflow for your reading list (possibly later implementing an option to check “regular” tags). I don’t want to implementing this feature here and later move it to another workflow, breaking someone’s workflow in the process.

As of now, I’m more inclined to adding it to this workflow (with the . option), and just grow it from there.

As you can see, I’ve thought about this a lot, but I’m open to other ideas as well.

Edited by Vítor
Link to comment

It is planned, yes, and it should be relatively straightforward to implement. I was thinking of something more along the lines of “pin . atag anothertag” (so you would just need to set your first tag to be a period). I also thought about the possibility of having it as another option, next to add a bookmark and add a private bookmark, but then there’d be four options in total (the two there are now plus add as unread and add as unread private), and that already starts to feel like a hack. I could also possibly implement it as “rpin atag anothertag”; that way the two original options would still be present, but would also directly add as unread (that’d probably require more changes to the code, considering how the script is constructed).

I haven’t implemented it yet because the idea of having an option to add as unread also calls to me the notion of also being able to directly see and open unread bookmarks (via a script filter). This is the point where I start to think if it shouldn’t be a separate workflow for your reading list (possibly later implementing an option to check “regular” tags). I don’t want to implementing this feature here and later move it to another workflow, breaking someone’s workflow in the process.

As of now, I’m more inclined to adding it to this workflow (with the . option), and just grow it from there.

As you can see, I’ve thought about this a lot, but I’m open to other ideas as well.

 

haha, yes, you did think about this a lot. :) In my opinion you should just add the . option in this workflow. It's a nice addition and at that point you would have all the features that the pinboard bookmarklet has, which would be neat. (well, except autocompletion, but I'm not sure if that is possible or even a good idea)  

 

I personally am not really into the idea of a reading list workflow because I use dedicated apps for that purpose. Pocket for Mac is just wonderful.

(at this point you are probably wondering why I even tag bookmarks as unread in Pinboard. Well, for articles/pages I may want to come back and check out later. For Instance when somebody makes a prediction about something, I save the page as unread in Pinboard so that I can come back and see if the prediction was right.) 

Edited by hailalistair
Link to comment

I agree. I’ll probably just do it with the “.” option. It would be more in line with the rest of the workflow (it’s called PinAdd, after all).

 

I also like your idea of saving predictions to check out later (not for the workflow, naturally, but in general I think it’s a nice idea).

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...