Skip to content

Zulut30/HdtCollectionExporter

Repository files navigation

Manacost banner

HDT Collection Exporter by Manacost

Collection JSON/CSV export plugin for HearthSim/Hearthstone-Deck-Tracker, with source-level macOS adapter for HearthSim/HSTracker.

HDT Plugin Latest release Windows macOS Local only

C Sharp Swift .NET Framework WPF JSON CSV

Overview

HDT Collection Exporter by Manacost is a local plugin for Hearthstone Deck Tracker. It exports a user's Hearthstone collection and local profile data to files that can later be uploaded manually to another site or tool. The repository also includes a Swift source adapter for HSTracker on macOS.

Экспорт коллекции HDT от Manacost — локальный плагин для Hearthstone Deck Tracker. Он экспортирует коллекцию Hearthstone и локальные данные профиля в файлы, которые пользователь может вручную загрузить на сайт или в другой инструмент.

No network requests are made by the plugin during export.

Features

  • Full collection export to JSON.
  • Full collection export to UTF-8 CSV.
  • Changes-only export to JSON or CSV using a local baseline.
  • Local baseline controls: set current, import old full JSON, clear baseline.
  • Exports collection cards, dust, card backs, favorite card back, favorite heroes, raw player records, derived class stats, and basic user identifiers exposed by HDT.
  • English and Russian plugin entries in one DLL.
  • Manacost-branded WPF export window.
  • Swift source adapter for HSTracker/macOS using the same JSON/CSV schema.

Download

Download the latest release:

Latest Release

Release assets:

  • HdtCollectionExporter.dll — plugin DLL for HDT.
  • HdtCollectionExporter-vX.Y.Z.zip — DLL plus install guides.

Install

  1. Download HdtCollectionExporter.dll from the latest release.
  2. Open Hearthstone Deck Tracker.
  3. Go to Options > Tracker > Plugins.
  4. Click Plugins Folder.
  5. Copy only HdtCollectionExporter.dll into that folder.
  6. Fully restart HDT, including the tray icon.
  7. Enable either Collection Exporter by Manacost or Экспорт коллекции от Manacost.

Usually the HDT plugin folder is:

%AppData%\HearthstoneDeckTracker\Plugins

More details:

macOS / HSTracker

HSTracker does not currently expose the same drop-in plugin API as HDT. For macOS users, this repository includes a source-level Swift adapter that can be added to an HSTracker fork or custom build:

macos/HSTrackerManacostExporter/

It uses HSTracker's CollectionHelpers.hearthstone.getCollection() and exports the same local JSON/CSV schema, including changes-only export and class statistics.

Guides:

Exported Data

Full JSON export schema version: 3.

Top-level JSON fields:

  • exportedAt
  • source
  • version
  • user
  • dust
  • cardBacks
  • favoriteCardBack
  • favoriteHeroes
  • playerRecords
  • classStats
  • favoriteClass
  • bestClassByWins
  • cards

classStats is derived from HDT playerRecords: the plugin treats each non-zero playerRecords.records[].data value as a hero DBF ID, resolves it through HearthDb, and aggregates wins/losses/ties by CardClass. recordTypes[].type keeps the raw numeric HDT/Hearthstone record type, which is usually the game mode bucket. favoriteClass is the class with the most recorded games across the exported record buckets; bestClassByWins is the class with the most wins.

Full CSV keeps this stable header:

cardId,dbfId,name,set,rarity,class,normal,golden,ownedTotal

In CSV, golden is the real golden-card count. ownedTotal includes normal, golden, diamond, and signature copies. The detailed premium split is available in JSON.

Changes Export

The plugin stores a local baseline snapshot after a full export or when the user clicks Set current.

Changes export compares the current collection against the saved baseline:

  • Changes JSON writes hearthstone-collection-changes-YYYYMMDD-HHMMSS.json.
  • Changes CSV writes hearthstone-collection-changes-YYYYMMDD-HHMMSS.csv.
  • Changes Both writes both files.

If no baseline exists yet, the plugin creates one from the current collection instead of failing. The next changes export will then contain only newer changes.

Build

Requirements:

  • Windows
  • Hearthstone Deck Tracker installed
  • Visual Studio 2022 Build Tools or Visual Studio
  • Recommended: .NET Framework 4.7.2 Developer Pack / targeting pack

Build from the repository root:

.\build.ps1

Build output:

src\HdtCollectionExporter\bin\x86\Release\HdtCollectionExporter.dll

Project Structure

src/HdtCollectionExporter/
  Assets/manacost_logo.jpg           Manacost banner/logo used in the UI and README
  HdtCollectionExporterPlugin.cs     HDT plugin entry points
  Services/HdtCollectionProvider.cs  Reads HDT collection data
  Services/CollectionExportService.cs Writes full and changes JSON/CSV
  Settings/PluginSettings.cs         XML settings
  UI/ExportWindow.xaml               WPF export window
  UI/ExportWindowText.cs             English/Russian UI text
  Models/                            Export DTOs

samples/
  sample-collection.json
  sample-collection.csv
  sample-collection-changes.json
  sample-collection-changes.csv
  hstracker-sample-collection.json
  hstracker-sample-collection.csv

macos/HSTrackerManacostExporter/
  ManacostCollectionExportModels.swift
  ManacostCollectionExporter.swift
  ManacostCollectionExportMenuController.swift

Reference Repositories

The implementation here is separate code. Current collection access uses HDT's CollectionHelpers.Hearthstone.GetCollection() rather than OCR, network calls, or manual process-memory reading.

About

Manacost plugin for HearthSim/Hearthstone-Deck-Tracker that exports Hearthstone collection data to JSON/CSV.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages