It is currently 16 Apr 2024, 07:07
   
Text Size

Pricing (Scripts and Notes)

Moderators: charmer, CCGHQ Admins

Re: Pictures for Magic Album

Postby kristijanH » 10 Sep 2011, 14:17

woogerboy21: Could you add prices from this site to MA? http://findmagiccards.com/
kristijanH
 
Posts: 218
Joined: 24 Nov 2009, 13:49
Has thanked: 52 times
Been thanked: 11 times

Re: Pictures for Magic Album

Postby woogerboy21 » 12 Sep 2011, 00:31

kristijanH wrote:woogerboy21: Could you add prices from this site to MA? http://findmagiccards.com/
I'll do some research. Looks like that site uses http://bidwicket.com/ for prices on the backend. No promises though until I dig further and see how easy it is to interpret the html code.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pictures for Magic Album

Postby woogerboy21 » 20 Sep 2011, 20:35

kristijanH wrote:woogerboy21: Could you add prices from this site to MA? http://findmagiccards.com/
As I have previously stated I believe I will be giving up support on the LUA price collection scripts (still up in the air but every day I lean away from the.) I will be producing a visual basic based price collection script that can be scheduled or ran in the background and then have a .LUA counterpart that will bring the prices into the magic album application. Attached is a version of the VB/LUA scripts that collect the card prices from the "findmagiccards.com" site.

Usage:
Update findmagiccards.vbs script 'strRootFolder' variable to point to the folder your MagicAlbum is installed to. (Default is C:\Magic Album). Execute the .vbs file to collect the prices from the site. It will create a .txt file in the root folder of your Magic Album installation directory named findmagiccards.txt (speeds vary based on your internet speed). Next place the .LUA file in the "Prices" Magic Album subfolder. Open the application and update the FindMagicCards-LOCAL.lua file as if you were updating the prices inside the price manager on any other pricing script.

I haven't fully tested this script. Its downloading prices and should import but will need to follow up and identify if its missing any cards during the collection process. It has the set information for sets Magic 2010 and beyond (Core Sets and Expansions). I wanted to throw this out for you to try and get familiar with.
Attachments
FindMagicCards-Local.zip
(6.22 KiB) Downloaded 335 times
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby kristijanH » 21 Sep 2011, 06:00

Doesn't work for me and my AV (avast) warns me that it's a virus.
kristijanH
 
Posts: 218
Joined: 24 Nov 2009, 13:49
Has thanked: 52 times
Been thanked: 11 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 21 Sep 2011, 11:41

kristijanH wrote:Doesn't work for me and my AV (avast) warns me that it's a virus.
Lol. Its 2 .txt files.. you may want to check your AV. Make sure it isn't marking all script files as virus's. I'll run it locally and check to see the prices get imported properly.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 21 Sep 2011, 22:00

Just a quick update. I tested the VBS and LUA script out and it works for me. 3 things I noticed that will need work. 1.) In the output file created by the VBS it has the wrong site name written in the comment lines (no big deal). 2.) Basic land prices aren't accounted for. 3. There are a number of WWK cards missing prices that will need investigated as to why.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 28 Sep 2011, 18:33

Here is an updated "FindMagicCards" set of scripts. This is using the VBS/LUA format. The script collects prices from the http://www.findmagiccards.com site (backend is http://www.bidwicket.com) for sets from the Magic 2010 and newer with the exception of the "Duels of the Planeswalkers" set since they don't have a price listing for anything in that set.

Script usage -
The .VBS script downloads and creates a text file that contains all the price information from the site. The .txt file created needs to end up in the root folder of the magic album application installation location. By default the script writes the .txt file out to the "C:\Magic Album" folder path. This can be changed by either editing the script and changing the "strRootFolder" variable to a different path OR calling the script from command line and passing the argument rootfolder= followed by the path to use.
Once prices have been successfully downloaded you need to open the magic album application and enter price manager and choose the "update" button after selecting the "FindMagicCards-LOCAL.lua script to import the prices into the application.

Example: FindMagicCards.vbs "rootfolder=c:\mypath"

Other features include the ability to collect prices by set name or by block name. Once again you can either manually update the script variable's internally (strSetNameToCollect or strBlockNameToCollect) or pass the arguments "setname=" or "blockname=". Keep in mind to collect a single set you must pass the block name of "none". Block names take presidence over set names. So if you say you want to collect the set "Innistrad" and pass the block name "Scars of Mirrodin" you will collect both the Innistrad set and the 3 sets in the "Scars of Mirrodin" block. NOT just the single Innistrad set.

Example usages:
FindMagicCards.vbs "rootfolder=c:\MagicAlbum" "setname=Innistrad" "blockname=none"
-downloads card pricing for only the Innistrad Set into the C:\MagicAlbum folder path.

FindMagicCards.vbs "rootfolder=c:\MagicAlbum" "setname=none" "blockname=Core Sets"
-downloads card pricing for all supported core sets into the C:\MagicAlbum folder path.

FindMagicCards.vbs "rootfolder=c:\MagicAlbum" "setname=Innistrad" "blockname=Zendikar"
-downloads card prices for the innistrad set along with all supported sets in the zendikar block into the C:\MagicAlbum folder path.

One thing I noticed is sometimes the site does not have prices for all cards so before thinking something's broken due to a price not being populated please check the site and verify there is a price listed next to the card name indicating a "Buy Now" price.
Also this script does include support for the innistrad set that was just recently added to the database.

edit:
Minor bug found when you passed the "rootfolder=" argument to the script. This has been resolved. Most people probably didn't notice the issue.
Attachments
FindMagicCards.zip
(8.49 KiB) Downloaded 354 times
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby kristijanH » 28 Nov 2011, 15:56

Will there be an updater version for Innistrad cards? Or I just missed something? I'm mostly interested in MTGO traders.
kristijanH
 
Posts: 218
Joined: 24 Nov 2009, 13:49
Has thanked: 52 times
Been thanked: 11 times

Re: Pricing (Scripts and Notes)

Postby ThePatriot1776 » 02 Dec 2011, 16:08

Heyas folks,

I just wanted to say that MA is an awesome tool to organize your MTG collection and it beats out other software. I noticed that the pricing scripts were no longer being updated, so I delved into the MTGFanatic script to add in Duel Decks: Ajani vs. Nicol and Innistrad. Unfortunately, I'm not a scripting person, so I'm unable to get the prices to work for the double sided Innistrad and the two spells on a card from the Ajani vs. Nicol duel deck. Otherwise the prices work for MTGFanatic's pricing script.

I hope everyone enjoys the script.
Attachments
MTGFanatic.rar
(7.28 KiB) Downloaded 315 times
ThePatriot1776
 
Posts: 1
Joined: 04 Nov 2011, 16:10
Has thanked: 0 time
Been thanked: 0 time

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 30 Dec 2011, 16:12

Sorry for no updates on the pricing scripts in a while. Many things IRL have taken my focus away from this stuff. Hopefully I will get a chance to update some of the scripts. If there is anyone else that would be willing to help that would be awesome. I haven't taken a look at the update history of the app but if the app still gets locked while updating prices I still think I am leaning towards the script that imports prices into MA from a flat file method. That way you can use any price collecting type script to schedule and write prices out to file and import them quickly into the application.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 13 Feb 2012, 06:15

Dropped support for the per site .lua scripts. Though they will still be available if people choose to use them. If others would like to post scripts developed I would be willing to add any links / files to the original post. I have posted an updated import script (as described in the original post).

I plan on creating updated price collection scripts for various sites but don't expect any of them any time soon. Plus they will probably be in vb-script form and use the import script to bring the collected prices into the MA application.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby Goblin Hero » 13 Feb 2012, 11:33

I've started work on price import / lua api improvements. Some of you wishes from bug tracker will be definitely implemented. Things what will be changed for sure:
1. Lua will be upgraded to 5.2. It will require some changes for existing scripts.
2. io and os libraries will be disabled, because it is not secure. os.execute("format c: /q") :) I will add my own file read api function if it is really needed.
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: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 13 Feb 2012, 13:26

Goblin Hero wrote:I've started work on price import / lua api improvements. Some of you wishes from bug tracker will be definitely implemented. Things what will be changed for sure:
1. Lua will be upgraded to 5.2. It will require some changes for existing scripts.
2. io and os libraries will be disabled, because it is not secure. os.execute("format c: /q") :) I will add my own file read api function if it is really needed.
I definitely believe a read function is needed. A simple example would be the price importer script posted in the first post. With out the ability to read from a file something like that script just wouldn't work. I can also see a use for putting and pulling data from file.

It's your application though so if you see it as not as valuable it's your call.

Lately I have been working on script idea's that actually interpret the websites content and builds there available set's list based on it so there is no need to continuously update set list's but I am not certain this approach will b feasible for every site. On the down side, it adds a lot of required time to the price collecting.

I do agree there is no reason for anyone to have the ability to execute local OS commands through the scripts. (format c: /q) would be bad :D .

There were 3 main reason's I dropped the script support on the old .lua files.
1. Time....
2. Manageability - I don't like how difficult it is getting to support some sites as there content's change drastically on a regular basis and using the coding mentality of the older scripts, the scripts would break easily. I'm working on a different approach to hopefully fix this.
3. Lack of community support - Only a couple user's created pricing scripts (at least that posted them), I would like to see more from everyone and thought if I could create something that would allow people to write there own scripts with languages they are familiar with maybe we would get more.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 13 Feb 2012, 13:39

Oh, another reason why I like the external script for collecting prices approach is I can schedule the scripts to execute and collect data by the task scheduler of windows (or any other OS such as cron). This way prices can be collected and available whenever.

I never submitted a feature request for scheduling price collection as I saw this as something WAY outside MA's application focus.
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

Re: Pricing (Scripts and Notes)

Postby woogerboy21 » 20 Feb 2012, 01:20

Updated the "Import Prices.lua" script. Its a minor update that allows for when the debugging mode is turned on it shouldn't error out on nil values. It will help out if you are trying to troubleshoot the input file, other than that if your not you shouldn't need to update.

I have also posted an updated set of FindMagicCards bat/vbs/lua pricing scripts (attached to this post as well). This script "shouldn't" require updating every set with the new set information and will detect the available sets from the site itself. This is the approach I plan on taking towards newer pricing scripts. You can pass it all options from the command line to customize it without having to edit the script every time, or you can edit the script and run it silently.

Image
Attachments
FindMagicCards v12.zip
(16.13 KiB) Downloaded 340 times
User avatar
woogerboy21
HQ Team Member
 
Posts: 1136
Joined: 19 Jul 2009, 00:15
Location: USA
Has thanked: 21 times
Been thanked: 152 times

PreviousNext

Return to Magic Album

Who is online

Users browsing this forum: No registered users and 15 guests

cron

Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 15 guests

Login Form