2016-02-28 21:58:13 +01:00
|
|
|
module Docs
|
|
|
|
class Influxdata < UrlScraper
|
|
|
|
self.name = 'InfluxData'
|
|
|
|
self.type = 'influxdata'
|
2017-07-30 23:07:38 +02:00
|
|
|
self.release = '1.3'
|
2016-02-28 21:58:13 +01:00
|
|
|
self.base_url = 'https://docs.influxdata.com/'
|
2017-03-26 14:40:29 +02:00
|
|
|
self.links = {
|
|
|
|
home: 'https://www.influxdata.com/',
|
|
|
|
code: 'https://github.com/influxdata/influxdb'
|
|
|
|
}
|
2016-02-28 21:58:13 +01:00
|
|
|
|
|
|
|
html_filters.push 'influxdata/entries', 'influxdata/clean_html', 'title'
|
|
|
|
|
|
|
|
options[:trailing_slash] = true
|
|
|
|
|
|
|
|
options[:root_title] = 'InfluxData Documentation'
|
|
|
|
options[:title] = false
|
|
|
|
|
|
|
|
options[:only_patterns] = [/(telegraf|influxdb|chronograf|kapacitor)\/v#{release}/]
|
2017-07-30 23:07:38 +02:00
|
|
|
options[:skip_patterns] = [/enterprise/]
|
2016-02-28 21:58:13 +01:00
|
|
|
|
|
|
|
options[:skip] = [
|
|
|
|
"influxdb/v#{release}/sample_data/data_download/",
|
|
|
|
"influxdb/v#{release}/tools/grafana/",
|
2016-09-18 18:10:27 +02:00
|
|
|
"influxdb/v#{release}/about/",
|
2017-03-26 14:40:29 +02:00
|
|
|
"influxdb/v#{release}/external_resources/",
|
|
|
|
"influxdb/v#{release}/administration/security_best_practices/"
|
2016-02-28 21:58:13 +01:00
|
|
|
]
|
|
|
|
|
2017-03-26 14:40:29 +02:00
|
|
|
options[:replace_paths] = {
|
|
|
|
"telegraf/v#{release}/introduction/getting-started-telegraf/" => "telegraf/v#{release}/introduction/getting_started/",
|
|
|
|
"influxdb/v#{release}/write_protocols/line/" => "influxdb/v#{release}/write_protocols/line_protocol_tutorial/",
|
|
|
|
"influxdb/v#{release}/write_protocols/graphite/" => "influxdb/v#{release}/tools/graphite/",
|
|
|
|
"influxdb/v#{release}/clients/api/" => "influxdb/v#{release}/tools/api_client_libraries/",
|
|
|
|
"influxdb/v#{release}/concepts/010_vs_011/" => "influxdb/v#{release}/administration/differences/",
|
|
|
|
"influxdb/v#{release}/write_protocols/write_syntax/" => "influxdb/v#{release}/write_protocols/line_protocol_reference/",
|
|
|
|
"influxdb/v#{release}/write_protocols/udp/" => "influxdb/v#{release}/tools/udp/"
|
|
|
|
}
|
|
|
|
|
2016-09-18 18:10:27 +02:00
|
|
|
options[:fix_urls] = ->(url) do
|
|
|
|
url.sub! %r{/influxdb/v([\d\.]+)/.+/influxdb/v[\d\.]+/}, '/influxdb/v\1/'
|
|
|
|
url
|
|
|
|
end
|
|
|
|
|
2016-02-28 21:58:13 +01:00
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
© 2015 InfluxData, Inc.<br>
|
|
|
|
Licensed under the MIT license.
|
|
|
|
HTML
|
|
|
|
end
|
|
|
|
end
|