gcao Posted October 20, 2015 Share Posted October 20, 2015 (edited) Hi, Just want to share a workflow I created recently. It allows one to edit and run bookmarklets in Chrome easily. It can be invoked with "bm" keyword or Command+Shift+B hot key. (This workflow was intrigued by the AlfredBookmarklets workflow created by vitor) When "Edit bookmarklets" is selected, bookmarklets file will be opened in TextEdit. New bookmarklets can be added like Bookmarklet description: javascript code goes after ':' IMPORTANT: if you have installed this workflow before and added your own bookmarklets, please backup the bookmarklets file before re-install or upgrade the workflow. How to backup: In Alfred window, enter "bm" and select "Edit Bookmarklets" item, in the TextEdit window, save a copy to your Documents dir. How to restore from backup: After install the new workflow, follow same process above to open the Bookmarklets file, copy content from your backup and save. Download: https://www.dropbox.com/s/391e0si9aw3hbk1/Bookmarklets.alfredworkflow?dl=0 Edited October 22, 2015 by gcao Link to comment
vitor Posted October 21, 2015 Share Posted October 21, 2015 Hello gcao, I have a request. Would you mind changing your workflow’s icon? Legally, you’re not in the wrong, here. After all I release my workflows to the public domain, so you’re free to use it.That said, I’d still like it better if you changed the icon, to be honest. I’ve looked at the workflow, and I see no similarities between it and AlfredBookmarklet regarding their internals. It might have been inspired by its idea, but it seems to not be using its code or way of doing things.With that in mind, you might have also noticed all my workflows use a consistent theme. Among other things (like making it an interesting restriction when building new ones), it likely also helps with recognition, and after 32 released workflows, that is a good thing. I’d rather not have people thinking I built something I didn’t (you might feel the same, seeing as you’d be losing credit).It’d be one thing to use the icon for something completely unrelated (something that wouldn’t even be an Alfred workflow), but it is being used for something very similar, even tangential in functionality).Once more, I ask that you reconsider. Link to comment
gcao Posted October 21, 2015 Author Share Posted October 21, 2015 No problem. I'll switch to a different icon. I started building this one from the one you created and didn't bother changing the icon. Since you asked, I'll change it. Thanks again for your work. Link to comment
gcao Posted October 21, 2015 Author Share Posted October 21, 2015 I've updated the icon and fixed a issue. Please re-download from above link if you have the old one installed. Link to comment
vitor Posted October 21, 2015 Share Posted October 21, 2015 Thank you for understanding and being so quick with the change. I want to be clear that the request applies really only to the icon. Link to comment
gcao Posted October 21, 2015 Author Share Posted October 21, 2015 Sorry this is my first public workflow and not a lot of testing is done. I should add Alpha or Beta in the name Did you include "javascript:" in your javascript part? Please note that should not be included. You might want to enable debug mode and check the output to see what is wrong. Link to comment
gcao Posted October 22, 2015 Author Share Posted October 22, 2015 I updated the workflow. Now I'm escaping '<', '>', '&' when generating the xml string. When I find some time I might switch to use a xml library. Please try again. Link to comment
gcao Posted October 22, 2015 Author Share Posted October 22, 2015 I've updated the workflow path to "~/Dropbox/..." as a short term workaround. I'll need to look into alfred environment variables to get workflow home dir. It should be possible to pull pre-existing bookmarklets. I think bookmarklets are stored in a sqlite db, we could extract all urls which starts with 'javascript' and append to the bookmarklets file. I'll add it to my roadmap. Link to comment
gcao Posted October 22, 2015 Author Share Posted October 22, 2015 Another big issue is that the bookmarklet file is inside the workflow folder. Every time the workflow is updated, bookmarklet file will be overwritten. Need to look into that asap. Link to comment
vitor Posted October 22, 2015 Share Posted October 22, 2015 For Alfred’s environment variables, take a look into their documentation. even if you don’t use the variables themselves, the part at the end tells you where most stuff should be located.alfred_workflow_data is where you should store data that persists between installs. If you ls "${HOME}/Library/Application Support/Alfred 2/Workflow Data" in a terminal, you should see some from the workflows you have installed. 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