Compare commits
3 Commits
e6fa98f707
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| cb2047fa19 | |||
| c1bcf6b74f | |||
| 7b673ef443 |
24
README.md
Normal file
24
README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# umadump-gametora
|
||||
|
||||
Convert [Umadump](https://github.com/Werseter/umadump) exports into [GameTora collection](https://gametora.com/umamusume/collection-tracker) backups.
|
||||
|
||||
This program is meant to be a temporary helper until GameTora has full Umadump import built in, which should be soon.
|
||||
Therefore, it does not provide a pretty UI.
|
||||
|
||||
## Usage
|
||||
|
||||
With a recent Go toolchain installed, open a terminal and run:
|
||||
|
||||
```
|
||||
umadump
|
||||
go run git.sunturtle.xyz/zephyr/umadump-gametora@latest
|
||||
```
|
||||
|
||||
If you run umadump in a different directory, pass that directory with `-dump` on the `go run` line.
|
||||
E.g., I run umadump in `C:\Users\zephyr\Downloads`, so the command I use is
|
||||
|
||||
```
|
||||
go run git.sunturtle.xyz/zephyr/umadump-gametora@latest -dump C:\Users\zephyr\Downloads
|
||||
```
|
||||
|
||||
This writes the collection to a file like `uma-col-all-2026-05-06.json` which you can use with the `Import from a file instead` link in the `Import` section of the `Backup` menu on the GameTora collection tracker page.
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
@@ -16,21 +17,15 @@ import (
|
||||
|
||||
type DumpCard struct {
|
||||
ID int `json:"card_id"`
|
||||
Level int `json:"talent_level"`
|
||||
Rarity int `json:"rarity"`
|
||||
CreateTime int `json:"create_time"`
|
||||
// Level int `json:"talent_level"`
|
||||
// CreateTime int `json:"create_time"`
|
||||
}
|
||||
|
||||
type DumpSupport struct {
|
||||
ID int `json:"supportCardId"`
|
||||
Level int `json:"level"`
|
||||
LB int `json:"limitBreakCount"`
|
||||
MaxLevel int `json:"maxLevel"`
|
||||
CreateTime int `json:"createTime"`
|
||||
Exp int `json:"exp"`
|
||||
Stock int `json:"stock"`
|
||||
Favorite bool `json:"isFavoriteLock"`
|
||||
BestTraining int `json:"bestTraining"`
|
||||
ID int `json:"support_card_id"`
|
||||
LB int `json:"limit_break_count"`
|
||||
// many other fields we don't need
|
||||
}
|
||||
|
||||
type Collection struct {
|
||||
@@ -88,12 +83,13 @@ func filejson[T any](path string) ([]T, error) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
ts := time.Now().UTC().Format(time.DateOnly) // can't use RFC3339 because :s in filename
|
||||
var (
|
||||
dumpDir string
|
||||
out string
|
||||
)
|
||||
flag.StringVar(&dumpDir, "dump", ".", "`dir`ectory containing umadump output files")
|
||||
flag.StringVar(&out, "o", "", "output `file` (default stdout)")
|
||||
flag.StringVar(&out, "o", fmt.Sprintf("uma-col-all-%s.json", ts), "output `file` (stdout if empty)")
|
||||
flag.Parse()
|
||||
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
@@ -142,7 +138,7 @@ func main() {
|
||||
Game: "umamusume",
|
||||
Type: "collection",
|
||||
Version: 4,
|
||||
Timestamp: time.Now().String(),
|
||||
Timestamp: ts,
|
||||
Servers: map[string]CollectionServer{
|
||||
"en": {
|
||||
CharCards: charaLevels,
|
||||
|
||||
Reference in New Issue
Block a user