From 2a8ae4553be08f3bf02a45f2fe061ce835ffadda Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Thu, 28 Jul 2022 09:37:48 +0200 Subject: [PATCH] cli: remove xml file after processing it --- xinvoice/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xinvoice/__init__.py b/xinvoice/__init__.py index 67b77b8..b25b609 100644 --- a/xinvoice/__init__.py +++ b/xinvoice/__init__.py @@ -5,7 +5,8 @@ Parsing X-Invoice files __version__ = "0.0.1" -# from bs4 import BeautifulSoup + +import pathlib import click import pyperclip @@ -69,3 +70,4 @@ def parse(file_path): @click.argument("file_path", type=click.Path(exists=True)) def main(file_path): print(parse(file_path)) + pathlib.Path(file_path).unlink(missing_ok=True)