exlibris-aleph 0.0.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.
Files changed (77) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +38 -0
  4. data/lib/exlibris-aleph.rb +20 -0
  5. data/lib/exlibris/aleph/bor_auth.rb +40 -0
  6. data/lib/exlibris/aleph/config/config_base.rb +49 -0
  7. data/lib/exlibris/aleph/config/config_by_sub_library.rb +32 -0
  8. data/lib/exlibris/aleph/config/pc_tab_exp_field_extended.rb +20 -0
  9. data/lib/exlibris/aleph/config/tab15_by_item_process_status.rb +33 -0
  10. data/lib/exlibris/aleph/config/tab15_by_item_status.rb +33 -0
  11. data/lib/exlibris/aleph/config/tab31.rb +39 -0
  12. data/lib/exlibris/aleph/config/tab37.rb +50 -0
  13. data/lib/exlibris/aleph/config/tab40.rb +20 -0
  14. data/lib/exlibris/aleph/config/tab_sub_library.rb +21 -0
  15. data/lib/exlibris/aleph/config/tab_www_item_desc.rb +20 -0
  16. data/lib/exlibris/aleph/patron.rb +72 -0
  17. data/lib/exlibris/aleph/record.rb +56 -0
  18. data/lib/exlibris/aleph/rest.rb +31 -0
  19. data/lib/exlibris/aleph/tab_helper.rb +252 -0
  20. data/lib/exlibris/aleph/version.rb +5 -0
  21. data/lib/tasks/exlibris-aleph_tasks.rake +13 -0
  22. data/test/dummy/README.rdoc +261 -0
  23. data/test/dummy/Rakefile +7 -0
  24. data/test/dummy/app/assets/javascripts/application.js +15 -0
  25. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  26. data/test/dummy/app/controllers/application_controller.rb +3 -0
  27. data/test/dummy/app/helpers/application_helper.rb +2 -0
  28. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/test/dummy/config.ru +4 -0
  30. data/test/dummy/config/aleph/NYU50/collections.yml +1128 -0
  31. data/test/dummy/config/aleph/NYU50/item_permissions_by_item_process_status.yml +71226 -0
  32. data/test/dummy/config/aleph/NYU50/item_permissions_by_item_status.yml +20090 -0
  33. data/test/dummy/config/aleph/NYU50/items.yml +609 -0
  34. data/test/dummy/config/aleph/NYU50/patron_permissions.yml +22687 -0
  35. data/test/dummy/config/aleph/NYU50/patrons.yml +245 -0
  36. data/test/dummy/config/aleph/NYU50/pickup_locations.yml +2049 -0
  37. data/test/dummy/config/aleph/NYU51/collections.yml +41 -0
  38. data/test/dummy/config/aleph/NYU51/item_permissions_by_item_process_status.yml +7689 -0
  39. data/test/dummy/config/aleph/NYU51/item_permissions_by_item_status.yml +447 -0
  40. data/test/dummy/config/aleph/NYU51/items.yml +617 -0
  41. data/test/dummy/config/aleph/NYU51/patron_permissions.yml +6496 -0
  42. data/test/dummy/config/aleph/NYU51/patrons.yml +233 -0
  43. data/test/dummy/config/aleph/NYU51/pickup_locations.yml +456 -0
  44. data/test/dummy/config/aleph/sub_libraries.yml +756 -0
  45. data/test/dummy/config/application.rb +56 -0
  46. data/test/dummy/config/boot.rb +10 -0
  47. data/test/dummy/config/database.yml +25 -0
  48. data/test/dummy/config/environment.rb +5 -0
  49. data/test/dummy/config/environments/development.rb +37 -0
  50. data/test/dummy/config/environments/production.rb +67 -0
  51. data/test/dummy/config/environments/test.rb +37 -0
  52. data/test/dummy/config/initializers/aleph.rb +1 -0
  53. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  54. data/test/dummy/config/initializers/inflections.rb +15 -0
  55. data/test/dummy/config/initializers/mime_types.rb +5 -0
  56. data/test/dummy/config/initializers/secret_token.rb +7 -0
  57. data/test/dummy/config/initializers/session_store.rb +8 -0
  58. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/test/dummy/config/locales/en.yml +5 -0
  60. data/test/dummy/config/routes.rb +58 -0
  61. data/test/dummy/db/test.sqlite3 +0 -0
  62. data/test/dummy/log/aleph/aleph_tab_helper.log +1 -0
  63. data/test/dummy/log/test.log +1860 -0
  64. data/test/dummy/public/404.html +26 -0
  65. data/test/dummy/public/422.html +26 -0
  66. data/test/dummy/public/500.html +25 -0
  67. data/test/dummy/public/favicon.ico +0 -0
  68. data/test/dummy/script/rails +6 -0
  69. data/test/exlibris-aleph_test.rb +7 -0
  70. data/test/test_helper.rb +10 -0
  71. data/test/unit/bor_auth_test.rb +24 -0
  72. data/test/unit/patron_test.rb +37 -0
  73. data/test/unit/record_benchmarks.rb +26 -0
  74. data/test/unit/record_test.rb +28 -0
  75. data/test/unit/tab_helper_benchmarks.rb +56 -0
  76. data/test/unit/tab_helper_test.rb +180 -0
  77. metadata +220 -0
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = Exlibris::Aleph
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'Exlibris::Aleph'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+
24
+
25
+
26
+ Bundler::GemHelper.install_tasks
27
+
28
+ require 'rake/testtask'
29
+
30
+ Rake::TestTask.new(:test) do |t|
31
+ t.libs << 'lib'
32
+ t.libs << 'test'
33
+ t.pattern = 'test/**/*_test.rb'
34
+ t.verbose = false
35
+ end
36
+
37
+
38
+ task :default => :test
@@ -0,0 +1,20 @@
1
+ PATH = File.dirname(__FILE__) + "/exlibris/aleph/"
2
+ [
3
+ 'config/config_base',
4
+ 'config/config_by_sub_library',
5
+ 'config/pc_tab_exp_field_extended',
6
+ 'config/tab15_by_item_process_status',
7
+ 'config/tab15_by_item_status',
8
+ 'config/tab31',
9
+ 'config/tab37',
10
+ 'config/tab40',
11
+ 'config/tab_sub_library',
12
+ 'config/tab_www_item_desc',
13
+ 'tab_helper',
14
+ 'rest',
15
+ 'record',
16
+ 'patron',
17
+ 'bor_auth'
18
+ ].each do |library|
19
+ require PATH + library
20
+ end
@@ -0,0 +1,40 @@
1
+ module Exlibris
2
+ module Aleph
3
+ require 'open-uri'
4
+ require 'nokogiri'
5
+ class BorAuth
6
+ attr_reader :response, :error, :session_id
7
+ def initialize(aleph_url, library, sub_library, translate, bor_id, bor_verification)
8
+ url = "#{aleph_url}/X?"
9
+ url += "op=bor-auth&library=#{library}&"
10
+ url += "sub_library=#{sub_library}&translate=#{translate}&"
11
+ url += "bor_id=#{bor_id}&verification=#{bor_verification}&"
12
+ @response = Nokogiri.XML(open(url))
13
+ @session_id = @response.at("//session-id").inner_text unless @response.at("//session-id").nil?
14
+ @error = @response.at("//error").inner_text unless @response.at("//error").nil?
15
+ end
16
+
17
+ def permissions
18
+ rv = {}
19
+ return rv unless @response and self.error.nil?
20
+ rv[:home_sub_library] = @response.at("z303-home-library").inner_text unless @response.at("z303-home-library").nil?
21
+ rv[:bor_status] = @response.at("z305-bor-status").inner_text unless @response.at("z305-bor-status").nil?
22
+ rv[:bor_type] = @response.at("z305-bor-type").inner_text unless @response.at("z305-bor-type").nil?
23
+ rv[:loan_permission] = @response.at("z305-loan-permission").inner_text unless @response.at("z305-loan-permission").nil?
24
+ rv[:photo_permission] = @response.at("z305-photo-permission").inner_text unless @response.at("z305-photo-permission").nil?
25
+ rv[:over_permission] = @response.at("z305-over-permission").inner_text unless @response.at("z305-over-permission").nil?
26
+ rv[:multi_hold] = @response.at("z305-multi-hold").inner_text unless @response.at("z305-multi-hold").nil?
27
+ rv[:loan_check] = @response.at("z305-loan-check").inner_text unless @response.at("z305-loan-check").nil?
28
+ rv[:hold_permission] = @response.at("z305-hold-permission").inner_text unless @response.at("z305-hold-permission").nil?
29
+ rv[:renew_permission] = @response.at("z305-renew-permission").inner_text unless @response.at("z305-renew-permission").nil?
30
+ rv[:rr_permission] = @response.at("z305-rr-permission").inner_text unless @response.at("z305-rr-permission").nil?
31
+ rv[:ignore_late_return] = @response.at("z305-ignore-late-return").inner_text unless @response.at("z305-ignore-late-return").nil?
32
+ rv[:hold_on_shelf] = @response.at("z305-hold-on-shelf").inner_text unless @response.at("z305-hold-on-shelf").nil?
33
+ rv[:end_block_date] = @response.at("z305-end-block-date").inner_text unless @response.at("z305-end-block-date").nil?
34
+ rv[:booking_permission] = @response.at("z305-booking-permission").inner_text unless @response.at("z305-booking-permission").nil?
35
+ rv[:booking_ignore_hours] = @response.at("z305-booking-ignore-hours").inner_text unless @response.at("z305-booking-ignore-hours").nil?
36
+ return rv
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,49 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class ConfigBase
5
+ attr_accessor :library, :file_name, :pattern, :pattern_key
6
+ attr_accessor :local_path, :local_file
7
+ attr_accessor :config_array, :config_hash, :hash_key
8
+
9
+ def initialize(args)
10
+ @aleph_library = args[:aleph_library]
11
+ @aleph_library.downcase!
12
+ @aleph_file_name = args[:aleph_file_name]
13
+ @aleph_file_name.downcase!
14
+ @pattern = args[:pattern]
15
+ @pattern_key = args[:pattern_key]
16
+ @hash_key = args[:hash_key]
17
+ @aleph_file = "#{args[:aleph_mnt_path]}/#{@aleph_library}/tab/#{@aleph_file_name}"
18
+ end
19
+
20
+ def to_a
21
+ @config_array ||= parse_file.first
22
+ end
23
+
24
+ def to_h
25
+ @config_hash ||= parse_file.last
26
+ end
27
+
28
+ protected
29
+ def parse_file
30
+ config_array = []
31
+ config_hash = {}
32
+ File.open(@aleph_file).each do |line|
33
+ line.chomp!
34
+ config_match = line.match(@pattern)
35
+ if (config_match)
36
+ config_match_hash = {}
37
+ @pattern_key.each do |column, key|
38
+ config_match_hash[key] = config_match[column].strip
39
+ end
40
+ config_array.push(config_match_hash) unless config_match_hash.empty?
41
+ config_hash[config_match_hash[@hash_key]] = config_match_hash unless config_match_hash.empty?
42
+ end
43
+ end
44
+ return [config_array, config_hash]
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,32 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class ConfigBySubLibrary < Exlibris::Aleph::Config::ConfigBase
5
+ def initialize(args)
6
+ super(args)
7
+ @aleph_sub_library_key = :sub_library
8
+ end
9
+
10
+ def to_h
11
+ a = self.to_a
12
+ @config_hash = {}
13
+ sl_a = a.collect do |i|
14
+ i[@aleph_sub_library_key]
15
+ end
16
+ sl_a.uniq!
17
+ sl_a.each do |sl|
18
+ sl_hash = {}
19
+ a.each do |i|
20
+ isl = i[@aleph_sub_library_key]
21
+ if isl.strip == sl.strip
22
+ sl_hash[i[@hash_key]] = i
23
+ end
24
+ end
25
+ @config_hash["#{sl}"] = sl_hash
26
+ end
27
+ return @config_hash
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,20 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class PcTabExpFieldExtended < Exlibris::Aleph::Config::ConfigBase
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "pc_tab_exp_field_extended.eng"
8
+ args[:pattern] = /^(BOR-STATUS\s{10})\s(.{5})\s(L)\s(.{50})\s([^\n]*)/
9
+ args[:pattern_key] = {
10
+ 2 => :sublibrary,
11
+ 4 => :text,
12
+ 5 => :code
13
+ }
14
+ args[:hash_key] = :code
15
+ super(args)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,33 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class Tab15ByItemProcessStatus < Exlibris::Aleph::Config::ConfigBySubLibrary
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab15.eng"
8
+ args[:pattern] = /^(.{5})\s([0-9#]{2})\s([A-Z#]{2})\s(L)\s(.{30})\s([YN])\s([YN])\s([YNCT])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([0-9]{2})\s([YNC])\s([AOC])/
9
+ args[:pattern_key] = {
10
+ 1 => :sub_library,
11
+ 2 => :item_status,
12
+ 3 => :item_process_status,
13
+ 5 => :text,
14
+ 6 => :loan,
15
+ 7 => :renew,
16
+ 8 => :hold_request,
17
+ 9 => :photocopy_request,
18
+ 10 => :web_opac,
19
+ 11 => :specific_item,
20
+ 12 => :limit_hold,
21
+ 13 => :recall,
22
+ 14 => :rush_recall,
23
+ 15 => :reloaning_limit,
24
+ 16 => :booking_permission,
25
+ 17 => :booking_hours
26
+ }
27
+ args[:hash_key] = :item_process_status
28
+ super(args)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,33 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class Tab15ByItemStatus < Exlibris::Aleph::Config::ConfigBySubLibrary
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab15.eng"
8
+ args[:pattern] = /^(.{5})\s([0-9#]{2})\s([A-Z#]{2})\s(L)\s(.{30})\s([YN])\s([YN])\s([YNCT])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([0-9]{2})\s([YNC])\s([AOC])/
9
+ args[:pattern_key] = {
10
+ 1 => :sub_library,
11
+ 2 => :item_status,
12
+ 3 => :item_process_status,
13
+ 5 => :text,
14
+ 6 => :loan,
15
+ 7 => :renew,
16
+ 8 => :hold_request,
17
+ 9 => :photocopy_request,
18
+ 10 => :web_opac,
19
+ 11 => :specific_item,
20
+ 12 => :limit_hold,
21
+ 13 => :recall,
22
+ 14 => :rush_recall,
23
+ 15 => :reloaning_limit,
24
+ 16 => :booking_permission,
25
+ 17 => :booking_hours
26
+ }
27
+ args[:hash_key] = :item_status
28
+ super(args)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,39 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class Tab31 < Exlibris::Aleph::Config::ConfigBySubLibrary
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab31"
8
+ args[:pattern] = /^(.{5})\s([0-9#]{2})\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([YN])\s([CF])\s([+A])\s([DMY\s])\s([0-9]{8})\s([0-9]{10})\s([YN])\s([YN])\s([YN])\s([0-9]{2})\s([YN])\s([YN])\s([YN])/
9
+ args[:pattern_key] = {
10
+ 1 => :sub_library,
11
+ 2 => :patron_status,
12
+ 3 => :loan_permission,
13
+ 4 => :photo_permission,
14
+ 5 => :override_permission,
15
+ 6 => :multiple_hold_permission,
16
+ 7 => :check_loan,
17
+ 8 => :hold_permission,
18
+ 9 => :renew_permission,
19
+ 10 => :ignore_late_return,
20
+ 11 => :photocopy_charge,
21
+ 12 => :expiration_date_operator,
22
+ 13 => :expiration_date_operator_type,
23
+ 14 => :expiration_date_parameter,
24
+ 15 => :cash_overspend_limit,
25
+ 16 => :hold_request_permission_for_item_on_shelf,
26
+ 17 => :loan_display,
27
+ 18 => :reading_room_permission,
28
+ 19 => :default_hold_priority,
29
+ 20 => :item_booking_permission,
30
+ 21 => :booking_ignore_closing_hours,
31
+ 22 => :automatically_create_aleph_record
32
+ }
33
+ args[:hash_key] = :patron_status
34
+ super(args)
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,50 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class Tab37 < Exlibris::Aleph::Config::ConfigBase
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab37"
8
+ args[:pattern] = /^(.{5})\s([0-9#]{2})\s(.{2})\s(.{2})\s([YN#])\s(.{2}.?.?.?)\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?/
9
+ args[:pattern_key] = {
10
+ 1 => :sub_library,
11
+ 2 => :item_status,
12
+ 3 => :item_process_status,
13
+ 4 => :patron_status,
14
+ 5 => :availability_status
15
+ }
16
+ args[:hash_key] = :sub_library
17
+ super(args)
18
+ end
19
+
20
+ protected
21
+ def parse_file
22
+ config_array = []
23
+ config_hash = {}
24
+ File.open(@aleph_file).each do |line|
25
+ line.chomp!
26
+ config_match = line.match(@pattern)
27
+ if (config_match)
28
+ config_match_hash = {}
29
+ @pattern_key.each do |column, key|
30
+ config_match_hash[key] = config_match[column].strip
31
+ end
32
+ pickup_locations = []
33
+ (6..15).each do |column|
34
+ pickup_locations.push(config_match[column].strip) unless config_match[column].nil?
35
+ end
36
+ config_match_hash[:pickup_locations] = pickup_locations
37
+ config_array.push(config_match_hash) unless config_match_hash.empty?
38
+ config_hash[config_match_hash[:sub_library]]={} if config_hash[config_match_hash[:sub_library]].nil?
39
+ config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]]={} if config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]].nil?
40
+ config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]][config_match_hash[:item_process_status]]={} if config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]][config_match_hash[:item_process_status]].nil?
41
+ config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]][config_match_hash[:item_process_status]][config_match_hash[:patron_status]]={} if config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]][config_match_hash[:item_process_status]][config_match_hash[:patron_status]].nil?
42
+ config_hash[config_match_hash[:sub_library]][config_match_hash[:item_status]][config_match_hash[:item_process_status]][config_match_hash[:patron_status]][config_match_hash[:availability_status]] = config_match_hash unless config_match_hash.empty? or hash_key.nil?
43
+ end
44
+ end
45
+ return [config_array, config_hash]
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,20 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class Tab40 < Exlibris::Aleph::Config::ConfigBySubLibrary
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab40.eng"
8
+ args[:pattern] = /^(.{5})\s(.{5})\s(L)\s(.+)/
9
+ args[:pattern_key] = {
10
+ 1 => :collection_code,
11
+ 2 => :sub_library,
12
+ 4 => :text
13
+ }
14
+ args[:hash_key] = :collection_code
15
+ super(args)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class TabSubLibrary < Exlibris::Aleph::Config::ConfigBase
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab_sub_library.eng"
8
+ args[:pattern] = /^(.{5})\s([1-6]{1})\s(.{5})\s([L,H,A,R,S]{1})\s(.{1,30})/
9
+ args[:pattern_key] = {
10
+ 1 => :code,
11
+ 2 => :type,
12
+ 3 => :library,
13
+ 5 => :text
14
+ }
15
+ args[:hash_key] = :code
16
+ super(args)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,20 @@
1
+ module Exlibris
2
+ module Aleph
3
+ module Config
4
+ class TabWwwItemDesc < Exlibris::Aleph::Config::ConfigBase
5
+
6
+ def initialize(args)
7
+ args[:aleph_file_name] = "tab_www_item_desc.eng"
8
+ args[:pattern] = /^(ITEM-STATUS )\s(.{80})\s([^\n]*)/
9
+ args[:pattern_key] = {
10
+ 1 => :code,
11
+ 2 => :original_text,
12
+ 3 => :web_text
13
+ }
14
+ args[:hash_key] = :original_text
15
+ super(args)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end