duckdb.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. module Docs
  2. class Duckdb < UrlScraper
  3. self.name = 'DuckDB'
  4. self.type = 'duckdb'
  5. self.root_path = 'index.html'
  6. self.links = {
  7. home: 'https://duckdb.org/',
  8. code: 'https://github.com/duckdb/duckdb'
  9. }
  10. # https://duckdb.org/docs/guides/offline-copy.html
  11. # curl -O https://duckdb.org/duckdb-docs.zip; bsdtar xf duckdb-docs.zip; cd duckdb-docs; python -m http.server
  12. self.release = '1.1.3'
  13. self.base_url = 'http://localhost:8000/docs/'
  14. html_filters.push 'duckdb/entries', 'duckdb/clean_html'
  15. text_filters.replace 'attribution', 'duckdb/attribution'
  16. options[:container] = '.documentation'
  17. options[:skip_patterns] = [
  18. /installation/,
  19. /archive/,
  20. /reference/,
  21. ]
  22. options[:skip] = %w(
  23. docs/archive/
  24. docs/installation/
  25. docs/api/
  26. )
  27. options[:attribution] = <<-HTML
  28. &copy; Copyright 2018&ndash;2024 Stichting DuckDB Foundation<br>
  29. Licensed under the MIT License.
  30. HTML
  31. def get_latest_version(opts)
  32. get_github_tags('duckdb', 'duckdb', opts)[0]['name']
  33. end
  34. end
  35. end