Jump to content

DAWG – keyword-based link template expander


Recommended Posts

Description:

 

Define URL templates, assign keywords to specific url template expansions, have your services at your fingertips.

Use cases: assign keywords to different project dashboards in bug tracking, error tracking, application monitoring services; open different mailboxes and calendars

 

Project on GitHubhttps://github.com/v-yarotsky/dawg

 

Screenshot:

 

OneLogin:

screenshot.png

 

Usage

 

Example 1: open different gmail mailboxes in the browser:

 

Run "dawg edit" in Alfred, replace file contents with the following snippet, then save & quit the editor (don't worry, it'll run a separate instance for editing the config, using open -n).

{
  "gmail.com": {
    "keyword": "mail",
    "template": "https://mail.google.com/mail/u/?authuser={email}",
    "substitutions": {
      "work": { "email": "me@mycompany.com" },
      "my":   { "email": "me@gmail.com" }
    }
  }
}

Then use "mail work" and "mail my" to access gmail accounts, respectively.

 

Example 2: multiple URL template parameters

{ 
  "www.datadoghq.com": {
    "keyword": "dog",
    "template": "https://app.datadoghq.com/{type}/{id}",
    "substitutions": {
      "myboard": { "id": "00001", "type": "screen" },
      "mydash":  { "id": "00004", "type": "dash" }
    }
  }
}

Download Links:

 

https://github.com/v-yarotsky/dawg/releases/latest

 

Dependencies:
 

None

 

License

 

WTFPL

 

Post Updates:

 

03/23/2016: Clarify that the editor app must be closed after editing the config.

Edited by vlyrs
Link to comment

Very, very cool idea.
 
A couple of things: The self-update isn't too great. open -W -n requires that you quit the application, not just close the file. I spent far too long trying to figure out how to make the workflow update its info.plist (there isn't a keyword to force an update). Only after digging through the source code and the open man page did I figure out what was going on and why I had 3 copies of Sublime Text open. This definitely needs to be explained in the README/workflow description.

The user's configuration would be better off in the proper directory (~/Library/Application Support/Alfred 2/Workflow Data/<bundle id>). That way it won't get overwritten on update.

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...