Skip to content
Extraits de code Groupes Projets
Vérifiée Valider afe761fa rédigé par Krocoh's avatar Krocoh Validation de Kubat
Parcourir les fichiers

KAGARI: Add 'newer_than' filter to the arguments

parent de280848
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!161Kagari update
...@@ -99,6 +99,14 @@ def create_parser(): ...@@ -99,6 +99,14 @@ def create_parser():
+ "\nmatching the given string. (case insensitive)\n ", + "\nmatching the given string. (case insensitive)\n ",
) )
parser.add_argument(
"-n",
"--newer-than",
dest="newer_than",
help='In either mode, filters on the date of uploading,'
+ "\nreturning files after the date (format YYYY-MM-DD)\n "
)
parser.add_argument( parser.add_argument(
"-r", "-r",
"--random", "--random",
...@@ -143,7 +151,8 @@ def search_query(args): ...@@ -143,7 +151,8 @@ def search_query(args):
url_values["id"] = args.id url_values["id"] = args.id
# No ID, building the query parameters # No ID, building the query parameters
else: else:
for arg_name in ["author", "cat", "type", "search", "random"]: arg_list = ["author", "cat", "type", "search", "random", "newer_than"]
for arg_name in arg_list:
arg = getattr(args, arg_name) arg = getattr(args, arg_name)
if arg: if arg:
url_values[arg_name] = arg url_values[arg_name] = arg
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter