projects
/
quanlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add language to book data.
[quanlib.git]
/
book.rb
diff --git
a/book.rb
b/book.rb
index 93c3964d4a88939a9e1019cd1a5585411cb47404..d7135690d4d60514f4c900d59dc76698d3eb164d 100644
(file)
--- a/
book.rb
+++ b/
book.rb
@@
-15,6
+15,7
@@
class Book
attr_accessor :classification_id
attr_accessor :cover
attr_accessor :description
attr_accessor :classification_id
attr_accessor :cover
attr_accessor :description
+ attr_accessor :language
attr_accessor :path
attr_accessor :series_id
attr_accessor :title
attr_accessor :path
attr_accessor :series_id
attr_accessor :title
@@
-308,6
+309,17
@@
class Book
end
end
end
end
+ #---------------------------------------
+ # Language
+
+ langNodes = opfDoc.css('dc|language', 'dc' => @@DC_NS_URL)
+ if (langNodes.length > 0)
+ langNode = langNodes[0]
+ if langNode
+ @language = langNode.content
+ end
+ end
+
#---------------------------------------
# Other metadata: series, volume, cover
#---------------------------------------
# Other metadata: series, volume, cover