16 lines
418 B
Python
Executable File
16 lines
418 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
|
|
cache_dir = os.getenv("XDG_CACHE_HOME", os.path.expanduser("~/.cache"))
|
|
title_file = os.path.join(cache_dir, "arch_news_last_title")
|
|
read_file = os.path.join(cache_dir, "arch_news_read")
|
|
|
|
try:
|
|
if os.path.exists(title_file):
|
|
with open(title_file, "r") as src, open(read_file, "w") as dst:
|
|
dst.write(src.read())
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
|