From 82b79461d67b6537ebaedef45acccf2166e740ef Mon Sep 17 00:00:00 2001 From: anbosuki Date: Mon, 4 Jul 2022 19:22:35 +0200 Subject: [PATCH] cli-delete-posts Added the possibility to delete single posts or a range of multiple posts at once using the command as following:
`docker-compose run server ./szuru-admin --delete posts 35 36 40-45`
Each space represents a single post id, using a `-` between two ids will delete all posts within range, including the first and the last one --- server/szuru-admin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/szuru-admin b/server/szuru-admin index be743227..ee5fa69f 100755 --- a/server/szuru-admin +++ b/server/szuru-admin @@ -175,7 +175,8 @@ def main() -> None: "--delete-posts", metavar="", nargs='+', - help="Will delete all posts with the given id's" + help="Will delete all posts with the given id's, all id's are seperated by a space. " + "If you want to delete a range of posts use it like: 37-47 (including the first and last number)" ) command = parser_top.parse_args()