bookmarks 0.2.2 → 0.2.3
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 +5 -5
- data/Changelog.markdown +5 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +23 -15
- data/README.markdown +12 -34
- data/Rakefile +0 -2
- data/VERSION +1 -1
- data/lib/bookmarks.rb +0 -2
- data/lib/bookmarks/document.rb +1 -3
- data/lib/bookmarks/netscape_bookmark.rb +1 -1
- metadata +21 -23
- data/TODO +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c726f4dc691f88e4ec5b961e77cefc7d4be701299caf85465e7184c3f512a327
|
4
|
+
data.tar.gz: c42f9e44e016dfa278dd6bf5a0b706720c8f71d2ee601a351766120c55f3a151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2baf9e476d6501e22801ca9dc9d7aea6a294afd7eefa681a11e43a11452537bc720e7a2f243709d546a86788fc4f0bce6879a0f081b2b37d44f7734c040de26d
|
7
|
+
data.tar.gz: 4cd6ad718db23b406414a67b8bbd503baeb79d8390bc3f9a8704b87f334f3d043179445952736b9966f2d3c0a7970035c8380dece19873b514484e11cc6c6ef3
|
data/Changelog.markdown
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,29 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bookmarks (0.2.
|
4
|
+
bookmarks (0.2.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
coco (0.7.1)
|
10
|
-
diff-lcs (1.
|
11
|
-
rake (
|
12
|
-
rspec (
|
13
|
-
rspec-core (~>
|
14
|
-
rspec-expectations (~>
|
15
|
-
rspec-mocks (~>
|
16
|
-
rspec-core (
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
diff-lcs (1.3)
|
11
|
+
rake (12.3.0)
|
12
|
+
rspec (3.7.0)
|
13
|
+
rspec-core (~> 3.7.0)
|
14
|
+
rspec-expectations (~> 3.7.0)
|
15
|
+
rspec-mocks (~> 3.7.0)
|
16
|
+
rspec-core (3.7.1)
|
17
|
+
rspec-support (~> 3.7.0)
|
18
|
+
rspec-expectations (3.7.0)
|
19
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
+
rspec-support (~> 3.7.0)
|
21
|
+
rspec-mocks (3.7.0)
|
22
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
+
rspec-support (~> 3.7.0)
|
24
|
+
rspec-support (3.7.1)
|
20
25
|
tomparse (0.4.2)
|
21
|
-
yard (0.
|
26
|
+
yard (0.9.12)
|
22
27
|
yard-tomdoc (0.7.1)
|
23
28
|
tomparse (>= 0.4.0)
|
24
29
|
yard
|
@@ -29,7 +34,10 @@ PLATFORMS
|
|
29
34
|
DEPENDENCIES
|
30
35
|
bookmarks!
|
31
36
|
coco (>= 0.7.1)
|
32
|
-
rake
|
33
|
-
rspec
|
34
|
-
yard
|
37
|
+
rake (~> 12.3.0)
|
38
|
+
rspec (~> 3.0)
|
39
|
+
yard (~> 0.9.11)
|
35
40
|
yard-tomdoc
|
41
|
+
|
42
|
+
BUNDLED WITH
|
43
|
+
1.16.1
|
data/README.markdown
CHANGED
@@ -1,21 +1,15 @@
|
|
1
|
-
Bookmarks [](http://badge.fury.io/rb/bookmarks)
|
2
2
|
================
|
3
3
|
|
4
4
|
Description
|
5
5
|
-----------
|
6
6
|
|
7
|
-
|
8
|
-
only files in netscape format, like the ones exported by Delicious or
|
9
|
-
Firefox.
|
7
|
+
Parse or build a file of bookmarks, in the *Netscape Bookmark File Format*.
|
10
8
|
|
11
9
|
Install
|
12
10
|
-------------------------
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
gem install bookmarks
|
17
|
-
|
18
|
-
or in a Gemfile
|
12
|
+
In Gemfile:
|
19
13
|
|
20
14
|
gem 'bookmarks'
|
21
15
|
|
@@ -24,39 +18,23 @@ Usage
|
|
24
18
|
|
25
19
|
require 'bookmarks'
|
26
20
|
|
27
|
-
# To parse a document.
|
28
21
|
document = Document.new
|
29
22
|
document.parse 'bookmarks_file.html'
|
23
|
+
|
30
24
|
document.total # => Number of bookmarks.
|
31
|
-
first_bookmark = document.bookmarks.first
|
32
|
-
first_bookmark.class # => NetscapeBookmark
|
33
|
-
first_bookmark.url # => Url of the bookmark.
|
34
|
-
first_bookmark.title # => Title of the bookmark.
|
35
|
-
first_bookmark.tags # => Tags of the bookmark.
|
36
|
-
first_bookmark.date # => Date of the bookmark.
|
37
|
-
first_bookmark.description # => Description of the bookmark.
|
38
|
-
|
39
|
-
# To build a document.
|
40
|
-
# ary is an array of NetscapeBookmark.
|
41
|
-
document.build do
|
42
|
-
ary.each {|e| e }
|
43
|
-
end
|
44
|
-
|
45
25
|
|
26
|
+
document.bookmarks.each do |b|
|
27
|
+
puts b.url
|
28
|
+
puts b.title
|
29
|
+
puts b.tags
|
30
|
+
puts b.date
|
31
|
+
puts b.description
|
32
|
+
end
|
46
33
|
|
47
34
|
Dependencies
|
48
35
|
--------------------------
|
49
36
|
|
50
|
-
* ruby >= 2.
|
51
|
-
|
52
|
-
Contributing
|
53
|
-
-------------------------
|
54
|
-
|
55
|
-
1. Fork it
|
56
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
57
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
58
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
59
|
-
5. Create new Pull Request
|
37
|
+
* ruby >= 2.5.0 (should work with earlier versions)
|
60
38
|
|
61
39
|
|
62
40
|
License
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/lib/bookmarks.rb
CHANGED
data/lib/bookmarks/document.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
1
|
module Bookmarks
|
4
2
|
|
5
3
|
# Public: Document is your main interface to the file of bookmarks
|
@@ -101,7 +99,7 @@ module Bookmarks
|
|
101
99
|
# Returns String h3 content or empty string.
|
102
100
|
def h3_tags line
|
103
101
|
md = /<H3.*?>(.*?)<\/H3>/.match(line)
|
104
|
-
md ? md[1] : ""
|
102
|
+
md ? CGI.unescapeHTML(md[1]) : ""
|
105
103
|
end
|
106
104
|
|
107
105
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookmarks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xavier Nayrac
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '3.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coco
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.7.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.7.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: yard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.9.11
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.9.11
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: yard-tomdoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: |-
|
@@ -75,17 +75,16 @@ executables: []
|
|
75
75
|
extensions: []
|
76
76
|
extra_rdoc_files: []
|
77
77
|
files:
|
78
|
-
- lib/bookmarks.rb
|
79
|
-
- lib/bookmarks/document.rb
|
80
|
-
- lib/bookmarks/netscape_bookmark.rb
|
81
78
|
- Changelog.markdown
|
82
79
|
- Gemfile
|
83
80
|
- Gemfile.lock
|
84
81
|
- LICENSE
|
85
82
|
- README.markdown
|
86
83
|
- Rakefile
|
87
|
-
- TODO
|
88
84
|
- VERSION
|
85
|
+
- lib/bookmarks.rb
|
86
|
+
- lib/bookmarks/document.rb
|
87
|
+
- lib/bookmarks/netscape_bookmark.rb
|
89
88
|
homepage: https://github.com/lkdjiin/bookmarks
|
90
89
|
licenses:
|
91
90
|
- MIT
|
@@ -96,19 +95,18 @@ require_paths:
|
|
96
95
|
- lib
|
97
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
97
|
requirements:
|
99
|
-
- -
|
98
|
+
- - ">="
|
100
99
|
- !ruby/object:Gem::Version
|
101
|
-
version: 2.
|
100
|
+
version: 2.5.0
|
102
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
102
|
requirements:
|
104
|
-
- -
|
103
|
+
- - ">="
|
105
104
|
- !ruby/object:Gem::Version
|
106
105
|
version: '0'
|
107
106
|
requirements: []
|
108
107
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.7.3
|
110
109
|
signing_key:
|
111
110
|
specification_version: 4
|
112
111
|
summary: Bookmarks is a library to parse or build a file of bookmarks.
|
113
112
|
test_files: []
|
114
|
-
has_rdoc:
|