Add PointCloudLibrary to devdocs
Unified · Split
| @@ -1,4 +1,8 @@ | |||
| 1 | [ | 1 | [ |
| 2 | [ | ||
| 3 | "2021-12-29", | ||
| 4 | "New documentation: <a href=\"/point_cloud_library/\">PointCloudLibrary</a>" | ||
| 5 | ], | ||
| 2 | [ | 6 | [ |
| 3 | "2021-12-27", | 7 | "2021-12-27", |
| 4 | "New documentation: <a href=\"/zig/\">Zig</a>" | 8 | "New documentation: <a href=\"/zig/\">Zig</a>" |
| @@ -657,6 +657,11 @@ credits = [ · 656 unmodified lines | |||
| 657 | '2005-2017 Sebastian Bergmann', | 657 | '2005-2017 Sebastian Bergmann', |
| 658 | 'CC BY', | 658 | 'CC BY', |
| 659 | 'https://creativecommons.org/licenses/by/3.0/' | 659 | 'https://creativecommons.org/licenses/by/3.0/' |
| 660 | ], [ | ||
| 661 | 'PointCloudLibrary', | ||
| 662 | '2009–2012, Willow Garage, Inc.<br>© 2012–, Open Perception, Inc.', | ||
| 663 | 'BSD', | ||
| 664 | 'https://raw.githubusercontent.com/PointCloudLibrary/pcl/master/LICENSE.txt' | ||
| 660 | ], [ | 665 | ], [ |
| 661 | 'Pony', | 666 | 'Pony', |
| 662 | '2016-2020, The Pony Developers & 2014-2015, Causality Ltd.', | 667 | '2016-2020, The Pony Developers & 2014-2015, Causality Ltd.', |
| @@ -0,0 +1,12 @@ | |||
| 1 | module Docs | ||
| 2 | class PointCloudLibrary | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | @doc = at_css('.contents') | ||
| 6 | css('.dynheader.closed').remove | ||
| 7 | css('.permalink').remove | ||
| 8 | doc | ||
| 9 | end | ||
| 10 | end | ||
| 11 | end | ||
| 12 | end | ||
| @@ -0,0 +1,45 @@ | |||
| 1 | module Docs | ||
| 2 | class PointCloudLibrary | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | def get_type | ||
| 5 | group = at_css('.title .ingroups') | ||
| 6 | return group.content unless group.nil? | ||
| 7 | name = get_name | ||
| 8 | return 'pcl' unless name.match(/^pcl::.*::/) | ||
| 9 | name.gsub(/^pcl::/, '').gsub(/::.*/, '') | ||
| 10 | end | ||
| 11 | |||
| 12 | def get_name | ||
| 13 | at_css('.title').content.gsub(/[<(].*/, '') | ||
| 14 | end | ||
| 15 | |||
| 16 | def additional_entries | ||
| 17 | # Only add additional_entries from PointCloudLibrary modules (group__*.html) | ||
| 18 | return [] if not slug.include?("group") | ||
| 19 | entries = [] | ||
| 20 | |||
| 21 | css('table.memberdecls td.memItemRight').map do |node| | ||
| 22 | href = node.at_css("a").attr('href') | ||
| 23 | if href.index("#").nil? then | ||
| 24 | href += "#" | ||
| 25 | end | ||
| 26 | |||
| 27 | # Skip page that's not crawled | ||
| 28 | # TODO: Sync this with options[:skip_patterns] in point_cloud_library.rb | ||
| 29 | if href.include?("namespace") || href.include?("structsvm") || href.include?("classopenni") then | ||
| 30 | next | ||
| 31 | end | ||
| 32 | |||
| 33 | # Only add function and classes documentation | ||
| 34 | doxygen_type = node.parent.parent.at_css("tr.heading").text.strip | ||
| 35 | if not(doxygen_type == "Functions" || doxygen_type == "Classes") then | ||
| 36 | next | ||
| 37 | end | ||
| 38 | |||
| 39 | entries << [node.content, href] | ||
| 40 | end | ||
| 41 | entries | ||
| 42 | end | ||
| 43 | end | ||
| 44 | end | ||
| 45 | end | ||
| @@ -0,0 +1,41 @@ | |||
| 1 | module Docs | ||
| 2 | class PointCloudLibrary < UrlScraper | ||
| 3 | self.name = 'PointCloudLibrary' | ||
| 4 | self.type = 'point_cloud_library' | ||
| 5 | self.slug = 'point_cloud_library' | ||
| 6 | self.base_url = 'https://pointclouds.org/documentation/' | ||
| 7 | self.root_path = 'modules.html' | ||
| 8 | # Add hierarchy.html to crawl all classes*.html that's not reachable from modules.html | ||
| 9 | self.initial_paths = [ | ||
| 10 | "https://pointclouds.org/documentation/hierarchy.html" | ||
| 11 | ] | ||
| 12 | self.release = '1.12.1' | ||
| 13 | |||
| 14 | self.links = { | ||
| 15 | home: 'https://pointclouds.org/', | ||
| 16 | code: 'https://github.com/PointCloudLibrary/pcl' | ||
| 17 | } | ||
| 18 | |||
| 19 | html_filters.push 'point_cloud_library/entries', 'point_cloud_library/clean_html' | ||
| 20 | |||
| 21 | # Remove the `clean_text` because Doxygen are actually creating empty | ||
| 22 | # anchor such as <a id="asd"></a> to do anchor link.. and that anchor | ||
| 23 | # will be removed by clean_text | ||
| 24 | self.text_filters = FilterStack.new | ||
| 25 | text_filters.push 'images', 'inner_html', 'attribution' | ||
| 26 | |||
| 27 | def get_latest_version(opts) | ||
| 28 | get_latest_github_release('PointCloudLibrary', 'pcl', opts)[4..] | ||
| 29 | end | ||
| 30 | |||
| 31 | options[:attribution] = <<-HTML | ||
| 32 | © 2009–2012, Willow Garage, Inc.<br> | ||
| 33 | © 2012–, Open Perception, Inc.<br> | ||
| 34 | Licensed under the BSD License. | ||
| 35 | HTML | ||
| 36 | |||
| 37 | # Skip source code since it doesn't provide any useful docs | ||
| 38 | options[:skip_patterns] = [/_source/, /namespace/, /h\.html/, /structsvm/, /struct_/, /classopenni/, /class_/] | ||
| 39 | |||
| 40 | end | ||
| 41 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | |||
| 1 | https://github.com/PointCloudLibrary/pcl/blob/master/pcl.png | ||