You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/lib/docs/scrapers/gnu_make.rb

35 lines
1.1 KiB

# coding: utf-8
module Docs
class GnuMake < FileScraper
self.name = 'GNU Make'
self.type = 'gnu_make'
self.slug = 'gnu_make'
self.release = '4.3'
self.base_url= 'https://www.gnu.org/software/make/manual/html_node/'
self.root_path = 'index.html'
self.links = {
home:'https://www.gnu.org/software/make/manual/html_node/',
code: 'http://git.savannah.gnu.org/cgit/make.git/'
}
html_filters.push 'gnu_make/entries', 'gnu_make/clean_html'
options[:skip] = [
'Concept-Index.html',
'Name-Index.html',
'GNU-Free-Documentation-License.html'
]
options[:attribution]= <<-HTML
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 Free Software Foundation, Inc. <br>
Licensed under the GNU Free Documentation License.
HTML
def get_latest_version(opts)
body = fetch("https://www.gnu.org/software/make/manual/html_node/", opts)
body.scan(/version \d*\.?\d*/)[0].sub('version', '')
end
end
end