1
0

gnu_make.rb 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # coding: utf-8
  2. module Docs
  3. class GnuMake < FileScraper
  4. self.name = 'GNU Make'
  5. self.type = 'gnu_make'
  6. self.slug = 'gnu_make'
  7. self.release = '4.4'
  8. self.base_url= 'https://www.gnu.org/software/make/manual/html_node/'
  9. self.root_path = 'index.html'
  10. self.links = {
  11. home:'https://www.gnu.org/software/make/manual/html_node/',
  12. code: 'http://git.savannah.gnu.org/cgit/make.git/'
  13. }
  14. html_filters.push 'gnu_make/entries', 'gnu_make/clean_html'
  15. options[:skip] = [
  16. 'Concept-Index.html',
  17. 'Name-Index.html',
  18. 'GNU-Free-Documentation-License.html'
  19. ]
  20. options[:attribution]= <<-HTML
  21. Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc. <br>
  22. Licensed under the GNU Free Documentation License.
  23. HTML
  24. def get_latest_version(opts)
  25. body = fetch("https://www.gnu.org/software/make/manual/html_node/", opts)
  26. body.scan(/version \d*\.?\d*/)[0].sub('version', '')
  27. end
  28. end
  29. end