diff --git a/utils/scripts/kagari.py b/utils/scripts/kagari.py index 171918def60456cb8db8906464a79d8bb2201aee..39492891c0a4cfb9c57d7b42c6fbe5df0a856648 100755 --- a/utils/scripts/kagari.py +++ b/utils/scripts/kagari.py @@ -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