PageRenderTime 52ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/app/views/integrations/index.en.html.erb

https://github.com/bgrolleman/tracks
Ruby HTML | 129 lines | 113 code | 16 blank | 0 comment | 15 complexity | 175a3ba93ae39e4d36a923f5d33c2f70 MD5 | raw file
  1. <% has_contexts = !current_user.contexts.empty? -%>
  2. <h1>Integrations</h1>
  3. <p>Tracks can be integrated with a number of other tools...
  4. whatever it takes to help you get things done!
  5. This page has information on setting up some of these.
  6. Not all of these are applicable to all platforms, and some require more
  7. technical knowledge than others.
  8. See also <%= link_to "developer documentation for Tracks' REST API", url_for(:action => 'rest_api') %>.</p>
  9. <br/><p>Contents:</p>
  10. <ul>
  11. <li><a href="#applescript1-section">Add an Action with Applescript</a></li>
  12. <li><a href="#applescript2-section">Add an Action with Applescript based on the currently selected Email in Mail.app</a></li>
  13. <li><a href="#quicksilver-applescript-section">Add Actions with Quicksilver and Applescript</a></li>
  14. <li><a href="#email-cron-section">Automatically Email Yourself Upcoming Actions</a></li>
  15. <li><a href="#message_gateway">Integrate Tracks with an email server to be able to send an action through email to Tracks</a></li>
  16. <li><a href="#google_gadget">Add Tracks as a Google Gmail gadget</a></li>
  17. </ul><br/>
  18. <p>Do you have one of your own to add?
  19. <a href="http://www.getontracks.org/forums/viewforum/10/" title="Tracks | Tips and Tricks">Tell us about
  20. it in our Tips and Tricks forum</a> and we may include it on this page in a future versions of Tracks.
  21. </p>
  22. <a name="applescript1-section"> </a>
  23. <h2>Add an Action with Applescript</h2>
  24. <p>This is a simple script that pops up a dialog box asking for a description, and then sends that to Tracks with a hard-coded context.</p>
  25. <% if has_contexts -%>
  26. <ol>
  27. <li>Choose the context you want to add actions to: <select name="applescript1-contexts" id="applescript1-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
  28. </li>
  29. <li>Copy the Applescript below to the clipboard.<br />
  30. <textarea id="applescript1" name="applescript1" rows="15"><%= render :partial => 'applescript1', :locals => { :context => current_user.contexts.first } %></textarea>
  31. </li>
  32. <li>Open Script Editor and paste the script into a new document.</li>
  33. <li>Compile and save the script. Run it as necessary.</li>
  34. </ol>
  35. <% else %>
  36. <br/><p id="no_context_msg"><i>You do not have any context yet. The script will be available after you add your first context</i></p>
  37. <% end %>
  38. <a name="applescript2-section"> </a>
  39. <h2>Add an Action with Applescript based on the currently selected Email in Mail.app</h2>
  40. <p>This script takes the sender and subject of the selected email(s) in Mail and creates a new action for each one, with the description, "Email [sender] about [subject]". The description gets truncated to 100 characters (the validation limit for the field) if it is longer than that. It also has Growl notifications if you have Growl installed.</p>
  41. <% if has_contexts -%>
  42. <ol>
  43. <li>Choose the context you want to add actions to: <select name="applescript2-contexts" id="applescript2-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
  44. </li>
  45. <li>Copy the Applescript below to the clipboard.<br />
  46. <textarea id="applescript2" name="applescript2" rows="15"><%= render :partial => 'applescript2', :locals => { :context => current_user.contexts.first } %></textarea>
  47. </li>
  48. <li>Open Script Editor and paste the script into a new document.</li>
  49. <li>Compile and save the script to the ~/Library/Scriipts/Mail Scripts directory.</li>
  50. <li>For more information on using AppleScript with Mail.app, see <a href="http://www.apple.com/applescript/mail/" title="Scriptable Applications: Mail">this overview</a>.</li>
  51. </ol>
  52. <% else %>
  53. <br/><p><i>You do not have any context yet. The script will be available after you add your first context</i></p>
  54. <% end %>
  55. <a name="quicksilver-applescript-section"></a>
  56. <h2>Add Actions with Quicksilver and Applescript</h2>
  57. <p>This integration will allow you to add actions to Tracks via <a href="http://quicksilver.blacktree.com/">Quicksilver</a>.</p>
  58. <% if has_contexts -%>
  59. <ol>
  60. <li>Choose the context you want to add actions to: <select name="quicksilver-contexts" id="quicksilver-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
  61. </li>
  62. <li>Copy the Applescript below to the clipboard.<br />
  63. <textarea id="quicksilver" name="quicksilver" rows="15"><%= render :partial => 'quicksilver_applescript', :locals => { :context => current_user.contexts.first } %></textarea>
  64. </li>
  65. <li>Open Script Editor and paste the script into a new document.</li>
  66. <li>Compile and save the script as "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ (you may need to create the Actions directory)</li>
  67. <li>Restart Quicksilver</li>
  68. <li>Activate Quicksilver (Ctrl+Space by default)</li>
  69. <li>Press "." to put quicksilver into text mode</li>
  70. <li>Type the description of the next action you want to add</li>
  71. <li>Press tab to switch to the action pane.</li>
  72. <li>By typing or scrolling, choose the "Add to Tracks" action.</li>
  73. </ol>
  74. <% else %>
  75. <br/><p><i>You do not have any context yet. The script will be available after you add your first context</i></p>
  76. <% end %>
  77. <a name="email-cron-section"> </a>
  78. <h2>Automatically Email Yourself Upcoming Actions</h2>
  79. <p>If you enter the following entry to your crontab, you will receive email every day around 5 AM with a list of the upcoming actions which are due within the next 7 days.</p>
  80. <textarea id="cron" name="cron">0 5 * * * /usr/bin/curl -0 "<%= home_url %>todos.txt?due=6&token=<%= current_user.token %>" | /usr/bin/mail -e -s 'Tracks actions due in the next 7 days' youremail@yourdomain.com</textarea>
  81. <p>You can of course use other text <%= link_to 'feeds provided by Tracks', feeds_path %> -- why not email a list of next actions in a particular project to a group of colleagues who are working on the project?</p>
  82. <a name="message_gateway"> </a>
  83. <h2>Integrated email/SMS receiver</h2>
  84. <p>
  85. If Tracks is running on the same server as your mail server, you can use the integrated mail handler built into tracks. Steps to set it up:
  86. </p>
  87. <ul>
  88. <li>Go to <%= link_to t('layouts.navigation.preferences'), preferences_url %> and
  89. set your "<%= Preference.human_attribute_name('sms_email') %>" and
  90. "<%= Preference.human_attribute_name('sms_context') %>" for todos sent in
  91. via email (which could come from an SMS message)</li>
  92. <li>In sendmail/qmail/postfix/whatever, set up an email address
  93. alias to pipe messages to <pre>/PATH/TO/RUBY/ruby /PATH/TO/TRACKS/script/runner -e production 'MessageGateway.receive(STDIN.read)'</pre></li>
  94. <li>Send an email to your newly configured address!</li>
  95. </ul>
  96. <p>You can also use the Rich Todo API to send in tasks like "do laundry @ Home"
  97. or "Call Bill > project X". The subject of the message will fill description,
  98. context, and project, while the body will populate the tasks's note.
  99. </p>
  100. <a name="google_gadget"> </a>
  101. <h2>Add Tracks as a Google Gmail gadget</h2>
  102. <p>
  103. You can now manage your projects/actions inside Gmail using Tracks Gmail Gadget.
  104. Add Tracks Gmail gadget to the sidebar of Gmail and track your next actions
  105. or add new action without explicitly open new browser tab for Tracks. Steps to set it up:
  106. </p>
  107. <ul>
  108. <li>Sign in to Gmail and click Settings in the top right of your Gmail page. In Gmail setting page, click Labs tab</li>
  109. <li>Enable the "Add any gadget by URL" feature. You will find it at bottom of the list. Select Enable radio button and click Save Changes button.</li>
  110. <li>Now you can see Gadgets tab added to Gmail Settings. Go to the Gadgets tab</li>
  111. <li>Paste following link to the Add a gadget by its URL: and then click Add button:<br/>
  112. <pre><%= integrations_url + "/google_gadget" %></pre></li>
  113. </ul>