From 7b6addcb0588066e1dde40d97dbe4d8211db4e26 Mon Sep 17 00:00:00 2001 From: Florian Baumann Date: Thu, 27 Apr 2023 07:47:04 +0200 Subject: [PATCH] remove etched part of analysis --- readme.md | 3 ++- src/serra/stats.go | 4 +--- src/serra/update.go | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index eeb16c3..894d247 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,8 @@ an overview in what cards you own and what value they have. **What Serra does not** -* Does not give a shit about conditions (NM, M, GD...) +* Does not care about conditions (NM, M, GD...) +* Does not track etched cards. Only normal and foil. # Quickstart diff --git a/src/serra/stats.go b/src/serra/stats.go index 71b8531..1a7ad00 100644 --- a/src/serra/stats.go +++ b/src/serra/stats.go @@ -54,14 +54,13 @@ var statsCmd = &cobra.Command{ {"value_foil", bson.D{{"$sum", bson.D{{"$multiply", bson.A{getCurrencyField(true), "$serra_count_foil"}}}}}}, {"count", bson.D{{"$sum", bson.D{{"$multiply", bson.A{1.0, "$serra_count"}}}}}}, {"count_foil", bson.D{{"$sum", "$serra_count_foil"}}}, - {"count_etched", bson.D{{"$sum", "$serra_count_etched"}}}, {"rarity", bson.D{{"$sum", "$rarity"}}}, {"unique", bson.D{{"$sum", 1}}}, }}, }, bson.D{ {"$addFields", bson.D{ - {"count_all", bson.D{{"$sum", bson.A{"$count", "$count_foil", "$count_etched"}}}}, + {"count_all", bson.D{{"$sum", bson.A{"$count", "$count_foil"}}}}, }}, }, }) @@ -71,7 +70,6 @@ var statsCmd = &cobra.Command{ fmt.Printf("Unique: %s%d%s\n", Purple, stats[0]["unique"], Reset) fmt.Printf("Normal: %s%.0f%s\n", Purple, stats[0]["count"], Reset) fmt.Printf("Foil: %s%d%s\n", Purple, stats[0]["count_foil"], Reset) - fmt.Printf("Etched: %s%d%s\n", Purple, stats[0]["count_etched"], Reset) reserved, _ := coll.storageAggregate(mongo.Pipeline{ bson.D{ diff --git a/src/serra/update.go b/src/serra/update.go index 2981ca0..d4d64de 100644 --- a/src/serra/update.go +++ b/src/serra/update.go @@ -36,7 +36,6 @@ var updateCmd = &cobra.Command{ bson.D{ {"serra_count", true}, {"serra_count_foil", true}, - {"serra_count_etched", true}, {"set", true}, {"last_price", bson.D{{"$arrayElemAt", bson.A{"$serra_prices", -1}}}}}}} groupStage := bson.D{ @@ -45,7 +44,6 @@ var updateCmd = &cobra.Command{ {"eur", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.eur", "$serra_count"}}}}}}, {"eurfoil", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.eur_foil", "$serra_count_foil"}}}}}}, {"usd", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.usd", "$serra_count"}}}}}}, - {"usdetched", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.usd_etched", "$serra_count_etched"}}}}}}, {"usdfoil", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.usd_foil", "$serra_count_foil"}}}}}}, }}}