mirror of
https://github.com/FutaGuard/LowTechFilter.git
synced 2025-06-21 05:21:02 +08:00
Fix missing line break for accumulated files
This commit is contained in:
parent
8d8e97afa0
commit
ea2bba853c
@ -159,7 +159,10 @@ async def write_files(datalist: List[Dict[str, List[bytes]]]):
|
||||
sort_date = sorted(combined_data.keys(), reverse=True)[:30]
|
||||
accumulate = b""
|
||||
for date in range(len(sort_date)):
|
||||
accumulate += b"\n".join(combined_data[sort_date[date]])
|
||||
if not accumulate:
|
||||
accumulate = b"\n".join(combined_data[sort_date[date]])
|
||||
else:
|
||||
accumulate += b"\n" + b"\n".join(combined_data[sort_date[date]])
|
||||
# accumulate = "\n".join(sorted(set(accumulate.split("\n"))))
|
||||
base_path.joinpath(f"past-{(date + 1):02d}day.txt").write_bytes(accumulate)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user