Note
TimingのデータをAppleScriptで取得してみる。 → Timing api clientはWeb APIのみのためApp Usageなどデバイス依存のものは取得できない。 Apple Scriptを利用することで取得できるので試す。
一旦AppUsageを含むレポートをJSONに出力するスクリプトを実装した。
-- Copyright (c) 2025 Timing Software GmbH. All rights reserved.
-- This script is licensed only to extend the functionality of Timing. Redistribution and any other uses are not allowed without prior permission from us.
tell application "TimingHelper"
if not advanced scripting support available then
error "This script requires a Timing Connect subscription. Please contact support via https://timingapp.com/contact to upgrade."
end if
end tell
set datevar to current date
set datevar to datevar - (7 * days)
set hours of datevar to 7
set minutes of datevar to 0
set seconds of datevar to 0
tell application "TimingHelper"
set reportSettings to make report settings
set exportSettings to make export settings
get properties of reportSettings
tell reportSettings
set first grouping mode to by month
set second grouping mode to by project
set time entries included to true
set time entry title included to true
set also group by time entry title to true
set time entry timespan included to true
set time entry notes included to true
set app usage included to true
set application info included to true
set timespan info included to true
set also group by application to true
end tell
tell exportSettings
set file format to JSON
set duration format to seconds
set short entries included to true
end tell
save report with report settings reportSettings export settings exportSettings between datevar and datevar to "/Users/nakanotomoya/Desktop/export.json"
-- these commands are required to avoid accumulating old settings (and thus leaking memory)
delete reportSettings
delete exportSettings
end tell
これを利用すればAppScriptを実行できる環境であればTimingのアプリケーションからAppUsageを取得できる。 AppleのTimescreenは直接取得できない認識だがTimingを使えばTiming経由でほぼ同様のデータが取得できるという発見。ClaudeなどからMCPServerとしてアクセスできるようにしたい。