No description
Find a file
Jeena 0ada2d4858 Fix bugs and improve robustness of report fetching
- Fix missing 'import sys' in get_report.py that caused a NameError
  on the credential-check error path
- Fix indentation of the per-report print statement in
  report_json_down.py so it prints for every report, not just the
  last one per date
- Replace hardcoded X-ENROLLMENT header value with dynamic extraction
  from selenium-wire intercepted requests
- Replace fragile time.sleep() calls with WebDriverWait so the script
  waits for actual page/login readiness rather than fixed delays
- Remove album_json_down.py, a Windows-only legacy script inherited
  from upstream that was never used in this fork
2026-03-18 00:37:35 +00:00
systemd Add uptime-kuma example and fix python version 2026-01-20 07:58:40 +09:00
.gitignore Add run.sh 2025-07-18 23:27:27 +09:00
env-sample Initial commit 2025-07-11 14:10:03 +09:00
get_report.py Fix bugs and improve robustness of report fetching 2026-03-18 00:37:35 +00:00
LICENSE Add GPL v3 license 2025-08-14 20:04:18 +09:00
Pipfile Fix python version requirement 2026-01-20 08:22:57 +09:00
Pipfile.lock Fix python version requirement 2026-01-20 08:22:57 +09:00
README.md Explain to change the working directory in service file 2025-08-15 09:14:35 +09:00
report_json_down.py Fix bugs and improve robustness of report fetching 2026-03-18 00:37:35 +00:00
run.sh Add uptime-kuma example and fix python version 2026-01-20 07:58:40 +09:00

Kidsnote backup photo extraction

I found the original script here https://gist.github.com/Leuconoe/21f6a07f50389c4de1ec127944af7008

I'm adding info to be able to easier use it.

Installation

pipenv install

How to use:

  1. Copy the env-sample file to .env
  2. Put in your username and password
  3. Put in the path where you want the pictures stored, it will create a YYYY/MM/DD structure there
  4. Run pipenv run ./get_report.py to get the report, it stores it in a file report.json
  5. Run pipenv run ./report_json_down.py to download all the reports and pictures

Run automatically with a systemd timer

This will run the script every day at midnight or once you wake up your computer:

  1. Change the working directory to where you checked out the code in systemd/kidsnote.service
  2. cp systemd/kidsnote.service ~/.config/systemd/user/
  3. cp systemd/kidsnote.timer ~/.config/systemd/user/
  4. systemctl --user daemon-reload
  5. systemctl --user enable --now kidsnote.timer

It assumes you already set up the .env file.

Why username and password?

In the old script you had to get the report manually from the browser. I added get_report.py which logs in with a headless chromium browser, gets the report for you so it's possible to automate it with cron.

License

GPL v3