eigen3.rb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module Docs
  2. class Eigen3 < UrlScraper
  3. self.name = 'Eigen3'
  4. self.type = 'eigen3'
  5. self.slug = 'eigen3'
  6. self.base_url = 'https://eigen.tuxfamily.org/dox/'
  7. self.root_path = 'index.html'
  8. self.initial_paths = [
  9. "modules.html"
  10. ]
  11. self.release = '3.4.0'
  12. self.links = {
  13. home: 'https://eigen.tuxfamily.org',
  14. code: 'https://gitlab.com/libeigen/eigen'
  15. }
  16. html_filters.push 'eigen3/entries', 'eigen3/clean_html'
  17. # Remove the `clean_text` because Doxygen are actually creating empty
  18. # anchor such as <a id="asd"></a> to do anchor link.. and that anchor
  19. # will be removed by clean_text
  20. self.text_filters = FilterStack.new
  21. text_filters.push 'images', 'inner_html', 'attribution'
  22. def get_latest_version(opts)
  23. tags = get_gitlab_tags("https://gitlab.com", "libeigen", "eigen", opts)
  24. tags[0]['name']
  25. end
  26. options[:attribution] = <<-HTML
  27. &copy; Eigen.<br>
  28. Licensed under the MPL License.
  29. HTML
  30. # Skip source code since it doesn't provide any useful docs
  31. options[:skip_patterns] = [/_source/, /-members/, /__Reference\.html/, /_chapter\.html/,]
  32. # TODO: replace cppreference
  33. # options[:replace_urls] = { 'http://en.cppreference.com/w/cpp/' => 'cpp/' }
  34. end
  35. end