Initial parser admin implementation
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
INSERT INTO app_settings(key, value_json, value_type, title, description, category)
|
||||
VALUES
|
||||
('parser_skip_empty_text', 'true'::jsonb, 'bool', 'Skip empty text posts', 'Treat posts without text as junk.', 'Parser')
|
||||
ON CONFLICT (key) DO NOTHING;
|
||||
|
||||
UPDATE app_settings
|
||||
SET value_json='50'::jsonb,
|
||||
description='Posts with shorter text are treated as junk.',
|
||||
updated_at=NOW()
|
||||
WHERE key='parser_min_text_length'
|
||||
AND value_json='0'::jsonb;
|
||||
|
||||
UPDATE app_settings
|
||||
SET value_json='false'::jsonb,
|
||||
description='Keep junk posts in raw_posts instead of dropping them.',
|
||||
updated_at=NOW()
|
||||
WHERE key='parser_store_skipped_posts'
|
||||
AND value_json='true'::jsonb;
|
||||
|
||||
UPDATE app_settings
|
||||
SET description='Treat posts without media as junk.',
|
||||
updated_at=NOW()
|
||||
WHERE key='parser_skip_no_media';
|
||||
|
||||
UPDATE app_settings
|
||||
SET description='Treat posts shorter than parser_min_text_length as junk.',
|
||||
updated_at=NOW()
|
||||
WHERE key='parser_skip_text_too_short';
|
||||
Reference in New Issue
Block a user