Pixy import
Turn an OWLF document into a Pixy Mood Tracker import file.
@owlf/target-pixy writes the JSON file Pixy Mood Tracker imports. Pixy Switch uses it in the browser; the Pixy app can use it directly.
import { toPixyImport } from "@owlf/target-pixy";
const { text, stats } = toPixyImport(document, {
timeZone: "Europe/Berlin",
merge: existingPixyBackup, // optional: Pixy's import replaces all data
});
Default mapping
- Mood → 7 Ratings. Scales with up to 7 positions keep their steps around Neutral; larger scales and sliders spread over all 7.
valencewins when set. - No mood scale → the Rating chosen for entries without mood, Neutral by default.
- Sleep → 5 Sleep Qualities, same rule.
- Emotions → Pixy’s emotion catalog through per-app synonym tables. Unmatched names become Tags in “Imported emotions”.
- Tag groups → Tag Categories. Same-named tags in different groups stay separate.
- Title, note, prompts → one Note, each block separated by a blank line.
- Time zones:
zonelessandutcDateentries get their day re-derived intimeZone.
Every choice is a field of MappingConfig. Start from createDefaultConfig(document, timeZone) and change what the person picks.