summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]main.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.rb b/main.rb
index 9ef710f..c133181 100644..100755
--- a/main.rb
+++ b/main.rb
@@ -1,3 +1,5 @@
+#!/bin/env ruby
+
require 'nokogiri'
require 'open-uri'
require 'getoptlong'
@@ -10,13 +12,15 @@ opts = GetoptLong.new(
[ '--comment', '-c', GetoptLong::OPTIONAL_ARGUMENT ]
)
+QUICKNOTE_PATH = '/home/lemon/Documents/Notes/quicknote.md'
+
comment = nil
opts.each do |opt, arg|
case opt
when '--help'
puts <<-EOF
- quicknote grabs whatever URL you give it, parses out the title of the web page, and save it somewhere nice.
+ quicknote grabs whatever URL you have in the clipboard, parses out the title of the web page, and save it somewhere nice.
That is all.
EOF
@@ -42,7 +46,7 @@ URI.open(url) do |f|
title_out = title
end
-open('/tmp/toss.txt', 'a') do |f|
+open(QUICKNOTE_PATH, 'a') do |f|
if comment
f << "#{comment}: [#{title_out}](#{url})" + "\n"
else