add subparser export

This commit is contained in:
Valentin CZERYBA 2023-04-08 23:34:56 +02:00
parent b3f623cbd5
commit ebc6206ec9

View File

@ -19,6 +19,18 @@ if __name__ == '__main__':
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()
logger = logging.getLogger('insert wordpress')