fundler 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b35a3e9a00cac088bce3dea10e6f6b8f15b07bf2
4
- data.tar.gz: 68eed8c72b01479b72ea7071237934bb29d8cb2b
3
+ metadata.gz: fda62b3e708f8a1ece771a4c69131f7b214443b3
4
+ data.tar.gz: 1e1cbffc3226da6009e52c6d9100c335ac2416bf
5
5
  SHA512:
6
- metadata.gz: 7b5d6a62f8f3e909101f88a82088bfd1a98af37d1858c2450cc525aed0c5db3ed1719c7cc0fced1e294fdcd9dd01e0fbb237ad27ba4e4fc34b7b9e7514881234
7
- data.tar.gz: fb72d4f7bcecf4dc5f66f4ea1f4d089c19b8b8e598a9767be15c8476fa46c23330221d34d82665bbf7f69b9fe8afe014204cd06aae6a9ace530106641ee37b4e
6
+ metadata.gz: d9d5cbddbca99c87c97f7e0cd44668b7a41c9a1cec5844e96214a75606d492f60e5e6ac93aed705da7b8b8ce9b518877fa9bd4cb1998afab02e8d2852a32cf43
7
+ data.tar.gz: d228ebe8d800123cf3a08d2b508358f08851e9d2877a6d277a64aae9051155cdc4499fe0a16f4b468a437ce26d3bf549a0d9d523d03657c3be577a6097e254af
@@ -1,4 +1,5 @@
1
- 
1
+ # coding: utf-8
2
+
2
3
  module FindAndClean
3
4
 
4
5
  # Finds all Ruby source files under the current or other supplied
@@ -51,15 +52,37 @@ module FindAndClean
51
52
  end
52
53
  puts out
53
54
  end
55
+
56
+ =begin rdoc
57
+
58
+ == Schema
59
+ http://people.mozilla.org/~dietrich/places-erd.png
60
+
61
+ == References
62
+ http://stackoverflow.com/questions/464516/firefox-bookmarks-sqlite-structure
63
+ https://developer.mozilla.org/en-US/docs/Places
64
+ https://developer.mozilla.org/en-US/docs/Retrieving_part_of_the_bookmarks_tree
65
+ https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavBookmarksService
66
+ http://davidkoepi.wordpress.com/2010/11/27/firefoxforensics/
67
+
68
+ == Queries
69
+ sqlite> select moz_places.url, moz_bookmarks.title from moz_places,moz_bookmarks where moz_places.id = moz_bookmarks.fk and moz_bookmarks.title != '';
70
+ sqlite> select keyword,url from moz_keywords left join moz_bookmarks on (moz_keywords.id = keyword_id) left join moz_places on (fk = moz_places.id);
71
+ sqlite> select moz_places.url, datetime((moz_historyvisits.visit_date/1000000), ‘unixepoch’, ‘localtime’), moz_historyvisits.visit_type from moz_places, moz_historyvisits where moz_historyvisits.place_id = moz_places.id order by moz_historyvisits.visit_date desc;
72
+ =end
54
73
 
55
74
  MOZILLA_FIREFOX_CONF_DIR = File.expand_path('~') + '/.mozilla/firefox/'
75
+ BOOKMARKS_QUERY = %q{select moz_places.url, moz_bookmarks.title from moz_places, moz_bookmarks where moz_places.id = moz_bookmarks.fk and moz_bookmarks.title != '';}
56
76
  def drop_bookmarks
57
77
  dot_firefox = Dir.open(MOZILLA_FIREFOX_CONF_DIR)
58
78
  profile_dir = dot_firefox.select {|dir| dir =~ /.*default/}
59
79
  db_file = MOZILLA_FIREFOX_CONF_DIR + profile_dir.join + '/places.sqlite'
60
- # require 'sqlite3'
61
- # db = SQLite3::Database.new(profile_dir << '/' << 'places.sqlite')
62
- puts FileUtils.cp(db_file, pwd)
80
+ require 'sqlite3'
81
+ db = SQLite3::Database.new(db_file)
82
+ db.execute(BOOKMARKS_QUERY) do |row|
83
+ puts row
84
+ end
85
+ FileUtils.cp(db_file, pwd)
63
86
  end
64
87
 
65
88
  end #FindAndClean
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
  class Fundler
3
3
  # The version of the Fundler Utility.
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zeroed