print files
This commit is contained in:
parent
bfaad76553
commit
7388c1b0dc
1 changed files with 15 additions and 14 deletions
|
|
@ -8,11 +8,12 @@ import matplotlib.pyplot as plt
|
||||||
DATA_DIR = Path("/var/lib/wanikani-logs")
|
DATA_DIR = Path("/var/lib/wanikani-logs")
|
||||||
print("starting the WaniKani service")
|
print("starting the WaniKani service")
|
||||||
def load_data():
|
def load_data():
|
||||||
records = []
|
# records = []
|
||||||
for zip_path in sorted(DATA_DIR.glob("wanikani_data_*.zip")):
|
for zip_path in sorted(DATA_DIR.glob("wanikani_data_*.zip")):
|
||||||
st.write(f"Processing {zip_path.name}...")
|
st.write(f"Processing {zip_path.name}...")
|
||||||
# with zipfile.ZipFile(zip_path) as z:
|
with zipfile.ZipFile(zip_path) as z:
|
||||||
# for name in z.namelist():
|
for name in z.namelist():
|
||||||
|
print(f"Processing file: {name}")
|
||||||
# with z.open(name) as f:
|
# with z.open(name) as f:
|
||||||
# data = json.load(f)
|
# data = json.load(f)
|
||||||
# date = zip_path.stem.split("_")[-1]
|
# date = zip_path.stem.split("_")[-1]
|
||||||
|
|
@ -26,5 +27,5 @@ def load_data():
|
||||||
# return pd.DataFrame(records)
|
# return pd.DataFrame(records)
|
||||||
|
|
||||||
st.title("📈 WaniKani Progress Tracker")
|
st.title("📈 WaniKani Progress Tracker")
|
||||||
# df = load_data()
|
df = load_data()
|
||||||
# st.line_chart(df.set_index("date"))
|
# st.line_chart(df.set_index("date"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue