PennyDreadfulMTG / Penny-Dreadful-Tools

A suite of tools for the Penny Dreadful MTGO community
https://pennydreadfulmagic.com
MIT License
40 stars 28 forks source link

Individual Deck Page #316

Closed bakert closed 6 years ago

bakert commented 7 years ago

Possible features:

bakert commented 7 years ago

This is wotc's visual view:

captura de pantalla 2017-06-23 a las 8 40 08 am

It's from mtgg:

captura de pantalla 2017-06-23 a las 8 41 19 am
silasary commented 7 years ago

This is one of the things I'm planning on doing as part of StackIt's featureset.

It might be worth just doing it there, and calling it as an external tool?

bakert commented 7 years ago

Using StackIt, even as-is, would be pretty sweet. But there's something up with the typography and mana symbols in those images. Is it because I have a retina display or do they look jagged/low-res to you too?

captura de pantalla 2017-07-23 a las 12 11 53 pm

It's not the fonts bundled in the app (see screenshot) but something about the manipulation of them in StackIt.

bakert commented 7 years ago

I spent some time on StackIt today and improved the quality, especially if we export larger images and resize them in the browser. Will try and get that working without having to produce larger images.

Before:

captura de pantalla 2017-07-23 a las 6 21 05 pm

After:

captura de pantalla 2017-07-23 a las 6 15 16 pm

In particular the mana symbols look a lot less jagged.

So we can consider using this in some kind of "visual view". Or some expansion of it.

bakert commented 7 years ago

The "buy on Cardhoarder" link on mtggoldfish is actually pretty sweet and useful. You can post-hoc remove things you don't need like forests and alter numbers:

captura de pantalla 2017-07-24 a las 1 25 27 am

I'd want to avoid the suspicion that any money was changing hands, though, or making pdm look like a commercial enterprise so maybe not worth it for those reasons.

bakert commented 7 years ago

I messaged Cardhoarder about this and their affiliate program and expanding sponsorship to PDM!

bakert commented 7 years ago

Hmm ...

captura de pantalla 2017-07-25 a las 10 36 12 pm

Maybe ...

captura de pantalla 2017-07-25 a las 10 37 36 pm

It's kind of the same information as the main list so it should probably either replace it (bad?) or be a link/pop-up/clickthrough.

silasary commented 7 years ago

Hex TCGBrowser uses a badly signposted button.

image

Maybe just do something like this? image

bakert commented 7 years ago

Cardhoarder agreed to sponsor all three tournaments so definitely going ahead with a buy on cardhoarder button.

Referring customers to our deck editor If you provide decklists on your website or application, we highly recommend using our deck editor integration. Most affiliates that send customers to our deck editor benefit from very high conversion rates and large orders.

When linking to our deck editor, there are three key pieces of information you will need to communicate for each item in the decklist:

id MTGO ID quantity Quantity is_sideboard Is it in the sideboard? This information should be bundled into a POST request, and sent to https://www.cardhoarder.com/decks/upload. Here is an example of how that request should be formatted:

<form method="POST" action="https://www.cardhoarder.com/decks/upload?affiliate_id=mtgtop8">
  <input type="hidden" name="data[Deck][cards][0][id]" value="20920" />
  <input type="hidden" name="data[Deck][cards][0][quantity]" value="10" />
  <input type="hidden" name="data[Deck][cards][0][is_sideboard]" value="0" />

  <input type="hidden" name="data[Deck][cards][1][id]" value="58796" />
  <input type="hidden" name="data[Deck][cards][1][quantity]" value="15" />
  <input type="hidden" name="data[Deck][cards][1][is_sideboard]" value="0" />

  <input type="hidden" name="data[Deck][cards][2][id]" value="46737" />
  <input type="hidden" name="data[Deck][cards][2][quantity]" value="2" />
  <input type="hidden" name="data[Deck][cards][2][is_sideboard]" value="1" />

  <button type="submit">Buy on Cardhoarder</button>
</form>

In this example, our deck is only three cards: 10x Relentless Rats, 15x Swamp, and a couple Pack Rats in the sideboard. For each of these items, we need to have the MTGO ID, which can be found in our price file.

Try it out!

Buy on Cardhoarder with auto-optimize Auto-Optimize Feature

Pass the "optimize" flag to automatically process your decklist and replace items with the cheapest, in-stock alternative. You can include it as follows:

Use Card Names (rather than IDs)

We also support a URL-only deck integration that uses card names rather than MTGO IDs. This feature is a little less robust, since it does not support sideboard or specific card versions, but it can be easier to setup. You just need to setup your deck URL as shown below, with the quantity and card name, and separating each item with a double-pipe, ||.

https://www.cardhoarder.com/decks/upload?affiliate_id=mtgtop8&deck=10 Relentless Rats||15 Swamp||2 Pack Rat Try it

silasary commented 7 years ago

Can you link me to the mentioned price file? Hopefully it won't be too hard to integrate CatIDs.

bakert commented 7 years ago

We left price file for "down the road". They've been pretty generous so I want to tread lightly :) I'll circle back about prices soon-ish?

silasary commented 7 years ago

Sounds good :)

bakert commented 7 years ago

"Buy on Cardhoarder" is 60cd7468.

Next challenge: how to declare StackIt as a dependency in requirements.txt.

silasary commented 7 years ago

Oh dear. I'm going to need to package StackIt up as a pip package, aren't I?

silasary commented 7 years ago

poppu-mtg/StackIt#65

bakert commented 6 years ago

PRs to poppu-mtg/StackIt https://github.com/poppu-mtg/StackIt/pull/76 followed by https://github.com/poppu-mtg/StackIt/pull/55 will get us in a place where we can use this for decklist image generation. Although the quality will still not be as good as it could be. I'll try and figure that out.

bakert commented 6 years ago

All other oustanding work here now logged in separate tickets as #2928, #2929 and #2930.