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
Branches master
Aucune étiquette associée trouvée
1 requête de fusion!161Kagari update
......@@ -99,6 +99,14 @@ def create_parser():
+ "\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(
"-r",
"--random",
......@@ -143,7 +151,8 @@ def search_query(args):
url_values["id"] = args.id
# No ID, building the query parameters
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)
if arg:
url_values[arg_name] = arg
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment