Skip to content

Commit

Permalink
move cover images to standoc: metanorma/metanorma-jis#227
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Oct 25, 2024
1 parent 5d6fc67 commit d23f2e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
16 changes: 0 additions & 16 deletions lib/metanorma/plateau/cleanup.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
module Metanorma
module Plateau
class Converter < Jis::Converter
def bibdata_cleanup(xmldoc)
super
coverpage_images(xmldoc)
end

def coverpage_images(xmldoc)
%w(coverpage-image).each do |n|
xmldoc.xpath("//bibdata/ext/#{n}").each do |x|
ins = add_misc_container(xmldoc)
ins << "<presentation-metadata><name>#{n}</name>" \
"<value>#{x.remove.children.to_xml}</value>" \
"</presentation-metadata>"
end
end
end

def blocksource_cleanup(xmldoc)
xmldoc.xpath("//termsource").each do |s|
p = s.previous_element or next
Expand Down
17 changes: 0 additions & 17 deletions lib/metanorma/plateau/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,6 @@ def doctype_validate(_xmldoc)
"#{@doctype} is not a recognised document type")
end

def metadata_ext(node, xml)
super
metadata_coverpage_images(node, xml)
end

def metadata_coverpage_images(node, xml)
%w(coverpage-image).each do |n|
if a = node.attr(n)
xml.send n do |c|
a.split(",").each do |x|
c.image src: x
end
end
end
end
end

def metadata_id(node, xml)
if id = node.attr("docidentifier")
xml.docidentifier "PLATEAU #{id.sub(/^PLATEAU /, '')}",
Expand Down

0 comments on commit d23f2e1

Please sign in to comment.