diff --git a/TOOLS.md b/TOOLS.md index 4b568ef..746276f 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -176,28 +176,6 @@ ainews reset # Clear seen history --- -## FreeScout Time Tracking - -Helper script: `~/bin/freescout` - -```bash -freescout mailboxes # List mailboxes -freescout users # List users -freescout report --from DATE --to DATE # Show time report (tab-separated) - [--mailbox ID] [--user ID] [--customer NAME] -freescout excel --from DATE --to DATE # Generate invoice Excel - [--mailbox ID] [--user ID] [--customer NAME] [--output file.xlsx] -``` - -- Credentials: `.credentials/services.env` (CLOONAR_DB_* + FREESCOUT_DB_NAME) -- Queries timelogs table directly (API doesn't expose time tracking) -- Excel groups by conversation, shows subject, customer, website, hours -- Customer and Website are custom field dropdowns (resolved to labels) -- `time_spent` is stored in seconds, displayed as decimal hours -- Only timelogs within the date range are counted (not conversation dates) - ---- - ## Brain Dump CLI Helper script: `~/clawd/bin/tasks` diff --git a/skills/invoice-generator/SKILL.md b/skills/invoice-generator/SKILL.md index ff49141..e69ca38 100644 --- a/skills/invoice-generator/SKILL.md +++ b/skills/invoice-generator/SKILL.md @@ -14,22 +14,26 @@ Generate Excel invoices from FreeScout time tracking data and send them via What 3. Send the file to the user via the `message` tool 4. Reply with NO_REPLY (the file message is the reply) -## Available customers +## CLI Reference -If unsure which customer, run `bin/freescout report --from 2024-01-01 --to 2099-12-31` to see all, or pass a wrong name — the script prints available customers. - -## Other commands - -``` -bin/freescout mailboxes # List mailboxes -bin/freescout users # List users -bin/freescout report --from --to # Terminal report (add --customer, --mailbox, --user) -bin/freescout excel --from --to # Excel generation (add --customer, --mailbox, --user, --output) +```bash +freescout mailboxes # List mailboxes +freescout users # List users +freescout report --from DATE --to DATE # Show time report (tab-separated) + [--mailbox ID] [--user ID] [--customer NAME] +freescout excel --from DATE --to DATE # Generate invoice Excel + [--mailbox ID] [--user ID] [--customer NAME] [--output file.xlsx] ``` -## Notes +## Technical Details -- `time_spent` in DB is seconds, displayed as decimal hours -- Excel groups by conversation: subject, customer, website, total hours -- Customer and Website come from FreeScout custom fields (dropdowns) -- Only timelogs within the date range are counted, not conversation creation dates +- Credentials: `.credentials/services.env` (CLOONAR_DB_* + FREESCOUT_DB_NAME) +- Queries timelogs table directly (API doesn't expose time tracking) +- Excel groups by conversation, shows subject, customer, website, hours +- Customer and Website are custom field dropdowns (resolved to labels) +- `time_spent` is stored in seconds, displayed as decimal hours +- Only timelogs within the date range are counted (not conversation dates) + +## Finding Customers + +Pass a wrong `--customer` name — the script prints all available customers.