-
-
Save paralleltree/7f5cd6a86542c850e761feaf56cce351 to your computer and use it in GitHub Desktop.
PushBullet command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# requirements: ruby-pushbullet gem | |
require 'pushbullet' | |
if ARGV.count == 0 | |
name = __FILE__.tap { |f| break File.basename(f, File.extname(f)) } | |
warn "#{name} - An client of Pushbullet" | |
warn "Usage: #{name} [title] [file]" | |
warn "If no input files are specified, then the standard input is read." | |
exit 1 | |
end | |
Pushbullet.api_token = "token" | |
Pushbullet::Contact.me.tap do |me| | |
me.push_note(ARGV.shift, ARGF.read) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment