require "bibtex2html/version"
require "bibtex"
require "cgi"
module Bibtex2html
module_function
def convert item
doc = "
"
bibitem = BibTeX.parse item
bibitem.each do |attributes|
attributes.each do |key, values|
doc += "
#{CGI.escapeHTML key.to_s}
"
doc += "
"
values.to_a.each do |value|
doc += "- #{CGI.escapeHTML value}
"
end
doc += "
"
end
end
doc += "
"
return doc
end
end