point_cloud_library: clean_html, entries

pull/1680/head
Simon Legner 3 years ago
parent b1fef165c4
commit 300d2f8235

@ -0,0 +1,12 @@
module Docs
class PointCloudLibrary
class CleanHtmlFilter < Filter
def call
@doc = at_css('.contents')
css('.dynheader.closed').remove
css('.permalink').remove
doc
end
end
end
end

@ -2,23 +2,15 @@ module Docs
class PointCloudLibrary
class EntriesFilter < Docs::EntriesFilter
def get_type
if slug.include?("group__") then
tmp = slug.dup
tmp.sub! "group__", ""
tmp.sub! "__", " "
tmp
else
""
end
group = at_css('.title .ingroups')
return group.content unless group.nil?
name = get_name
return 'pcl' unless name.match(/^pcl::.*::/)
name.gsub(/^pcl::/, '').gsub(/::.*/, '')
end
def get_name
type = get_type()
if type == ""
slug
else
"Module " + type
end
at_css('.title').content.gsub(/[<(].*/, '')
end
def additional_entries

@ -15,7 +15,7 @@ module Docs
code: 'https://github.com/PointCloudLibrary/pcl'
}
html_filters.push 'point_cloud_library/entries'
html_filters.push 'point_cloud_library/entries', 'point_cloud_library/clean_html'
# Remove the `clean_text` because Doxygen are actually creating empty
# anchor such as <a id="asd"></a> to do anchor link.. and that anchor
@ -27,7 +27,6 @@ module Docs
get_latest_github_release('PointCloudLibrary', 'pcl', opts)
end
options[:container] = '.contents'
options[:attribution] = <<-HTML
&copy; 20092012, Willow Garage, Inc.<br>
&copy; 2012, Open Perception, Inc.<br>

Loading…
Cancel
Save