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 +2 -1
- data/lib/firelinks.rb +7 -5
- data/lib/firelinks/version.rb +1 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -13,9 +13,10 @@ Benefits:
|
|
13
13
|
|
14
14
|
## Prerequisites
|
15
15
|
|
16
|
-
*
|
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
|
-
|
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
|
|
data/lib/firelinks/version.rb
CHANGED