From 7ab105893788155de11d2b619390daa196c558f9 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 12 Jun 2023 13:49:49 +0300 Subject: [PATCH] separate long hints --- src/fw_api_hints.py | 10 ++++++++++ src/fw_recents.py | 12 ++---------- 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 src/fw_api_hints.py diff --git a/src/fw_api_hints.py b/src/fw_api_hints.py new file mode 100644 index 0000000..a6e63a9 --- /dev/null +++ b/src/fw_api_hints.py @@ -0,0 +1,10 @@ +def hint_scope(): + print( +'''Limit the results to a given user or pod: + Use all (or do not specify the property to disable scope filtering) + Use me to retrieve content relative to the current user + Use subscribed to retrieve content in libraries you follow + Use actor:alice@example.com to retrieve content relative to the account `alice@example.com + Use domain:example.com to retrieve content relative to the domain `example.com +You can specify multiple coma separated scopes, e.g me,subscribed to retrieve content matching either scopes +''') diff --git a/src/fw_recents.py b/src/fw_recents.py index 0541b83..76a82d9 100644 --- a/src/fw_recents.py +++ b/src/fw_recents.py @@ -1,5 +1,6 @@ from src.fw_api import get_favorires_tracks, get_recently_listened, get_audio_file from src.mpv_control import player, player_menu, track_url_to_uuid, player_fw_storage +from src.fw_api_hints import hint_scope from pyfzf.pyfzf import FzfPrompt from loguru import logger @@ -37,16 +38,7 @@ def list_fav_or_history(pg=None, search=None, scope=None, is_history_view=False) print('Search by track:') list_fav_or_history(search=input(), is_history_view=is_history_view) elif 'Limit by scope' in select: - print(''' -Limit the results to a given user or pod: - - Use all (or do not specify the property to disable scope filtering) - Use me to retrieve content relative to the current user - Use subscribed to retrieve content in libraries you follow - Use actor:alice@example.com to retrieve content relative to the account `alice@example.com - Use domain:example.com to retrieve content relative to the domain `example.com - -''') + hint_scope() scope = input() list_fav_or_history(scope=scope, search=search, is_history_view=is_history_view) elif 'Play this page' in select: