Skip to content

Instantly share code, notes, and snippets.

@philgruneich
philgruneich / Groceries: Drafts, Ita and Fantastical
Created June 26, 2013 00:20
From Drafts, it creates an event on Fantastical named "Ir ao Supermercado" ("Go to the Supermarket", in portuguese), starting in your current day at 7PM and ending 30 minutes later. Then it attached the draft you wrote in Drafts to a Ita list named "Compras" ("Groceries", in portuguese). Previously, we also included the url-scheme to view this l…
fantastical://x-callback-url/parse?title=Ir%20ao%20supermercado&start=[[date]]%2019:00&end=[[date]]%2019:30&url=ita://openList%3Flist%3DCompras&x-source=Ita&x-success={{ita://addItem?list=Compras&items=[[draft]]}}
@philgruneich
philgruneich / Safari to Byword formatted as a Kirby post
Created June 26, 2013 03:29
I was looking for a solution for the absence of window.getSelection in the iPhone Safari. Decided to use the clipboard, integrating it with Drafts with more data to create a blog post at Byword, formatted for a Kirby post. Oh, we also create a Evernote note in the way (:
1. Add this bookmarklet to Safari:
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'%5Cn')+encodeURIComponent(location.href)+'&action=Kirbylity'
2. Add an Evernote or Dropbox action, I'm using an Evernote action called Blogquotes.
3. Add this action to Drafts, named Kirbylity:
drafts://x-callback-url/create?text=[[draft]]&action=Blogquotes&afterSuccess=Delete&x-success={{byword://new?text=Title:%20[[title]]%0d----%0dLink:%20[[body]]%0d----%0dExcerpt:%20%3e[[clipboard]]%0d----%0dText:%20%3e[[clipboard]]}}
@philgruneich
philgruneich / Gmail 2.0
Created July 4, 2013 10:45
The perfect Gmail action with Drafts First line is to add the destination's mail address. Second line is for the subject. Third line is the body of the email
googlegmail:///co?to=[[line|1]]&subject=[[line|2]]&body=[[line|3]]
@philgruneich
philgruneich / Fantastical+Clear
Created July 4, 2013 10:49
This is an action made by the ingenious Epic Pramono before the [[line|n]] update. This is the improved version, taking advantage of that rule. It sends the first line as a sentence to Fantastical and the third line is add as a task to Clear, inside the list that you choose in the second line.
fantastical://x-callback-url/parse?sentence=[[line|1]]&x-source=Clear&x-success={{clearapp://task/create?listName=[[line|2]]&taskName=[[line|3]]}}
@philgruneich
philgruneich / Batch add to Things using Reminders integration
Created July 9, 2013 04:11
This action adds several tasks to Things using its Reminders integration (gotta turn it on under Settings). After done, it opens Things.
drafts://x-callback-url/create?text=[[draft]]&action=List%20in%20Reminders&x-success=things:
@philgruneich
philgruneich / Add to Firetask later
Created July 9, 2013 04:14
Create a Due reminder (title in the first line, date/time specification for Due in the second) with a link to add the task to Firetask (seriously!) only when you need the task in your inbox.
due://x-callback-url/add?title=[[title]]%20at%20[[body]]%0A{{firetask://addTask?subject=[[title]]}}&x-source=Drafts&x-success={{drafts://}}
@philgruneich
philgruneich / Add to The Hit List later
Created July 9, 2013 04:14
Create a Due reminder (title in the first line, date/time specification for Due in the second) with a link to add the task to The Hit List (if you still have hopes!) only when you need the task in your inbox.
due://x-callback-url/add?title=[[title]]%20at%20[[body]]%0A{{thehitlist:///inbox/tasks?method=POST&index=0&title=[[title]]}}&x-source=Drafts&x-success={{drafts://}}
@philgruneich
philgruneich / Add to Ita later
Created July 9, 2013 04:17
Create a Due reminder (list name in the first line, task name in the second, date/time specification for Due in the third) with a link to add the task to Ita only when you need the task in your to-do list.
due://x-callback-url/add?title=[[line|2]]%20at%20[[line|3]]%0A{{ita://addItem?list=[[line|1]]&items=[[line|2]]}}&x-source=Drafts&x-success={{drafts://}}
@philgruneich
philgruneich / Send short markdown email
Created July 31, 2013 00:59
one-tap send clipboard message in markdown as an HTML email using Drafts and Launch Center Pro. This action takes the first line as recipients, second line as subject and moves your content around using the clipboard. It only works for short emails that use no more than a single paragraph.
//Create the following rule at Launch Center Pro:
drafts://x-callback-url/create?text={{[[clipboard]]}}&action=Markdown%20Short
//Add the following rule to Drafts, named Markdown Short:
drafts://x-callback-url/create?text=[[line|3]]&action=Markdown%3A%20Copy%20to%20Clipboard&x-source=Drafts&x-success={{drafts://x-callback-url/create?text=[[line|1]]%0A[[line|2]]&action=Short%20Clipboard%20Mail&afterSuccess=Delete}}&afterSuccess=Delete
//Add this other rule to Drafts, named Short Clipboard Mail:
@philgruneich
philgruneich / Send long markdown email
Created July 31, 2013 01:02
one-tap send clipboard message in markdown as an HTML email using Drafts and Launch Center Pro. This action takes the first line as recipients and the remaining as the content. This action works for emails with more than a single paragraph.
//Create the following rule at Launch Center Pro:
drafts://x-callback-url/create?text={{[[clipboard]]}}&action=Markdown%20Long
//Add the following rule to Drafts, named Markdown Long:
drafts://x-callback-url/create?text=[[body]]&action=Markdown%3A%20Copy%20to%20Clipboard&x-source=Drafts&x-success={{drafts://x-callback-url/create?text=[[title]]&action=Long%20Clipboard%20Mail&afterSuccess=Delete}}&afterSuccess=Delete
//Add this other rule to Drafts, named Long Clipboard Mail: