rewording options

This commit is contained in:
Believethehype
2024-05-13 08:37:55 +02:00
parent 6e2632c316
commit 14b3265545
2 changed files with 10 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ class DicoverContentCurrentlyPopularbyTopic(DVMTaskInterface):
search_list = [] search_list = []
avoid_list = [] avoid_list = []
must_list = [] must_list = []
individual_result = False personalized = False
result = "" result = ""
def __init__(self, name, dvm_config: DVMConfig, nip89config: NIP89Config, nip88config: NIP88Config = None, def __init__(self, name, dvm_config: DVMConfig, nip89config: NIP89Config, nip88config: NIP88Config = None,
@@ -52,8 +52,8 @@ class DicoverContentCurrentlyPopularbyTopic(DVMTaskInterface):
dvm_config.SCRIPT = os.path.abspath(__file__) dvm_config.SCRIPT = os.path.abspath(__file__)
if self.options.get("individual_result"): if self.options.get("personalized"):
self.individual_result = bool(self.options.get("individual_result")) self.personalized = bool(self.options.get("personalized"))
self.last_schedule = Timestamp.now().as_secs() self.last_schedule = Timestamp.now().as_secs()
if self.options.get("search_list"): if self.options.get("search_list"):
@@ -74,7 +74,7 @@ class DicoverContentCurrentlyPopularbyTopic(DVMTaskInterface):
init_logger(LogLevel.DEBUG) init_logger(LogLevel.DEBUG)
self.sync_db() self.sync_db()
if not self.individual_result: if not self.personalized:
self.result = self.calculate_Result(self.request_form) self.result = self.calculate_Result(self.request_form)
def is_input_supported(self, tags, client=None, dvm_config=None): def is_input_supported(self, tags, client=None, dvm_config=None):
@@ -113,7 +113,7 @@ class DicoverContentCurrentlyPopularbyTopic(DVMTaskInterface):
def process(self, request_form): def process(self, request_form):
# if the dvm supports individual results, recalculate it every time for the request # if the dvm supports individual results, recalculate it every time for the request
if self.individual_result: if self.personalized:
return self.calculate_Result(request_form) return self.calculate_Result(request_form)
#else return the result that gets updated once every schenduled update. In this case on database update. #else return the result that gets updated once every schenduled update. In this case on database update.
else: else:

View File

@@ -46,7 +46,8 @@ def playground():
"inkblot", "covid", "robot", "pandemic", "bethesda", "zap farming", " defi ", " minister ", "inkblot", "covid", "robot", "pandemic", "bethesda", "zap farming", " defi ", " minister ",
"nostr-hotter-site", " ai ", "palestine", "https://boards.4chan", "https://techcrunch.com", "https://screenrant.com"], "nostr-hotter-site", " ai ", "palestine", "https://boards.4chan", "https://techcrunch.com", "https://screenrant.com"],
"db_name": "db/nostr_recent_notes_plants.db", "db_name": "db/nostr_recent_notes_plants.db",
"db_since": 10 * 60 * 60} # 10h "db_since": 10 * 60 * 60, # 10h
"personalized": False}
image = "https://image.nostr.build/a816f3f5e98e91e8a47d50f4cd7a2c17545f556d9bb0a6086a659b9abdf7ab68.jpg" image = "https://image.nostr.build/a816f3f5e98e91e8a47d50f4cd7a2c17545f556d9bb0a6086a659b9abdf7ab68.jpg"
description = "I show recent notes about plants and gardening" description = "I show recent notes about plants and gardening"
@@ -72,8 +73,9 @@ def playground():
"must_list": ["http"], "must_list": ["http"],
"db_name": "db/nostr_recent_notes_animals.db", "db_name": "db/nostr_recent_notes_animals.db",
"db_since": 48 * 60 * 60} # 10h "db_since": 48 * 60 * 60, # 48h,
"personalized": False}
image = "https://image.nostr.build/f609311532c470f663e129510a76c9a1912ae9bc4aaaf058e5ba21cfb512c88e.jpg" image = "https://image.nostr.build/f609311532c470f663e129510a76c9a1912ae9bc4aaaf058e5ba21cfb512c88e.jpg"
description = "I show recent notes about animals" description = "I show recent notes about animals"