It is currently 17 Nov 2018, 13:02
   
Text Size

Pricing (Scripts and Notes)

Moderators: charmer, CCGHQ Admins

Re: Pricing (Scripts and Notes)

Postby Stromglad1 » 16 Jul 2012, 23:30

I've been trying to modify the "MTG Mint Card.lua" that comes with Magic Album to get price data for as many of my cards as possible. I've attached the modified file, if anyone is interested -- It'll allow MA to grab prices for Duels of the Planeswalkers, Vanguard and a bunch of promotional cards.
Attachments
stromglad1-MTG Mint Card.zip
(4.57 KiB) Downloaded 197 times
--------------
My Collection
User avatar
Stromglad1
 
Posts: 10
Joined: 07 Jul 2010, 04:54
Has thanked: 13 times
Been thanked: 0 time

Re: Pricing (Scripts and Notes)

Postby Mr.C » 09 Aug 2012, 07:35

Sorry, i don't quite understand how the new method works. How would I go about getting SCG prices in MagicAlbum step by step? Thanks.
Mr.C
 
Posts: 49
Joined: 13 Jun 2008, 07:58
Has thanked: 0 time
Been thanked: 0 time

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 10 Aug 2012, 11:07

Mr.C wrote:Sorry, i don't quite understand how the new method works. How would I go about getting SCG prices in MagicAlbum step by step? Thanks.
There are 2 methods.
1.) Write your own LUA script that collects the prices and uses the ma.SetPrices function to set the card values inside the database.

2.) Create your own script (in whatever format you are familiar with) that create a text file that is formated as described in the first post. Then use the .lua file that is attached to the first post to import the prices into the database.

Pretty much all pricing scripts are community created / supported. I attempted to write alot of sites price collection scripts at one time but when some of the formats in the MA application changed along with the product sites constantly changing it became to much for me to keep up to date. So I created a generic import style script for everyone to use. From the feedback I recieved, not very many users knew LUA, but they did know something else, so creating an import style script seemed like the best course of action.

Using method 1 allows for the quickest execution of price collection and importation. The downside to it is many users are unfamiliar with the LUA language and the MA application is consumed by price collection for a fairly long amount of time not allowing you to use the application while prices are being collected. Though with the more recent additions to the MA application price collections screen allowing for set selection the amount of time a price script takes could be drastically reduced.

Using method 2 is slower execution wise (since the price collection portion of the scripting is done outside the MA application), how ever it allows for use of the MA application during price collection. You then also have the option of scheduling the price collecting scripts through something like windows task manager so that prices can be collected at any time day or night (like when your sleeping) and allow for importing into the MA database very quickly when your ready.

I can see pro's and con's to both methods. Personally I would prefer the more simplistic single LUA script (option 1) method but I just cant stand the fact that I can't run the price collection scripts in the background allowing me to use the application while prices are collected. The scheduling of price collections outside the MA application is simply an added bonus of how the 2nd method works.

I will say the price collection functionality for the application has come along way since the beginning of the application, good job GH =D>

@GoblinHero -
I haven't payed attention much lately to the bugtracker / work you've been doing to the app. Did you ever plan on either incorperating something natively into the application to do price importation (like the LUA script on the first post) or add the background capability for price collection?
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 153 times

Re: Pricing (Scripts and Notes)

Postby Goblin Hero » 10 Aug 2012, 15:44

woogerboy21 wrote:Did you ever plan on either incorperating something natively into the application to do price importation (like the LUA script on the first post) or add the background capability for price collection?
Everything is possible. But as usual - no promises, no release times.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1913
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 136 times
Been thanked: 310 times

Re: Pricing (Scripts and Notes)

Postby Bloodnut » 11 Aug 2012, 09:26

woogerboy, I may want to write some script and use your ImportPrices but the problem for me is to know what card names my script needs to query. suggestions?
Bloodnut
 
Posts: 49
Joined: 19 Mar 2010, 13:34
Has thanked: 6 times
Been thanked: 1 time

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 12 Aug 2012, 02:59

Bloodnut wrote:woogerboy, I may want to write some script and use your ImportPrices but the problem for me is to know what card names my script needs to query. suggestions?
If you open the script on the first post (or simply read the details of the post) you will see example formated lines that the import script expects. The import script simply expects a tab delimited text file that contains the prices on a per card bases per line.

So for example, if you wanted to set the price of the English card, non-foil, card "Ajani, Caller of the Pride" from the "Magic 2013" set with a value of $12.00. You would have a text file, and in it a single line that looks like this:

Code: Select all
Ajani, Caller of the Pride   12.00   Magic 2013   English   *   Nonfoil   Cardnote
**Note the {tab} between each portion of line data**

Now how you go about getting the data from a website depends on the scripting / coding language you use. The basic premise is that you have to download the web data from a pricing site, parse that data and extract the card name and card price. From there you can construct the remaining information and put it into a text file. If you wanted, which would take FOREVER, is simply goto a website with prices and manually record the data. Placing it in a text file with the format expected by the import script.

I'm slightly confused on what you mean by "what card names my script needs to query". In order to set a price value of a card in the MA application, the card name must match the name that is listed in the MA application for the given set you are trying to set the price for.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 153 times

Re: Pricing (Scripts and Notes)

Postby Bloodnut » 12 Aug 2012, 16:10

woogerboy21 wrote:
Bloodnut wrote:woogerboy, I may want to write some script and use your ImportPrices but the problem for me is to know what card names my script needs to query. suggestions?
If you open the script on the first post (or simply read the details of the post) you will see example formated lines that the import script expects. The import script simply expects a tab delimited text file that contains the prices on a per card bases per line.

So for example, if you wanted to set the price of the English card, non-foil, card "Ajani, Caller of the Pride" from the "Magic 2013" set with a value of $12.00. You would have a text file, and in it a single line that looks like this:

Code: Select all
Ajani, Caller of the Pride   12.00   Magic 2013   English   *   Nonfoil   Cardnote
**Note the {tab} between each portion of line data**

Now how you go about getting the data from a website depends on the scripting / coding language you use. The basic premise is that you have to download the web data from a pricing site, parse that data and extract the card name and card price. From there you can construct the remaining information and put it into a text file. If you wanted, which would take FOREVER, is simply goto a website with prices and manually record the data. Placing it in a text file with the format expected by the import script.

I'm slightly confused on what you mean by "what card names my script needs to query". In order to set a price value of a card in the MA application, the card name must match the name that is listed in the MA application for the given set you are trying to set the price for.
You misunderstood me. I know how to use your code and I know how grab prices from the site I want to query because it has an API. however I need to know WHAT to query it for, meaning I need to give my script a list of card names for him to get the prices for. so I basically need that list.
Bloodnut
 
Posts: 49
Joined: 19 Mar 2010, 13:34
Has thanked: 6 times
Been thanked: 1 time

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 12 Aug 2012, 19:05

You misunderstood me. I know how to use your code and I know how grab prices from the site I want to query because it has an API. however I need to know WHAT to query it for, meaning I need to give my script a list of card names for him to get the prices for. so I basically need that list.
I'm not understanding what you are trying to ask for.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 153 times

Re: Pricing (Scripts and Notes)

Postby Bloodnut » 12 Aug 2012, 20:44

woogerboy21 wrote:
You misunderstood me. I know how to use your code and I know how grab prices from the site I want to query because it has an API. however I need to know WHAT to query it for, meaning I need to give my script a list of card names for him to get the prices for. so I basically need that list.
I'm not understanding what you are trying to ask for.
I can tell my script to fetch the price for Abuna Acolyte for example but since I want to fetch the prices to all the cards in Magic I need a list of cardnames to send to my script.
Bloodnut
 
Posts: 49
Joined: 19 Mar 2010, 13:34
Has thanked: 6 times
Been thanked: 1 time

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 12 Aug 2012, 20:52

Bloodnut wrote:
woogerboy21 wrote:
You misunderstood me. I know how to use your code and I know how grab prices from the site I want to query because it has an API. however I need to know WHAT to query it for, meaning I need to give my script a list of card names for him to get the prices for. so I basically need that list.
I'm not understanding what you are trying to ask for.
I can tell my script to fetch the price for Abuna Acolyte for example but since I want to fetch the prices to all the cards in Magic I need a list of cardnames to send to my script.
In your example, were are you getting the price for the card "Abuna Acolyte" from?
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 153 times

Re: Pricing (Scripts and Notes)

Postby Bloodnut » 13 Aug 2012, 14:36

Specifically from balcklotusproject.com

Edit: Just noticed that they publish a complete price list so nm.
Bloodnut
 
Posts: 49
Joined: 19 Mar 2010, 13:34
Has thanked: 6 times
Been thanked: 1 time

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 13 Aug 2012, 23:52

Bloodnut wrote:Specifically from balcklotusproject.com

Edit: Just noticed that they publish a complete price list so nm.
Ah yes, now I see why you were looking for a list of card names. Generally price sites have cards listed by sets and you can pull the card names and prices without having to present names. I have generally found sites like the one your working on are difficult to pull card set information from and many commonly use some other site for pricing data. For example, a site that compares prices such as blackouts project commonly pulls prices from sites like starcitygames or abugames. I sometimes question the staleness of there site and prefer to pull data directly from the sites used and have MA do the price min:max:average estimation.

Good luck in your efforts.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 153 times

Re: Pricing (Scripts and Notes)

Postby LordHelmchen » 22 Aug 2012, 23:38

Greetings.
I wondered if someone could reccomend a site that offers
- all prices (not limited to those in stock at the time of the querry)
- prices for both ENG and GER cards
- prices in €
and that is comfortably querryable ?
Or does someone already have a fetch script (preferably lua, but something else that generates a csv for woogerboy21's import script is fine) for a matching site that I could use ?
LordHelmchen
 
Posts: 125
Joined: 21 Aug 2012, 16:06
Has thanked: 20 times
Been thanked: 32 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 23 Aug 2012, 14:01

I haven't dealt with any foreign based pricing sites, sorry. I can tell you though there are a number of english/us based sites that do have the prices for cards not in stock so there probably would be euro based sites that do the same.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 153 times

Re: Pricing (Scripts and Notes)

Postby chreschi » 29 Aug 2012, 07:53

I may be slow to learn, butwhy are the prices for M13 not displayed when updating the MTG Mint Card ("built-in") script? Is there something I have to adjust?
Because, you know, I'm not the programming type... And I guess that at least some of the other users aren't, either. So in general, some (updated) scripts to download would be a nice gift for us...
Maybe there is even the possibility to outsource the pricing data onto a server, where it could be fetched with an update function from within MA? Instead of having all users working on a personal script?
chreschi
 
Posts: 13
Joined: 20 Jul 2010, 19:23
Location: Switzerland
Has thanked: 3 times
Been thanked: 3 times

PreviousNext

Return to Magic Album

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form