lib/marc_cleanup/bib_rubymarc_fixes.rb
def fix_visual_008(field)
    fixed_field = ''
    runtime = field[0..2]
    audience = field[4]
    gov_pub = field[10]
    item_form = field[11]
    visual_type = field[15]
    technique = field[16]
    fixed_field << runtime
    fixed_field << ' '
    audience.gsub!(/[uv]/, 'j')
    fixed_field << audience
    fixed_field << '     '
    gov_pub.gsub!('n', 'o')
    fixed_field << gov_pub
    fixed_field << item_form
    fixed_field << '   '
    visual_type.gsub!('e', 'v')
    fixed_field << visual_type
    technique.gsub!(' ', 'n')
    fixed_field << technique
    fixed_field
  end
### Replaces obsolete values with the current value;
#     if encoding level, cataloging form or multipart indicators
#     are outside accepted values, replace them with 'unknown'
#     normalize the indicator length and subfield code length to 2;
#     make the last 4 positions the only possible value of '4500'
Replaces obsolete values with the current value;
if encoding level, cataloging form or multipart indicators
are outside accepted values, replace them with 'unknown'
normalize the indicator length and subfield code length to 2;
make the last 4 positions the only possible value of '4500'
Replaces obsolete values with the current value ; if encoding level cataloging form or multipart indicators are outside accepted values replace them with ' unknown ' normalize the indicator length and subfield code length to 2 ; make the last 4 positions the only possible value of ' 4500 '
def fix_visual_008(field)
    fixed_field = ''
    runtime = field[0..2]
    audience = field[4]
    gov_pub = field[10]
    item_form = field[11]
    visual_type = field[15]
    technique = field[16]
    fixed_field << runtime
    fixed_field << ' '
    audience.gsub!(/[uv]/, 'j')
    fixed_field << audience
    fixed_field << '     '
    gov_pub.gsub!('n', 'o')
    fixed_field << gov_pub
    fixed_field << item_form
    fixed_field << '   '
    visual_type.gsub!('e', 'v')
    fixed_field << visual_type
    technique.gsub!(' ', 'n')
    fixed_field << technique
    fixed_field
  end
def fix_visual_008 ( field ) fixed_field = '' runtime = field [ 0 .. 2 ] audience = field [ 4 ] gov_pub = field [ 10 ] item_form = field [ 11 ] visual_type = field [ 15 ] technique = field [ 16 ] fixed_field << runtime fixed_field << ' ' audience . gsub! ( / [uv] / , 'j' ) fixed_field << audience fixed_field << '     ' gov_pub . gsub! ( 'n' , 'o' ) fixed_field << gov_pub fixed_field << item_form fixed_field << '   ' visual_type . gsub! ( 'e' , 'v' ) fixed_field << visual_type technique . gsub! ( ' ' , 'n' ) fixed_field << technique fixed_field end
Replaces obsolete values with the current value;
if encoding level, cataloging form or multipart indicators
are outside accepted values, replace them with 'unknown'
normalize the indicator length and subfield code length to 2;
make the last 4 positions the only possible value of '4500'
Replaces obsolete values with the current value ; if encoding level cataloging form or multipart indicators are outside accepted values replace them with ' unknown ' normalize the indicator length and subfield code length to 2 ; make the last 4 positions the only possible value of ' 4500 '
field