It is currently 18 Apr 2024, 11:44
   
Text Size

Mtgdb.Gui: search MTG cards, build decks, manage collection

New decks and cards for Stainless Games' release

Moderator: CCGHQ Admins

renaming artworks

Postby hidalgo » 26 Apr 2017, 22:00

Hi, Aidscoi! I published 1.3.5.23
You can use it to rename artworks to move artist and set information from attributes to file name.
I recommend that you try it on a copy of artworks directory first.

Usage:
Code: Select all
Mtgdb.Util.exe -rename_artworks directory
After the renaming is done check whether finding renamed images work as expected without reading file attributes.
To do this set ReadMetadataFromAttributes="False" in your custom config
Code: Select all
<Directory Path="E:\Distrib\games\mtg\Artwork" Art="True" ReadMetadataFromAttributes="False" />
After we make sure renaming and finding images work as expected I will remove this setting and the possibility to enable reading attributes.
User avatar
hidalgo
 
Posts: 354
Joined: 17 Oct 2016, 21:51
Location: Russia, Moscow
Has thanked: 58 times
Been thanked: 80 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 04:52

Any chance that new version have different method of read file name for card image ? because i just change the artworks folder path to the copy one for avoid the app rename the current artworks but now the images for set AKH that i rename the images myself not showing in the result as version21
ps : I guess this new version not support png file ( only jpg file of card images showing exact the card in AKH )
the renaming look like never start, but i will keep the cmd over 1 hour, lets see any images have name change.
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 06:52

i keep it 2 hours but nothing change, also the cmd look like end the process ( press enter to exit ) right after press enter to continue
Attachments
Untitled.png
status
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

renaming artworks

Postby hidalgo » 27 Apr 2017, 07:44

replace directory with the path to your copy
Code: Select all
Mtgdb.Util.exe -rename_artworks D:\images\artwork
i keep it 2 hours but nothing change, also the cmd look like end the process ( press enter to exit ) right after press enter to continue
Right, I show 'press enter to exit' when everything is done.

I guess this new version not support png file
Sorry I did't know you use .png pictures.

I released 1.3.5.24
  • ReadMetadataFromAttributes is considered True if not set so that you don't have to change your custom config before renaming.
  • got back .png images support

UPDATE v1.3.5.25
Correctly Renaming .png - v1.3.5.24 replaced .png -> .jpg
User avatar
hidalgo
 
Posts: 354
Joined: 17 Oct 2016, 21:51
Location: Russia, Moscow
Has thanked: 58 times
Been thanked: 80 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 09:58

I've tested the rename feature and it work ( the 2nd cmd not understand the folder that have space in it's name like " Magic the gathering " become " Magic " and stop at first folder ) but the app not really good at read cardname have different version. I've tested with Cancel, Dispel and Act of Treason due to they have same status ( have atleast 3 version of artwork by 3 artists and in 3 different sets ) and the result show when zoom to find artwork is not right. Just show the first
ps : the artwork have addtion metainfomation like size and medium not affect the result so i think they ok
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 10:08

png don't have same attribute like tag and author like jpg so i'm not sure if the rename cmd can change them ( also auto conver into jpg is not add metadata too coz it don't appear in png to move to jpg ). I may export png to jpg and add infomation myself for artworks images so don't worry. I'm not sure if the program read card images's name faster than old method with Setcode in folder name so i still keep official png images from Wotc site for newest set ( like AKH )
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 10:18

also, how to name the new split card for AKH recently ? the old version i just use each name but now it seam you change the rule to name the split cards
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby hidalgo » 27 Apr 2017, 11:08

1.3.5.26
Fixed errors in reading set and author from file name.

Code: Select all
I'm not sure if the program read card images's name faster than old method
A whole lot faster, I absolutely guarantee that. Remember, you need to set ReadMetadataFromAttributes="False" in your private config
Code: Select all
<Directory Path="E:\Distrib\games\mtg\Artwork" Art="True" ReadMetadataFromAttributes="False" />
otherwise the program will read attributes as before, so the speed will not change.

also, how to name the new split card for AKH recently ? the old version i just use each name but now it seam you change the rule to name the split cards
I set the rule to comply with images I downloaded with Gatherer. For example DuskDawn.jpg for cards Dusk and Dawn
For reference I put below the mappings for all flip cards.
Code: Select all
{ "Dusk", "DuskDawn" },
{ "Dawn", "DuskDawn" },
{ "Commit", "CommitMemory" },
{ "Memory", "CommitMemory" },
{ "Never", "NeverReturn" },
{ "Return", "NeverReturn" },
{ "Insult", "InsultInjury" },
{ "Injury", "InsultInjury" },
{ "Mouth", "MouthFeed" },
{ "Feed", "MouthFeed" },
{ "Start", "StartFinish" },
{ "Finish", "StartFinish" },
{ "Reduce", "ReduceRubble" },
{ "Rubble", "ReduceRubble" },
{ "Destined", "DestinedLead" },
{ "Lead", "DestinedLead" },
{ "Onward", "OnwardVictory" },
{ "Victory", "OnwardVictory" },
{ "Spring", "SpringMind" },
{ "Mind", "SpringMind" },
{ "Prepare", "PrepareFight" },
{ "Fight", "PrepareFight" },
{ "Failure", "FailureComply" },
{ "Comply", "FailureComply" },
{ "Rags", "RagsRiches" },
{ "Riches", "RagsRiches" },
{ "Cut", "CutRibbons" },
{ "Ribbons", "CutRibbons" },
{ "Heaven", "HeavenEarth" },
{ "Earth", "HeavenEarth" }
User avatar
hidalgo
 
Posts: 354
Joined: 17 Oct 2016, 21:51
Location: Russia, Moscow
Has thanked: 58 times
Been thanked: 80 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 11:14

So if the new version working good with images been renamed, i will upload new images to mega folder or in the next release you will force the app auto rename the images after download ?
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby hidalgo » 27 Apr 2017, 11:15

No, I am going to let the program re-download the images you renamed in your mega directory from 'Update' window.
I will just change the filelist.txt so that after update the program can immediately detect that most Artworks are now missing.
I should really implement renaming files automatically to avoid deleting and re-downloading the same file. Maybe tomorrow I'll do that :)
User avatar
hidalgo
 
Posts: 354
Joined: 17 Oct 2016, 21:51
Location: Russia, Moscow
Has thanked: 58 times
Been thanked: 80 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 11:27

About the artwork for split card, i just keep the name as current ( for 1 part of the card ) ? the naming just affect the card image am i right ? So in the future the app automatic rename files, i don't need to both set attribute and rename them ? Did the artwork that not add setcode ( due to none other sets of same artwork or different new artwork been release yet ) not affect the program from showing the artwork ? app just change the priority from all all infomation to just the name ?
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby hidalgo » 27 Apr 2017, 11:40

About the artwork for split card, i just keep the name as current ( for 1 part of the card ) ?
No, the name should be DuskDawn.jpg for cards Dusk and Dawn
Code: Select all
So in the future the app automatic rename files, i don't need to both set attribute and rename them
Setting attributes is no longer necessary. In the next release i will completely remove the code that reads file attributes.
Did the artwork that not add setcode ( due to none other sets of same artwork or different new artwork been release yet ) not affect the program from showing the artwork ? app just change the priority from all all infomation to just the name ?
The priority did not change. Some images may be not shown due to wrong names like
Code: Select all
Cancel. oil on board, 6x8.[artist David Palumbo][set ALA,DPA,M10,M11,M12,M14,M15,PC2,PCA,pMPR].jpg
User avatar
hidalgo
 
Posts: 354
Joined: 17 Oct 2016, 21:51
Location: Russia, Moscow
Has thanked: 58 times
Been thanked: 80 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 11:52

No, i mean the artwork not the card images with frame, example split card have 2 artworks ( for top and bottom aftermath part ), we rename the card image so 1 image can show for 2 part of split card as the json file still treat them as 2 not 1 so maybe 2 different name of artwork for 2 parts will keep the same ?
The app not reading attribute so i guess the rename and re-upload image is mine ? Just to be sure to remove the current artwork and replace with new renamed artworks. the new release will remove read file attribute so i will use batch rename with the preset that read attribute from image ( it's faster for me than manual type the infomation in the file name ) to rename the files.
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby aidscoi168 » 27 Apr 2017, 12:09

Did the ";" work like "," in the setcode infomation ?
[set ALA,DPA,M10,M11,M12,M14,M15,PC2,PCA,pMPR] with [set ALA;DPA;M10;M11;M12;M14;M15;PC2;PCA;pMPR]
aidscoi168
 
Posts: 211
Joined: 31 Dec 2016, 17:49
Has thanked: 58 times
Been thanked: 28 times

Re: Mtgdb.Gui - Windows app to search MTG cards and build de

Postby hidalgo » 27 Apr 2017, 12:31

aidscoi168 wrote:The app not reading attribute so i guess the rename and re-upload image is mine ?
I suggest you rename the files using Mtgdb.Util.exe inside your synchronized MEGA folder. I expect that Megasync will do the same renaming on megastorage.
ATTENTION - when renaming make sure in your custom config ReadMetadataFromAttributes="True".

No, i mean the artwork not the card images with frame, example...
Ah, I see what you mean. I fixed image lookup to search for card Dawn both DuskDawn.jpg and Dawn.jpg. See version 1.3.5.27

Did the ";" work like "," in the setcode infomation ?
No I didn't do it. Let me fix it in 1.3.5.28, one moment please

UPDATE done, ';' should work in 1.3.5.28
Last edited by hidalgo on 27 Apr 2017, 12:52, edited 1 time in total.
User avatar
hidalgo
 
Posts: 354
Joined: 17 Oct 2016, 21:51
Location: Russia, Moscow
Has thanked: 58 times
Been thanked: 80 times

PreviousNext

Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 18 guests


Who is online

In total there are 18 users online :: 0 registered, 0 hidden and 18 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 18 guests

Login Form