postgresql.rb 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module Docs
  2. class Postgresql < FileScraper
  3. self.name = 'PostgreSQL'
  4. self.type = 'postgres'
  5. self.version = 'up to 9.3.2'
  6. self.dir = '/Users/Thibaut/DevDocs/Docs/PostgreSQL'
  7. self.base_url = 'http://www.postgresql.org/docs/9.3/static/'
  8. self.root_path = 'reference.html'
  9. self.initial_paths = %w(sql.html runtime-config.html charset.html)
  10. html_filters.insert_before 'normalize_urls', 'postgresql/clean_nav'
  11. html_filters.push 'postgresql/clean_html', 'postgresql/entries', 'title'
  12. options[:title] = false
  13. options[:root_title] = 'PostgreSQL'
  14. options[:follow_links] = ->(filter) { filter.initial_page? }
  15. options[:only] = %w(
  16. arrays.html
  17. rowtypes.html
  18. rangetypes.html
  19. mvcc-intro.html
  20. transaction-iso.html
  21. explicit-locking.html
  22. applevel-consistency.html
  23. locking-indexes.html
  24. config-setting.html
  25. locale.html
  26. collation.html
  27. multibyte.html)
  28. options[:only_patterns] = [
  29. /\Asql\-/,
  30. /\Aapp\-/,
  31. /\Addl\-/,
  32. /\Adml\-/,
  33. /\Aqueries\-/,
  34. /\Adatatype\-/,
  35. /\Afunctions\-/,
  36. /\Aindexes\-/,
  37. /\Aruntime\-config\-/]
  38. options[:skip] = %w(
  39. ddl-others.html
  40. runtime-config-custom.html
  41. runtime-config-short.html
  42. functions-event-triggers.html
  43. functions-trigger.html)
  44. options[:attribution] = <<-HTML
  45. &copy; 1996&ndash;2013 The PostgreSQL Global Development Group<br>
  46. Licensed under the PostgreSQL License.
  47. HTML
  48. end
  49. end