Skip to content

Instantly share code, notes, and snippets.

@egrouse
Created April 1, 2012 19:59
Show Gist options
  • Save egrouse/2278208 to your computer and use it in GitHub Desktop.
Save egrouse/2278208 to your computer and use it in GitHub Desktop.
Sending Google Reader posts to OmniFocus for Mac
<?php
// Send Google Reader posts to OmniFocus
// Ellis Grouse <mr@egrouse.com>
// http://egrouse.com/blog/sending-google-reader-posts-to-omnifocus-for-mac.html
// Set variables
$url = $_GET['u'];
$title = $_GET['t'];
$source = $_GET['s'];
if( strlen( $url ) < 1 )
{
echo "To use this script, add the following as a custom option under Send To in Google Reader: <br />";
echo 'http://egrouse.com/tool/grof.php?t=${title}&u=${url}&s=${source}';
die();
}
// Make them nicer
$name = 'Read: ' . $title;
$note = 'From: ' . $source . "\n" . $url;
$target = 'omnifocus:///add?name=' . rawurlencode( $name ) . '&note=' . rawurlencode( $note );
header( 'Location: ' .$target );
?>
http://egrouse.com/tool/grof.php?t=${title}&u=${url}&s=${source}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment