From ebc6206ec9c6b430461b9c10df2c1c0cbdcfeccc Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 8 Apr 2023 23:34:56 +0200 Subject: [PATCH] add subparser export --- import_export_canalblog.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/import_export_canalblog.py b/import_export_canalblog.py index ed55576..f1e07df 100644 --- a/import_export_canalblog.py +++ b/import_export_canalblog.py @@ -18,6 +18,18 @@ if __name__ == '__main__': import_parser.add_argument("--file", help="HTML file", default="") import_parser.add_argument("--directory", help="HTML directory", default="") import_parser.add_argument("--wordpress", help="URL Wordpress", required=True) + + export_parser = subparsers.add_parser("export") + + export_parser.add_argument("--url", help="canblog URL to be scraping", required=True) + export_parser.add_argument("--directory", + default="backup", + help="backup file path") + export_parser.add_argument("--no-css", help="No CSS", dest="css", action="store_true") + export_parser.add_argument("--no-js", help="No JS", dest="js", action="store_true") + export_parser.add_argument("--no-img", help="No img", dest="img", action="store_true") + export_parser.add_argument("--no-html", help="No HTML", dest="html", action="store_true") + args = parser.parse_args()