nikivi Posted August 16, 2017 Share Posted August 16, 2017 (edited) I want to make a workflow that will take user's current URL which will be an Imgur album and download contents of it to Desktop. I found this and this. First one requires jsawk to be installed which Alfred doesn't have and second requires python 3 which Alfred too sadly does not have. I looked into trying to compile the second python 3 into a static binary but apparently that is not possible or at least the solutions I tried did not work. My only solution is to rewrite that script in Go and produce a statically linked binary that Alfred can actually use or perhaps I can ask users to install jsawk when first running the command. Perhaps I am missing something and there is an easy solution to this all. Would be really lovely if I can get either of those scripts working under Alfred. Edited August 16, 2017 by nikivi Link to comment
vitor Posted August 16, 2017 Share Posted August 16, 2017 22 minutes ago, nikivi said: python 3 which Alfred too sadly does not have. It’s not Alfred that doesn’t have it; it’s macOS. If you want Python 3 in macOS (and Alfred), make a bug report. 24 minutes ago, nikivi said: Perhaps I am missing something and there is an easy solution to this all. jsawk is just a bash script with no dependencies and a permissive license. Just distribute it in your Workflow’s directory and call it from there (or add the directory to the PATH). That’s the best kind of dependency you could ask for: a single file with no dependencies and a public domain license. nikivi 1 Link to comment
deanishe Posted August 16, 2017 Share Posted August 16, 2017 1 hour ago, vitor said: jsawk is just a bash script with no dependencies and a permissive license. The README says it needs SpiderMonkey, the Mozilla JavaScript engine. Link to comment
deanishe Posted August 16, 2017 Share Posted August 16, 2017 The Python script looks trivial to port to Python 2. You probably just need to change some of the imports. nikivi 1 Link to comment
nikivi Posted August 16, 2017 Author Share Posted August 16, 2017 (edited) Reverting to previous commits of that python script worked. Here is the workflow. Thank you all. Will keep in mind that I can just include single file scripts like that for the future. Edited August 16, 2017 by nikivi Link to comment
vitor Posted August 16, 2017 Share Posted August 16, 2017 55 minutes ago, deanishe said: The README says it needs SpiderMonkey, the Mozilla JavaScript engine. Missed that. Thank you for the correction. 40 minutes ago, nikivi said: Will keep in mind that I can just include single file scripts like that for the future. If the license allows. For example, it it’s GPL (possibly the least free of all free licenses, despite their logo) I just write it off completely and look for something else (so I don’t have to make my own code less free). I it’s MIT or BSD, I typically include a _licensed directory at the root of the Workflow and inside keep a directory for each thing I’m sourcing, with their code and license (like so). That allows me to say “everything is public domain (or whatever license you choose), expect for what’s inside _license that have their own licenses”. 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