view · edit · sidebar · attach · print · history

20130523-debug-export-patinfo-yaml

<< | Index | >>


Summary

  • Debug Patinfo export

Commits

Index


Debug Patinfo Export

Yesterday, I cleaned up PIs.
Then export all (effective) patinfo into yaml.

% ruby jobs/export_patinfo_yaml

got still same error.

NoMethodError: undefined method `metadata' for nil:NilClass
/usr/lib64/ruby19/site_ruby/1.9.1/ebps/conversion/patinfo_yaml.rb:14:in `block in <module:EBPS>'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `call'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `transfer'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `node_import'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `load_documents'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `each_document'
/usr/lib64/ruby19/site_ruby/1.9.1/ebps/conversion/patinfo_yaml.rb:89:in `import'
./meddrugs.ch_fr_patinfo_kindle:60:in `<main>'
ebps/conversion/patinfo_yaml.rb
    if descr = val.delete('descriptions')
      doc = descr[EBPS.config.language]
      doc.metadata.update val 
      doc 
    end

Some PIs does not have both (DE/FR) versions. This is the matter.

ch.oddb> patinfos.values.select{|pi| pi.description("de").nil? or pi.description("fr").nil? }.length
-> 1
ch.oddb> patinfos.values.select{|pi| pi.description("de").nil? or pi.description("fr").nil? }.first.sequences
-> []

# delete
ch.oddb> patinfos.values.select{|pi| pi.description("de").nil? or pi.description("fr").nil? }.first.odba_delete
ch.oddb>
ch.oddb> patinfos.values.select{|pi| pi.description("de").nil? or pi.description("fr").nil? }.length
-> 0
commit

ebps could generate patinfo books.
But, there are missing title in PIs.

Next debug Patinfo importer, again.

view · edit · sidebar · attach · print · history
Page last modified on May 27, 2013, at 03:30 AM