mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-06 07:47:53 +10:00
improve plugin tests and config
This commit is contained in:
21
archivebox/plugins/accessibility/config.json
Normal file
21
archivebox/plugins/accessibility/config.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required_plugins": ["chrome"],
|
||||
"properties": {
|
||||
"ACCESSIBILITY_ENABLED": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"x-aliases": ["SAVE_ACCESSIBILITY", "USE_ACCESSIBILITY"],
|
||||
"description": "Enable accessibility tree capture"
|
||||
},
|
||||
"ACCESSIBILITY_TIMEOUT": {
|
||||
"type": "integer",
|
||||
"default": 30,
|
||||
"minimum": 5,
|
||||
"x-fallback": "TIMEOUT",
|
||||
"description": "Timeout for accessibility capture in seconds"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,13 +212,13 @@ async function main() {
|
||||
|
||||
try {
|
||||
// Check if enabled
|
||||
if (!getEnvBool('SAVE_ACCESSIBILITY', true)) {
|
||||
console.log('Skipping accessibility (SAVE_ACCESSIBILITY=False)');
|
||||
if (!getEnvBool('ACCESSIBILITY_ENABLED', true)) {
|
||||
console.log('Skipping accessibility (ACCESSIBILITY_ENABLED=False)');
|
||||
// Output clean JSONL (no RESULT_JSON= prefix)
|
||||
console.log(JSON.stringify({
|
||||
type: 'ArchiveResult',
|
||||
status: 'skipped',
|
||||
output_str: 'SAVE_ACCESSIBILITY=False',
|
||||
output_str: 'ACCESSIBILITY_ENABLED=False',
|
||||
}));
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user