firelinks 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -13,9 +13,10 @@ Benefits:
13
13
 
14
14
  ## Prerequisites
15
15
 
16
- * Linux (does not work yet on OS X)
16
+ * Supported platforms: Linux and OS X
17
17
  * [elinks][elinks]
18
18
  * Firefox 3 or higher
19
+ * sqlite3 version 3.7.4 or higher
19
20
  * Ruby (tested on 1.9.2)
20
21
 
21
22
  [elinks]:http://elinks.or.cz/
data/lib/firelinks.rb CHANGED
@@ -1,22 +1,24 @@
1
1
 
2
-
3
2
  puts "Starting firelinks"
4
3
  puts "Press CTRL-C to stop"
5
4
  sleep 1
6
5
 
7
-
8
-
9
6
  if `which elinks` !~ /\w/
10
7
  abort "Missing elinks! Please install it."
11
8
  end
12
9
 
13
- history_path = `find #{ENV['HOME']}/.mozilla/firefox -name places.sqlite`.chomp
10
+ `killall elinks`
11
+
12
+ paths = ["#{ENV['HOME']}/.mozilla/firefox", "#{ENV['HOME']}/Library/Application Support"]
13
+ history_path = `find #{paths.map {|p| "'#{p}'"}.join(' ')} -name places.sqlite`.chomp
14
+
15
+ puts "Using Firefox database: #{history_path.inspect}"
14
16
 
15
17
  if history_path == ''
16
18
  abort "You're missing your Firefox browser history database. Are you sure you have a recent version of Firefox installed?"
17
19
  end
18
20
 
19
- command = %Q{sqlite3 -line #{history_path} 'select url, title, last_visit_date from moz_places order by last_visit_date desc limit 2'}
21
+ command = %Q{sqlite3 -line '#{history_path}' 'select url, title, last_visit_date from moz_places order by last_visit_date desc limit 2'}
20
22
 
21
23
  use_remote = nil
22
24
 
@@ -1,3 +1,3 @@
1
1
  module Firelinks
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firelinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: