Merge pull request #1680 from ardiya/add_pcl

Add PointCloudLibrary to devdocs
pull/1683/head
Simon Legner 3 years ago committed by GitHub
commit 6ca82ce196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,8 @@
[
[
"2021-12-29",
"New documentation: <a href=\"/point_cloud_library/\">PointCloudLibrary</a>"
],
[
"2021-12-27",
"New documentation: <a href=\"/zig/\">Zig</a>"

@ -657,6 +657,11 @@ credits = [
'2005-2017 Sebastian Bergmann',
'CC BY',
'https://creativecommons.org/licenses/by/3.0/'
], [
'PointCloudLibrary',
'20092012, Willow Garage, Inc.<br>&copy; 2012, Open Perception, Inc.',
'BSD',
'https://raw.githubusercontent.com/PointCloudLibrary/pcl/master/LICENSE.txt'
], [
'Pony',
'2016-2020, The Pony Developers & 2014-2015, Causality Ltd.',

@ -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

@ -0,0 +1,45 @@
module Docs
class PointCloudLibrary
class EntriesFilter < Docs::EntriesFilter
def get_type
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
at_css('.title').content.gsub(/[<(].*/, '')
end
def additional_entries
# Only add additional_entries from PointCloudLibrary modules (group__*.html)
return [] if not slug.include?("group")
entries = []
css('table.memberdecls td.memItemRight').map do |node|
href = node.at_css("a").attr('href')
if href.index("#").nil? then
href += "#"
end
# Skip page that's not crawled
# TODO: Sync this with options[:skip_patterns] in point_cloud_library.rb
if href.include?("namespace") || href.include?("structsvm") || href.include?("classopenni") then
next
end
# Only add function and classes documentation
doxygen_type = node.parent.parent.at_css("tr.heading").text.strip
if not(doxygen_type == "Functions" || doxygen_type == "Classes") then
next
end
entries << [node.content, href]
end
entries
end
end
end
end

@ -0,0 +1,41 @@
module Docs
class PointCloudLibrary < UrlScraper
self.name = 'PointCloudLibrary'
self.type = 'point_cloud_library'
self.slug = 'point_cloud_library'
self.base_url = 'https://pointclouds.org/documentation/'
self.root_path = 'modules.html'
# Add hierarchy.html to crawl all classes*.html that's not reachable from modules.html
self.initial_paths = [
"https://pointclouds.org/documentation/hierarchy.html"
]
self.release = '1.12.1'
self.links = {
home: 'https://pointclouds.org/',
code: 'https://github.com/PointCloudLibrary/pcl'
}
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
# will be removed by clean_text
self.text_filters = FilterStack.new
text_filters.push 'images', 'inner_html', 'attribution'
def get_latest_version(opts)
get_latest_github_release('PointCloudLibrary', 'pcl', opts)[4..]
end
options[:attribution] = <<-HTML
&copy; 20092012, Willow Garage, Inc.<br>
&copy; 2012, Open Perception, Inc.<br>
Licensed under the BSD License.
HTML
# Skip source code since it doesn't provide any useful docs
options[:skip_patterns] = [/_source/, /namespace/, /h\.html/, /structsvm/, /struct_/, /classopenni/, /class_/]
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

@ -0,0 +1 @@
https://github.com/PointCloudLibrary/pcl/blob/master/pcl.png
Loading…
Cancel
Save