From cfb24bed0e16797c2209f62d753435bce2ceb869 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 15 May 2023 23:21:25 +0200 Subject: [PATCH] add remove parameters --- import_export_canalblog.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/import_export_canalblog.py b/import_export_canalblog.py index e6b4e28..4c38ff3 100644 --- a/import_export_canalblog.py +++ b/import_export_canalblog.py @@ -113,7 +113,22 @@ if __name__ == '__main__': import_parser.add_argument("--canalblog", help="URL Canalblog", default="") import_parser.add_argument("--wordpress", help="URL Wordpress", required=True) import_parser.add_argument("--serial", help="Serial execution", action="store_true") - import_parser.add_argument("--remove", help="Remove all articles", action="store_true") + import_parser.add_argument("--remove", help="Remove all", action="store_true") + remove_parser.add_argument("--remove-posts", help="Remove all posts", dest="posts", action="store_true") + remove_parser.add_argument("--remove-categories", help="Remove all categories", dest="categories", action="store_true") + remove_parser.add_argument("--remove-tags", help="Remove all tags", dest="tags", action="store_true") + remove_parser.add_argument("--remove-media", help="Remove all media", dest="media", action="store_true") + + + remove_parser = subparsers.add_parser("remove") + remove_parser.add_argument("--user", help="wordpress user", required=True) + remove_parser.add_argument("--password", help="password wordpress's user", default="") + remove_parser.add_argument("--wordpress", help="URL Wordpress", required=True) + remove_parser.add_argument("--all", help="Remove all (posts, media, tags, categories)", action="store_true") + remove_parser.add_argument("--posts", help="Remove all posts", action="store_true") + remove_parser.add_argument("--categories", help="Remove all categories", action="store_true") + remove_parser.add_argument("--tags", help="Remove all tags", action="store_true") + remove_parser.add_argument("--media", help="Remove all media", action="store_true")