# Japan Work Secretary
**Track part-time shifts in Japan: see your pay by time band and get warned before a week goes over the 28-hour student limit.**
[中文说明 →](README.zh.md) · [日本語](#日本語)
## What it does
- **Works out your pay the way a Japanese payslip does:** morning, day, evening and late-night rates per store, overtime, holiday bonus and breaks you actually took.
- **Checks every 7-day window as you add shifts,** and tells you before you save if a shift pushes a week over 28 hours (8 hours a day during your school's long vacation).
- **Keeps the schedule in your vault,** syncs it to macOS Calendar or exports .ics, and can read a roster from a message or a photo.
## Start here
1. Install and enable **Japan Work Secretary**, then run **Japan Work Secretary: Open dashboard**.
2. On an empty dashboard, click **Load a sample week**. Five made-up shifts at *Sample store* show hours, estimated pay and the 28-hour check. They are never synced or exported, and **Remove samples** deletes them.
3. In **Settings → Japan Work Secretary**, set your stores and their hourly rates, then double-click a day to add a real shift.
4. Optional: to read rosters from text or photos, choose an AI service under **AI for reading schedules** and click **Test**.
## What it needs and what it costs
| | |
|---|---|
| Obsidian | 1.13 or later, desktop only |
| Calendar sync | macOS Calendar. The .ics export works anywhere. |
| The plugin | Free, MIT licence. No account, no server of ours. |
| AI for rosters | Optional. Your own key; you pay your AI provider for what you send. One roster photo is a few thousand tokens. Everything else works without it. |
## Where your data goes
| What | Sent to | When |
|---|---|---|
| The selected text or the images in the open note | The AI service you chose | Only when you run *Read shifts from selected text* or *Read shifts from images in the current note* |
| A tiny "reply with ok" request | The AI service | Only when you click **Test** |
| Shift events | Your local macOS Calendar (AppleScript) | When you sync |
| Nothing (downloads only) | `holidays-jp.github.io` for public holidays; `exchangerate-api.com` or `frankfurter.dev` for the yen-to-yuan rate shown next to pay | About once a week |
- **The API key** lives in Obsidian's secret storage on this device. The plugin's settings keep only its name, so the key does not sync: on a new device, choose it again.
- **Shifts, stores, wages and settings** stay in the plugin's `data.json` in your vault.
- **Diagnostics** from the test contain the service, address, model and error, but no key and no shift content.
### What the plugin touches
- **One program: `/usr/bin/osascript`** (the directory's "Shell Execution" note), only to add, update and remove your shift events in macOS Calendar when you add, edit or delete shifts and when you sync. The AppleScript is fixed in the plugin; shift details are passed to it as arguments, never built into a command. No other program is started.
- **Clipboard: write only.** **Copy** in the export window copies the schedule text; the copy button next to **Test** copies the diagnostics. It never reads the clipboard.
- **Network: three kinds of request, nothing else.** The AI service at the address in your settings, only when you read a roster, fetch the model list or click **Test**; `holidays-jp.github.io` for public holidays; `frankfurter.dev`, or `exchangerate-api.com` if that fails, for the exchange rate. No analytics, no server of ours.
## Reading a roster