haskell.rb 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. module Docs
  2. class Haskell < UrlScraper
  3. self.name = 'Haskell'
  4. self.type = 'haskell'
  5. self.version = '7.10.2'
  6. self.base_url = "https://downloads.haskell.org/~ghc/#{version}/docs/html/libraries/"
  7. self.root_path = 'index.html'
  8. html_filters.push 'haskell/entries', 'haskell/clean_html'
  9. options[:container] = '#content'
  10. options[:skip_patterns] = [
  11. /src\//,
  12. /doc-index/,
  13. /haskell2010/,
  14. /ghc-/,
  15. /Cabal-/,
  16. /Compiler-Hoopl-Internals\.html\z/i,
  17. /Control-Exception-Base\.html\z/i,
  18. /Data-Binary-Get-Internal\.html\z/i,
  19. /Language-Haskell-TH-Lib\.html\z/i,
  20. /Prelude\.html\z/i,
  21. /Text-PrettyPrint\.html\z/i,
  22. /Data-OldTypeable-Internal\.html\z/i,
  23. /Data-Typeable-Internal\.html\z/i,
  24. /GHC-IO-Encoding-Types\.html\z/i,
  25. /System-Posix-Process-Internals\.html\z/i
  26. ]
  27. options[:attribution] = <<-HTML
  28. &copy; The University of Glasgow and others<br>
  29. Licensed under a BSD-style license (see top of the page).
  30. HTML
  31. end
  32. end