mirror of
https://github.com/farcasclaudiu/xtb-investment-tools.git
synced 2026-06-22 07:01:58 +03:00
2.4 KiB
2.4 KiB
name, description
| name | description |
|---|---|
| xtb-wealthfolio-export | Use when converting XTB brokerage .xlsx exports to Wealthfolio-compatible CSV imports, validating brokerage export rows, checking transaction activity mappings, reviewing trade/dividend/cash classifications, or debugging exporter.py output. |
XTB Wealthfolio Export
Use this skill to create and validate Wealthfolio CSV files from XTB Cash Operations data from a copied skill folder. The skill bundles the required Python tools in scripts/, so it can run without the original repository as long as Python dependencies are installed.
Workflow
- Identify the target workbook. If omitted and exactly one non-lock
.xlsxexists in the current working directory, the exporter can auto-detect it. - Ensure dependencies are available:
<skill-folder>/scripts/setup-env.sh - Validate the bundled tools:
<skill-folder>/scripts/validate-export.sh - Create the Wealthfolio CSV from the directory where outputs should be written:
<skill-folder>/scripts/export-wealthfolio.sh <report.xlsx> - If the user needs a custom path, run:
<skill-folder>/scripts/export-wealthfolio.sh <report.xlsx> -o <output.csv> - Inspect the generated CSV header and a sample of rows before saying it is import-ready.
- If row classification looks suspicious, read
references/wealthfolio-csv.mdand compare activity mappings.
Bundled Tools
scripts/exporter.py: standalone XTB to Wealthfolio CSV exporter.scripts/main.py: shared XTB parsing helpers used by the exporter.scripts/html_charts.pyandscripts/assets/: bundled becausemain.pyimports the report helper.scripts/export-wealthfolio.sh: shell wrapper that runs the bundled exporter.scripts/validate-export.sh: dependency and schema smoke check.scripts/setup-env.sh: creates.venvin the current working directory and installs dependencies.scripts/requirements.txt: Python dependencies.
References
- Read
references/wealthfolio-csv.mdfor Wealthfolio schema, XTB activity mapping, and known XTB comment quirks.
Guardrails
- Do not hand-edit exported CSV rows unless the user asks; prefer fixing
scripts/exporter.pywhen mappings are wrong. - Keep
BUYandSELLtrade rows with blankamount; Wealthfolio calculates trade amount fromquantity * unitPrice. - For pure cash activities, use
$CASH-<CCY>and setquantity = 1,unitPrice = 1, andamountto the absolute cash value.