gnuplot.rb 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. module Docs
  2. class Gnuplot < FileScraper
  3. self.type = 'gnuplot'
  4. self.release = '5.4.0'
  5. self.links = {
  6. home: 'http://www.gnuplot.info/',
  7. code: 'https://sourceforge.net/projects/gnuplot/'
  8. }
  9. self.root_path = 'nofigures.html'
  10. html_filters.push 'gnuplot/entries', 'gnuplot/clean_html'
  11. options[:skip_links] = false
  12. options[:skip] = %w(
  13. Copyright.html
  14. External_libraries.html
  15. Known_limitations.html
  16. Introduction.html
  17. About_this_document.html
  18. New_features.html
  19. Differences_from_version_4.html
  20. Seeking_assistance.html
  21. Gnuplot.html
  22. Deprecated_syntax.html
  23. Demos_Online_Examples.html
  24. Terminal_types.html
  25. Plotting_styles.html
  26. Commands.html
  27. Contents.html
  28. Bugs.html
  29. Index.html
  30. )
  31. options[:attribution] = <<-HTML
  32. Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley<br>
  33. Distributed under the <a href="https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/Copyright">gnuplot license</a> (rights to distribute modified versions are withheld).
  34. HTML
  35. def get_latest_version(opts)
  36. doc = fetch_doc('http://www.gnuplot.info/download.html', opts)
  37. label = doc.at_css('h2').content.strip
  38. label.sub(/[^0-9.]*/, '')
  39. end
  40. end
  41. end