cldellow / datasette-scraper

Add website scraping abilities to Datasette
Apache License 2.0
60 stars 1 forks source link

hook: config_schema, config_default_values #33

Closed cldellow closed 1 year ago

cldellow commented 1 year ago
config_schema()

Returns a JSON schema describing the configuration this plugin accepts.

The schema is optional; if omitted, users will have to hand-edit their configurations versus using interactive UI tools.

config_default_value()

Returns None to indicate that new crawls should not use this plugin by default.

Otherwise, returns a reasonable default value that conforms to the schema in config_schema()

cldellow commented 1 year ago

https://github.com/cldellow/datasette-scraper/commit/0d16e8e6b5f2319c72fef290a089e993bef39ac0 goes a long way to implementing what I had in mind here, so closing