mirror of https://github.com/freeCodeCamp/devdocs
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.
56 lines
1.5 KiB
56 lines
1.5 KiB
11 years ago
|
module Docs
|
||
|
class Postgresql < FileScraper
|
||
|
self.name = 'PostgreSQL'
|
||
|
self.type = 'postgres'
|
||
|
self.version = 'up to 9.3.2'
|
||
|
self.dir = '/Users/Thibaut/DevDocs/Docs/PostgreSQL'
|
||
|
self.base_url = 'http://www.postgresql.org/docs/9.3/static/'
|
||
|
self.root_path = 'reference.html'
|
||
|
self.initial_paths = %w(sql.html runtime-config.html charset.html)
|
||
|
|
||
|
html_filters.insert_before 'normalize_urls', 'postgresql/clean_nav'
|
||
|
html_filters.push 'postgresql/clean_html', 'postgresql/entries', 'title'
|
||
|
|
||
|
options[:title] = false
|
||
|
options[:root_title] = 'PostgreSQL'
|
||
|
options[:follow_links] = ->(filter) { filter.initial_page? }
|
||
|
|
||
|
options[:only] = %w(
|
||
|
arrays.html
|
||
|
rowtypes.html
|
||
|
rangetypes.html
|
||
|
mvcc-intro.html
|
||
|
transaction-iso.html
|
||
|
explicit-locking.html
|
||
|
applevel-consistency.html
|
||
|
locking-indexes.html
|
||
|
config-setting.html
|
||
|
locale.html
|
||
|
collation.html
|
||
|
multibyte.html)
|
||
|
|
||
|
options[:only_patterns] = [
|
||
|
/\Asql\-/,
|
||
|
/\Aapp\-/,
|
||
|
/\Addl\-/,
|
||
|
/\Adml\-/,
|
||
|
/\Aqueries\-/,
|
||
|
/\Adatatype\-/,
|
||
|
/\Afunctions\-/,
|
||
|
/\Aindexes\-/,
|
||
|
/\Aruntime\-config\-/]
|
||
|
|
||
|
options[:skip] = %w(
|
||
|
ddl-others.html
|
||
|
runtime-config-custom.html
|
||
|
runtime-config-short.html
|
||
|
functions-event-triggers.html
|
||
|
functions-trigger.html)
|
||
|
|
||
|
options[:attribution] = <<-HTML
|
||
|
© 1996–2013 The PostgreSQL Global Development Group<br>
|
||
|
Licensed under the PostgreSQL License.
|
||
|
HTML
|
||
|
end
|
||
|
end
|