Sfoglia il codice sorgente

George Town Updates

Benjamin Harris 2 mesi fa
parent
commit
86a770139f
2 ha cambiato i file con 41 aggiunte e 0 eliminazioni
  1. 30 0
      .gitattributes
  2. 11 0
      scrapers/kingisland.rb

+ 30 - 0
.gitattributes

@@ -0,0 +1,30 @@
+# Enforce LF line endings for all text files in the repository.
+# This prevents CRLF endings (written by Windows editors/tools) from
+# reaching the Docker/Linux Ruby runtime, which misparses \r as a token.
+
+* text=auto eol=lf
+
+# Ruby source — always LF
+*.rb text eol=lf
+
+# Shell scripts — always LF (CRLF breaks shebang and bash execution)
+*.sh text eol=lf
+
+# PHP, SQL, config — always LF
+*.php text eol=lf
+*.sql text eol=lf
+*.yml text eol=lf
+*.yaml text eol=lf
+*.json text eol=lf
+*.md text eol=lf
+*.txt text eol=lf
+Dockerfile text eol=lf
+.env* text eol=lf
+
+# Binary files — no line-ending conversion
+*.pdf binary
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.ico binary

+ 11 - 0
scrapers/kingisland.rb

@@ -0,0 +1,11 @@
+# George Town Council — Development Applications (site page, not PlanBuild)
+
+require "nokogiri"
+require_relative "../lib/http"
+require_relative "../lib/util"
+require_relative "../lib/scraper_helpers"
+
+TABLE = ENV.fetch("TABLE_NAME")  # run_all.sh sets from filename: da_georgetown
+URL   = "https://kingisland.tas.gov.au/develop/planning/"
+
+DB.ensure_table!(TABLE)