gared 0.0.16 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fb9759c94266afb6e3f6c44b47c4cbffeb9cad9d64eeb185944d631dd38e872
4
- data.tar.gz: dc047beba43e6c44a572f935d525ed20f9a5cfef375fd858ce2368f6dbfee1f6
3
+ metadata.gz: ad89b9fa713cb95d420566a0a9735ad839907661996bfa0e816a87391010e8b6
4
+ data.tar.gz: f450165383f2e8c030b4e5e25ade74d5a927009aa2a6c92f174c68e76e5003c1
5
5
  SHA512:
6
- metadata.gz: 53ebe03bf0d9027947501556550838a4a22c708e1f034cdfe5a6ab03f894d31157d83a736c5caf8df1bbe060d0c1aa90c1c6e667ff45c1391597419d4344dea4
7
- data.tar.gz: 15001af014546773688e5075f5ac7740eaac4d7c5476b7c50003d56c360ee0ecc16d99b7d9f8c53a7033a0adf46ac070e65e00369ef332c4286f3c83380de0eb
6
+ metadata.gz: e5f35bc4cdb1efe388224d5b0e7973eb40fe7c3e9d241961562b87998e56a058509b9040e94752177b1df3df56ce8aec4617953af7d253bbbfa6e338285c5cba
7
+ data.tar.gz: 6b070deefebb23a21d191155bc1e5ff8bf80a60261a74a657486ce2fa44d8244fbeed3ec19a2ae9a196d54649e23a5dced67dace6daaaa2ba1f68c1a548cdf49
@@ -37,6 +37,7 @@ module Gared
37
37
  h = Holding.new
38
38
  h.source_id = tr.tds[0].a.href
39
39
  h.source_name = 'Hebrewbooks'
40
+ h.scan_url = "http://download.hebrewbooks.org/downloadhandler.ashx?req=#{h.source_id.rpartition('=')[2]}"
40
41
  p.add_holding(h)
41
42
  ret << p
42
43
  end
data/lib/gared/holding.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Gared
2
2
  class Holding
3
- attr_accessor :source_id, :source_name
3
+ attr_accessor :source_id, :source_name, :scan_url
4
4
 
5
5
  end
6
6
  end
data/lib/gared/primo.rb CHANGED
@@ -46,7 +46,12 @@ module Gared
46
46
  p.publisher_line = deets['publisher']
47
47
  p.pub_year = deets['creationdate']
48
48
  p.source_id = r['PrimoNMBib']['record']['control']['sourcerecordid']
49
- # TODO: determine whether a scanned object exists
49
+ # collect additional URLS from record, for clients to be able to determine whether a scanned object exists
50
+ additional_urls = []
51
+ deets.keys.each do |key|
52
+ additional_urls << deets[key] if deets[key] =~ /https?:[^\s]/
53
+ end
54
+ p.additional_urls = additional_urls if additional_urls.length > 0
50
55
  h = Holding.new
51
56
  h.source_id = p.source_id
52
57
  h.source_name = 'Primo:'+@options[:institution]
@@ -1,7 +1,7 @@
1
1
  module Gared
2
2
  class Publication
3
3
 
4
- attr_accessor :title, :publisher_line, :author_line, :notes, :source_id, :holdings, :language, :pub_year, :context, :scanned
4
+ attr_accessor :title, :publisher_line, :author_line, :notes, :source_id, :holdings, :language, :pub_year, :context, :scanned, :additional_urls
5
5
 
6
6
  def initialize(ctx)
7
7
  @holdings = []
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asaf Bartov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-02 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zoom