Make folder an arg
This commit is contained in:
parent
e323b1fbe0
commit
caededba88
@ -139,6 +139,7 @@ def main(
|
|||||||
grouped: bool = False,
|
grouped: bool = False,
|
||||||
special_tag: str | None = None,
|
special_tag: str | None = None,
|
||||||
no_processing: bool = False,
|
no_processing: bool = False,
|
||||||
|
folder: str = "data",
|
||||||
) -> None:
|
) -> None:
|
||||||
bez_data = get_bez_data([tag], url)[0]
|
bez_data = get_bez_data([tag], url)[0]
|
||||||
df = construct_dataframe(
|
df = construct_dataframe(
|
||||||
@ -151,7 +152,7 @@ def main(
|
|||||||
if dry_run:
|
if dry_run:
|
||||||
print(df)
|
print(df)
|
||||||
else:
|
else:
|
||||||
filename = f"data/{datetime.today().strftime('%Y-%m-%d')}_data.ods"
|
filename = f"{folder}/{datetime.today().strftime('%Y-%m-%d')}_data.ods"
|
||||||
if Path(filename).exists():
|
if Path(filename).exists():
|
||||||
print("File already exists!")
|
print("File already exists!")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user