Add magic string exclusion support

pull/1/head
Starbeamrainbowlabs 2021-10-18 15:21:46 +01:00
parent 5a549e67a9
commit 0987d6ccec
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
1 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,11 @@ async function do_feeds() {
global.feed_items.sort((a, b) => b.pubdate_obj - a.pubdate_obj);
// console.log(feed_items.map(el => el.title));
const magic_string = `__excludehullblogs__`;
global.feed_items = global.feed_items.filter((item) => item.title.indexOf(magic_string) === -1
&& item.description.indexOf(magic_string) === -1
&& item.content.indexOf(magic_string) === -1)
if(process.env.FILTER_FEED) {
const feed_items_count = global.feed_items.length;
global.feed_items = global.feed_items.filter((item) => !check_text(item.title)