Tomasz Banas
-
Posts
12 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by Tomasz Banas
-
-
Hi @siyahmadde
I'm looking for a timer like this but without HUE integration, is there any easy way to do it?
-
Deanishe, you're right. I'm not sure what to do, where to add my API key, etc. I created "script filter" but still don't know what I'm doing wrong. Do you mind uploading the final forkflow? as of the installation Alfred says "If you intend to distribute your workflow to other users, you should include Alfred-Workflow (and other non-standard Python libraries your workflow requires) within your workflow as described above. Do not ask users to install anything into their system Python. That way lies broken software." So, I guess I should not to force someone to install anything.
I appreciate your help.
-
On 6/28/2017 at 4:18 PM, deanishe said:
Using my Python library for workflows, you'd use a Script Filter and the code would look something like the below. You haven't provided enough information to actually test it, though (such as the actual API you're using), so this is an untested guess.
import sys from workflow import Workflow3, web log = None def main(wf): query = wf.args[0] url = 'https://api.website.com/?domain={}&apikey={}&output=json'.format(query, apikey) r = web.get(url) r.raise_for_status() data = r.json() wf.add_item('DNS test of ' + query) wf.add_item('Expected response: ' + data['expectedresponse']) for i, d in enumerate(data['response']['server']): title = '{} {} - {} - {}'.format( i + 1, d['location'], d['resultvalue'], d['resultstatus']) wf.add_item(title) wf.send_feedback() if __name__ == '__main__': wf = Workflow3() log = wf.logger sys.exit(wf.run(main))
Here's the workflow - http://d.inco.re/mYKH6
-
I'm new to creating Workflows. I'm trying to create a workflow that will pull the data via API to JSON and show results directly in Alfred without the need to visit the website to look at the response.
API REQUEST
GET https://api.website.com/?domain=test.com&apikey=yourapikey&output=output_type
So, what I'm trying to do is this:
type "dns test.com"
then request is:
GET https://api.website.com/?domain=test.com&apikey=123123123123123&output=json
The response will be:
JSON response will look like this:
{ "query": { "tool": "name of the tool", "domain": "test.com" }, "expectedresponse": "205.204.123.234", "response": { "server": [ { "location": "Town, Country", "resultvalue": "205.204.123.123", "resultstatus": "ok" }, { "location": "Another Town, Another Country", "resultvalue": "205.204.123.234", "resultstatus": "ok" }, ] } }
and I'm trying to show it in the Alfred window:
DNS test of test.com
Expected Response: 205.204.70.111
1. Town, Country - 205.204.123.123 - NOT OK
2. Another Town, Another Country - 205.204.123.234 - OK
etc.
Any help would be appreciated
-
I just prepared very simple workflow to check DNS propagation time. It's helpful when redirecting domains and checking if DNS propagated yet. At this moment it's using www.whatsmydns.net but I may consider expanding it to show it in the Alfred directly.
Just type:
"dnsprop {domain.name}" and a page with results will open.
-
How can I set a source language? Google got confused multiple times.
-
Great, it works now. Thank you.
-
18 minutes ago, vitor said:
@Tomasz Banas The earlier tip was correct. Add return {query} at the end of the Run Script, and it’ll work.
You should also add a Transform action before Post Notification, like so:
And tell it to Trim Whitespace:
Otherwise you’ll not see the % sign, as it’ll be in a different line (due to the return).
Now it stopped working
-
-
I'm trying to create a very simple workflow
1. Keyword: mic
(with space)
argument required
2. Run Script
osa script
set volume input volume {query}
3. Post Notification
Microphone Volume Set to {query} %
I have no idea any notification does not show {query} at all
Thanks in advance for all your help.
-
Join or start a zoom.us meeting
in Share your Workflows
Posted
How about a workflow that allows us to schedule new meetings?