Skip to content

Commit

Permalink
Updated docs for destinations. Moving JIRA source to own folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerdude committed Jun 28, 2015
1 parent 44717a6 commit 0b9fda8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This I believe leads to tremendous life imbalances. Do I code now, or do I write

JIRA To Task managers is a set of scripts that you can schedule on your Mac, which create one task for each of your assigned JIRA tasks. You can use cron to "set it and forget it", and get back to *One Inbox Bliss*.

If you're a coder, and you use a different (scriptable) task manager on your Mac, I invite you to code a backend (see below). JXA can be fun!
If you're a coder, and you use a different (scriptable) task manager on your Mac, I invite you to code a destination (see below). JXA can be fun!

## Setting Up

Expand Down Expand Up @@ -72,7 +72,7 @@ After this, every time you run it it looks like this:

### Can't get object on (JXA file)
``
jiratotaskmanagers/lib/backends/add_to_omnifocus.jxa:1676:1700: execution error: Error on line 42: Error: Can't get object. (-1728)
jiratotaskmanagers/lib/task_destinations/add_to_omnifocus.jxa:1676:1700: execution error: Error on line 42: Error: Can't get object. (-1728)
``

This is nearly always a problem with your project or context not existing. Use the `--print-config` option to see the configuration and make sure your project names and contexts are correct. Go to the appropriate line (42 in this case) to see which variable is wrong for a hint.
Expand Down Expand Up @@ -117,11 +117,11 @@ As long as both your credentials file are secured as (chmod 700) and owned by th

If this bothers you, you can set the environment variable `JIRA_TO_TASKS_CRYPT_KEY` to have the configuration store use a different key. You will need to run -C to clear the config that uses the old key.

## How to add New Backends
## How to add New Destinations

So you have Super-Duper app and you want to add support for it? With JXA, this is now fairly simple to do. JXA is just like JavaScript, and you have our template here.

1. Copy lib/backends/add_to_things.jxa and edit it.
1. Copy `lib/task_destinations/add_to_things`.jxa and edit it.

Start by changing TaskApp = Application("Things") to match the app you want to work with. Use Applescript Editor (or Textmate with [AppleScript JXA Bundle](https://github.com/hackerdude/AppleScript-JXA.tmbundle)) and a sample JSON file, or just finish the rest of the changes and do trial-and-error with your own app.
1. Copy `jira-to-things` to jira-to-(yourapp)
Expand Down
2 changes: 1 addition & 1 deletion jira-to-omnifocus
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Which backend to use (Things in this case)
JXA_FILE = "add_to_omnifocus.jxa"
require File.join(File.dirname(__FILE__), 'lib/task_sources/jira_to_jxa_app')
require File.join(File.dirname(__FILE__), 'lib/task_sources/jira/jira_to_jxa_app')

CONFIG_STORE_OPTIONS = {
:config_store => "#{ENV['HOME']}/.jiratotaskmanagers/jira_to_omnifocus.yml",
Expand Down
2 changes: 1 addition & 1 deletion jira-to-reminders
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Which backend to use (Things in this case)
JXA_FILE = "add_to_reminders.jxa"
require File.join(File.dirname(__FILE__), 'lib/task_sources/jira_to_jxa_app')
require File.join(File.dirname(__FILE__), 'lib/task_sources/jira/jira_to_jxa_app')

CONFIG_STORE_OPTIONS = {
:config_store => "#{ENV['HOME']}/.jiratotaskmanagers/jira_to_reminders.yml",
Expand Down
2 changes: 1 addition & 1 deletion jira-to-things
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Which backend to use (Things in this case)
JXA_FILE = "add_to_things.jxa"
require File.join(File.dirname(__FILE__), 'lib/task_sources/jira_to_jxa_app')
require File.join(File.dirname(__FILE__), 'lib/task_sources/jira/jira_to_jxa_app')

CONFIG_STORE_OPTIONS = {
:config_store => "#{ENV['HOME']}/.jiratotaskmanagers/jira_to_things.yml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
require 'yaml'
require 'jira'
require 'json'
require File.join(File.dirname(__FILE__), '../config_store')
require File.join(File.dirname(__FILE__), '../../config_store')

class JiraToJxaApp

Expand Down

0 comments on commit 0b9fda8

Please sign in to comment.