gared 0.0.10 → 0.0.11

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gared/idea.rb +15 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8459865216cd87441be5b4b8077bb4d2a1796eab7a7e7949ab0c7f366ba17454
4
- data.tar.gz: 69cbdabc561474f27133d99a29848e570e8463534e559f3f40757b368014c0b9
3
+ metadata.gz: 59614712f13d9d03b4b70388873f6b470a1894ad70263d0d879ebad7997ff08d
4
+ data.tar.gz: da45762798c03f165dc6befe7099a56d9fb23950ed9a2d02a63512665effab6d
5
5
  SHA512:
6
- metadata.gz: 7621514e31459ceea5bbe01fb5e29a9274c044b8f695645852fed95a3f777e5b991659338a50ee83dae0eca571e21538f655e6fa1c49b083b17aabfeac87e51a
7
- data.tar.gz: e9ffaadf371c999ccaf8aff79df49eb01eb86cf15675505efb0fc91b2f0a4c9537de0462812d6f1f9390892b5bfd6802d496846dd5891dc864d2cd003bbdebaa
6
+ metadata.gz: 183ca264952382dbc01f57af1353498343aa89b2c265d07313a875796214f16b1cc9e8d883b2e50a0651385d3a2aa5c32b6d59a84e82dbcece18ac005aa2b187
7
+ data.tar.gz: 7c340a78329e27d705133d8b178a7a6b9bbd84bdd1b2e5baacdc519775083e5079f2242a63bcc7ffa95c3a9a0d1b722ba54ee087ce2932556ba1196c82923cac
@@ -46,6 +46,10 @@ module Gared
46
46
  p.pub_year = st.sub('שנה לועזית:','').sub('שנת הוצאה:','') if st =~ /^שנה לועזית:/ or st =~ /^שנת הוצאה:/
47
47
  }
48
48
  p.source_id = urlpart
49
+ h = Holding.new
50
+ h.source_id = urlpart.scan(/book_id%3E(\d+)%3C/)[0][0]
51
+ h.source_name = @options[:opac_url]
52
+ p.add_holding(h)
49
53
  ret << p
50
54
  end
51
55
  nextlink = @browser.a(title: 'הבא')
@@ -57,18 +61,19 @@ module Gared
57
61
  end
58
62
  end
59
63
  end
60
- # now that we've extracted everything useful from this page, iterate over the results to pick up the system ID
61
- ret.each do |item|
62
- @browser.goto item.source_id
63
- @browser.wait
64
- item.source_id = @browser.tr(id: '1').span(:class => 'bidie').text
64
+
65
+ # now that we've extracted everything useful from this page, iterate over the results to pick up additional details
66
+ # ret.each do |item|
67
+ # @browser.goto item.source_id
68
+ # @browser.wait
69
+ # item.source_id = @browser.tr(id: '1').span(:class => 'bidie').text
65
70
  # doesn't look like there's much more to learn from the Holdings screen, since we don't care if there's more than one copy or not
66
71
  # @browser.goto @browser.ul(id: 'itemTabs').li(id: '2').a.href # check holdings
67
- h = Holding.new
68
- h.source_id = item.source_id
69
- h.source_name = @options[:opac_url]
70
- item.add_holding(h)
71
- end
72
+ # h = Holding.new
73
+ # h.source_id = item.source_id
74
+ # h.source_name = @options[:opac_url]
75
+ # item.add_holding(h)
76
+ # end
72
77
  end
73
78
  rescue Exception
74
79
  puts $!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asaf Bartov