fundler 0.2.1 → 0.2.2

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: fda62b3e708f8a1ece771a4c69131f7b214443b3
4
- data.tar.gz: 1e1cbffc3226da6009e52c6d9100c335ac2416bf
3
+ metadata.gz: 6bd396afe86ce80e1f88e81b56a12f30b81e07aa
4
+ data.tar.gz: 4d2eb9f303f0d4e6bae095e603e6d3d98339b2ae
5
5
  SHA512:
6
- metadata.gz: d9d5cbddbca99c87c97f7e0cd44668b7a41c9a1cec5844e96214a75606d492f60e5e6ac93aed705da7b8b8ce9b518877fa9bd4cb1998afab02e8d2852a32cf43
7
- data.tar.gz: d228ebe8d800123cf3a08d2b508358f08851e9d2877a6d277a64aae9051155cdc4499fe0a16f4b468a437ce26d3bf549a0d9d523d03657c3be577a6097e254af
6
+ metadata.gz: 1f1b195a5f4b970646708c0fd9d03e96a42252b60522a72544c67a053edcf0bf38cc2769be88d338ab3787eda00d00f8dbb79fe4fa9a5925d71cff83487dbe83
7
+ data.tar.gz: 0360ce610247f9e54ad3c2a2a955ba08e3e1f911739ad2382002f87d576550e31ea6c286c210bfe436ded229e8b09175d2e81ccdfaa214e3a1eb55c5e7d8f0f8
@@ -72,7 +72,36 @@ sqlite> select moz_places.url, datetime((moz_historyvisits.visit_date/1000000),
72
72
  =end
73
73
 
74
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 != '';}
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 != '';}
76
+ BOOKMARKS_QUERY = <<-SQL
77
+ SELECT DISTINCT
78
+ moz_places.url AS url,
79
+ moz_bookmarks.title AS title,
80
+ moz_items_annos.content AS description
81
+
82
+ FROM
83
+ moz_places,
84
+ moz_bookmarks,
85
+ moz_items_annos,
86
+ moz_anno_attributes
87
+
88
+ WHERE
89
+ moz_anno_attributes.name = 'bookmarkProperties/description'
90
+ AND moz_items_annos.anno_attribute_id = moz_anno_attributes.id
91
+ AND moz_items_annos.item_id = moz_bookmarks.id
92
+ AND moz_places.id = moz_bookmarks.fk
93
+ AND moz_places.id IN (
94
+ SELECT DISTINCT fk FROM moz_bookmarks
95
+ WHERE parent IN (
96
+ SELECT moz_bookmarks.id
97
+ FROM moz_bookmarks, moz_bookmarks_roots
98
+ WHERE moz_bookmarks_roots.root_name = 'tags'
99
+ AND moz_bookmarks.parent = moz_bookmarks_roots.folder_id
100
+ )
101
+ )
102
+
103
+ ORDER BY UPPER(moz_bookmarks.title) ASC
104
+ SQL
76
105
  def drop_bookmarks
77
106
  dot_firefox = Dir.open(MOZILLA_FIREFOX_CONF_DIR)
78
107
  profile_dir = dot_firefox.select {|dir| dir =~ /.*default/}
@@ -81,6 +110,7 @@ sqlite> select moz_places.url, datetime((moz_historyvisits.visit_date/1000000),
81
110
  db = SQLite3::Database.new(db_file)
82
111
  db.execute(BOOKMARKS_QUERY) do |row|
83
112
  puts row
113
+ puts '---'
84
114
  end
85
115
  FileUtils.cp(db_file, pwd)
86
116
  end
@@ -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.1"
4
+ VERSION = "0.2.2"
5
5
  end
data/places.sqlite ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zeroed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-28 00:00:00.000000000 Z
11
+ date: 2013-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -57,6 +57,7 @@ files:
57
57
  - lib/fundler/find_and_clean.rb
58
58
  - lib/fundler/fundler_utils.rb
59
59
  - lib/fundler/version.rb
60
+ - places.sqlite
60
61
  - spec/fundler_spec.rb
61
62
  - spec/fundler_spec.rb~
62
63
  homepage: https://github.com/zeroed/fundler
@@ -86,3 +87,4 @@ summary: find rename utility
86
87
  test_files:
87
88
  - spec/fundler_spec.rb
88
89
  - spec/fundler_spec.rb~
90
+ has_rdoc: