[CustomMessages]
english.NameAndVersion=%1 version %2
english.AdditionalIcons=Additional icons:
english.CreateDesktopIcon=Create a &desktop icon
english.CreateQuickLaunchIcon=Create a &Quick Launch icon
english.ProgramOnTheWeb=%1 on the Web
english.UninstallProgram=Uninstall %1
english.LaunchProgram=Launch %1
english.AssocFileExtension=&Associate %1 with the %2 file extension
english.AssocingFileExtension=Associating %1 with the %2 file extension...
english.dotnetmissing=This setup requires the .NET Framework v4. Please download and install the .NET Framework v4 and run this setup again. Do you want to download the framework now?
english.LaunchProgram=Launch Gatherer Extractor
french.NameAndVersion=%1 version %2
french.AdditionalIcons=Icônes supplémentaires :
french.CreateDesktopIcon=Créer une icône sur le &Bureau
french.CreateQuickLaunchIcon=Créer une icône dans la barre de &Lancement rapide
french.ProgramOnTheWeb=Page d'accueil de %1
french.UninstallProgram=Désinstaller %1
french.LaunchProgram=Exécuter %1
french.AssocFileExtension=&Associer %1 avec l'extension de fichier %2
french.AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
french.dotnetmissing=Cette installation nécessite le. NET Framework v4. S'il vous plaît télécharger et installer le. NET Framework v4 et exécuter ce programme d'installation. Voulez-vous télécharger le framework maintenant?
french.LaunchProgram=Lancement Gatherer Extractor
portuguese_br.NameAndVersion=%1 versão %2
portuguese_br.AdditionalIcons=Ícones adicionais:
portuguese_br.CreateDesktopIcon=Criar um ícone na Área de &Trabalho
portuguese_br.CreateQuickLaunchIcon=Criar um ícone na &Barra de Inicialização Rápida
portuguese_br.ProgramOnTheWeb=%1 na Internet
portuguese_br.UninstallProgram=Desinstalar %1
portuguese_br.LaunchProgram=Executar %1
portuguese_br.AssocFileExtension=Associar %1 com a e&xtensão de arquivo %2
portuguese_br.AssocingFileExtension=Associando %1 com a extensão de arquivo...
portuguese_br.dotnetmissing=Esta instalação requer o .NET Framework v4. Faça o download e instale o .NET Framework v4 e execute esta instalação novamente. Você deseja fazer o download deste pré-requisito agora?
portuguese_br.LaunchProgram=Iniciar o Gatherer Extractor
[Languages]
; These files are stubs
; To achieve better results after recompilation, use the real language files
Name: "english"; MessagesFile: "embedded\english.isl";
Name: "french"; MessagesFile: "embedded\french.isl";
Name: "portuguese_br"; MessagesFile: "embedded\portuguese_br.isl";
Name: "russian"; MessagesFile: "embedded\russian.isl";
[code]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
NetFrameWorkInstalled : Boolean;
Result1 : Boolean;
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled = false then
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled =false then
begin
//Result1 := (ExpandConstant('{cm:dotnetmissing}'), mbConfirmation, MB_YESNO) = idYes;
Result1 := MsgBox(ExpandConstant('{cm:dotnetmissing}'),
mbConfirmation, MB_YESNO) = idYes;
if Result1 =false then
begin
Result:=false;
end
else
begin
Result:=false;
ShellExec('open',
'http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7',
'','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
end;
end;
end;
end;
Includes:
- A simple check of FrameWork v4
- Run as administrator automatically
- Russian Language (may have to download a newer version of Inno Setup)
- Run program after installation
- Fixed file compression
- Running the installer as administrator 's career
- Inclusion of Application version (appversion)
Thanks a lot for your help with Inno Setup. I'll try this, and I correct the current Installer.
PS : I'm not an expert at all with Inno Setup, but to obtain a smooth compilation, the following modifications have been needed:
1/ "{app}\" is not required in the statement of Source in the [Files] block, but is required of course in the statement of DestDir.
2/ For languages, "embedded\" must be replaced by "compiler:\Languages\"
3/ Portuguese_br.isl must be replaced by BrazilianPortuguese.isl
1 - Exactly. "{app}" (the key "source") relates only to that folder where it Archiving (if the folder with name "{app} ").
Remember that when I decompiler your installer folder "{app} " is automatically created lol
2 - This change is only necessary if you do not use a file to build your installation. In this case you are instructing the Inno to get the language file present on itself (compiler).
3 - Exactly, this is also an exchange of names for the name of the original language of Inno Setup.
Inclur recommend the following line, to create shortcuts from the Start menu:
Name: {group}\Uninstall; Filename: {uninstallexe}
This will create an uninstall icon. Getting more intuitive to the end user.
;-)
Bravo! This program is wonderful! I installed it tonight and am extremely impressed by what it can do so far. Here are a few comments and suggestions:
1. Options -> Text -> "Symbol for new line"
I would like it if this accepted escaped character sequences like "\n" that cause an actual newline character to get printed in the XML. I understand if you cannot save them to CSV, but XML preserves whitespace.
2. The connectivity check at the beginning seems unneeded. It takes a while on my internet connection and sometimes I don't even intend to download anything. I just want to load an old file.
3. Please separate the Abort and Reset functions. Sometimes I just want to stop the download but don't want to clear the list.
4. If I download the names from a set, and then later check the box to download additional data, it will add all the names again. That means each card will have two entries, one with the additional data and one without it. When getting additional data, it should probably check to see if the card is already present and then just update the entry.
5. When parsing the first text file for each set, the interface is terribly slow. My CPU is running at 100% and the lag it causes is pretty bad.
But, overall, these are just minor concerns. This is an exellent program and I think it will be a boon for me. I can't even tell you how much I appreciate this tool.
1. This will be added in the next version. The choice of /n is pretty obvious for many further manipulations.
2. It takes about 2 seconds. The gatherer servers have a very slow response time, but I can't do anything about this. I acknowledge that could be annoying, but the connectivity checking is required to get the set list when the main window is displayed.
3. Yeah, that should have been done since a long time. Aborting and Reseting will be separated in the next version.
4. That is a very interesting point of view, and is linked to point 3. You can for example cancel a download you want to resume later. Thus, the cards already downloaded (with additional data) will be ignored and the treatment will only involve the remaining cards.
5. You mean when the program has just finish downloaded the spoiler list and before it starts downloading the additional data ? When the program is reading the downloaded spoiler list, it can burn your CPU to 100% and the treatment of the text file to obtain the filled datagrid usually take 2 seconds. But I don't see any lags on my computer. An info text informs you on what the program is doing.
2. It takes about 2 seconds. The gatherer servers have a very slow response time, but I can't do anything about this. I acknowledge that could be annoying, but the connectivity checking is required to get the set list when the main window is displayed.
That's fine. I didn't know it was actually downloading something. I thought it was just performing a test to see if it could connect, but your explanation makes sense now. (By the way, I use satellite internet, so it is a little slower for me than 2 seconds, I think, but it is definitely something I can live with.)
5. You mean when the program has just finish downloaded the spoiler list and before it starts downloading the additional data ? When the program is reading the downloaded spoiler list, it can burn your CPU to 100% and the treatment of the text file to obtain the filled datagrid usually take 2 seconds. But I don't see any lags on my computer. An info text informs you on what the program is doing.
Yeah, on my computer (Windows XP, 2GB RAM, AMD Athlon 2.16GHz), it takes a couple minutes to read the downloaded spoiler and update the datagrid before it downloads the additional data. Again, I don't mind much, as after that it works fast.
After downloading scans with this program with 120 sets going all at once, the application flutters and fails to work, giving a .NET Framework error. It stops around Portal, taking over an hour to hit said point.
If possible, I'd love to request a feature to support MySQL or SQL period? I am currently writing an XML => MySQL script to convert it over and put it into my database for ease of use. But if this could have been avoided it would have been great.
Also, when it comes to downloading scans, could it be made possible, relating to my first mention, could it be possible to make the program not redownload scans, rather check to see if file_exists, and continue on? To speed up the process, or remember where it last stopped?
In anycase, great program. I thought for a moment there, I was going to have to write my own. (Which would have never finished, or barely started for that matter.)
Can you give me more details on the .NET error ? I've not met such an error yet. I'm planning to add an autosave method, in order to prevent from loosing all the downloaded data, if you have for example an Internet unavailability during downloading etc. provoking a freeze in the program.
For MySQL/SQL consideration, I need to look into that language more in details, because I dont really use them.
About scan redownload, I kept in mind the fact that first versions of promo scans are always crap scans, and you find better scans later after the release. I wanted to overwrite the previous scans I downloaded without wondering if I should keep some of the former scans or not.... But I can of course add an option about checking if file exists and overwrite or not.
With all that material to add, I plane to code a version 3.0. necrogenesis's and your suggestions are very interesting, but require a deep recoding of the software.
Can you give me more details on the .NET error ? I've not met such an error yet. I'm planning to add an autosave method, in order to prevent from loosing all the downloaded data, if you have for example an Internet unavailability during downloading etc. provoking a freeze in the program.
For MySQL/SQL consideration, I need to look into that language more in details, because I dont really use them.
About scan redownload, I kept in mind the fact that first versions of promo scans are always crap scans, and you find better scans later after the release. I wanted to overwrite the previous scans I downloaded without wondering if I should keep some of the former scans or not.... But I can of course add an option about checking if file exists and overwrite or not.
With all that material to add, I plane to code a version 3.0. necrogenesis's and your suggestions are very interesting, but require a deep recoding of the software.
Should I redownload the scans again, I'll re paste the error.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Path.GetFullPath(String path)
at System.Drawing.IntSecurity.UnsafeGetFullPath(String fileName)
at System.Drawing.IntSecurity.DemandWriteFileIO(String fileName)
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
at Gatherer_Extractor.FenetrePrincipale.BWkMAJPict_ProgressChanged(Object sender, ProgressChangedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnProgressChanged(ProgressChangedEventArgs e)
at System.ComponentModel.BackgroundWorker.ProgressReporter(Object arg)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Gatherer Extractor
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/Gatherer%20Extractor/Gatherer%20Extractor.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ADODB
Assembly Version: 7.0.3300.0
Win32 Version: 7.10.6070
CodeBase: file:///C:/WINDOWS/assembly/GAC/ADODB/7.0.3300.0__b03f5f7f11d50a3a/ADODB.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
The error seems to be raised when Gatherer Extractor is trying to save scans with Name path. Some cards seem to have illegal characters in their names. Thanks for your help, I noticed cards from UG/UNH may provoke such an error. I will correct it in the next version
Thanks for the quick response. It's nice to know ahead of time, I look forward to your next release. I have to note, that the error occurs while im shifting through portal. I may be able to avoid it entirely, if it is just special characters.
I'm just surprised no one else had experienced this error yet.
PHP Script for parsing XML files
<?php
// Prepare header for debug reasons
header("Content-type: text/plain");
//Initial Proccessing of the XML file
$c = new XMLReader;
$c->open('MTGv4.xml');
$doc = new DOMDocument;
//Choose Where to start the read.
while($c->read() && $c->name !== 'card');
while ($c->name === 'card')
{
// Collect the data
$node = simplexml_import_dom($doc->importNode($c->expand(), true));
// Gather and output desired data from here.
echo " Name: ". $node->name;
echo " Rarity: ". $node->rarity;
echo "\n";
$c->next('card');
}
?>
I take no credit for writing this, I took an example XMLReader script and modified it to meet my purposes. I am simply posting it here, in the case should somebody want to learn how to read XML files with php, or at least a base example to work with.
I didn't get this error with Portal. I got it with Unhinged, and special characters like " in "Ach Hans, Run" ... the current release has a sub to avoid this problem with files with special characters, but I forgot " in the fobidden character set.
I didn't get this error with Portal. I got it with Unhinged, and special characters like " in "Ach Hans, Run" ... the current release has a sub to avoid this problem with files with special characters, but I forgot " in the fobidden character set.
I switched to id, and it perfectly executed without error. So, that is a plus.
Edit: I'll run the gatherer (Extractor) another time, with all 127 packs in mind this time around, and inform you if something happens.
There is no error with ID on the 127 sets. I did the test like 10 times, as I'm using the generated xml database for a personal MtG program.
Well, I figured I'd do it, just incase. My Installation of Windows XP is pretty crappy. Considering, it has more problems then anything. It is a special install, to add to that.
Other then that, yeah, there is no errors. It never huts to try anyway. But I did notice, when using ORIGINAL, while going through the extractor, the mirror has larger images then the gatherer has.
EDIT: Might as well provide a basic outline table for MySQL should anyone want it. (This is.. without the code from magiccards.info (sp?))
CREATE TABLE IF NOT EXISTS `sets` (
`name` varchar(32) NOT NULL,
`code` varchar(16) NOT NULL,
`date` varchar(8) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Here's the code I used to convert the XML information into MySQL. Modify it as you please. Posting this, incase someone might want to use it.
$z = new XMLReader;
$z->open('MTGv6.xml'); // Your XML File name Sorry! Only have XML
$doc = new DOMDocument;
//while ($z->read() && $z->name !== 'mtg_carddatabase');
while ($z->read() && $z->name !== 'set');
echo "<table border=1><tr><td>Set Name</td><td>Set Code</td><td>Date Released</td><td>MySql Injection Status</td></tr>";
while ($z->name === 'set')
{
// either one should work
//$node = new SimpleXMLElement($z->readOuterXML());
$node = simplexml_import_dom($doc->importNode($z->expand(), true));
echo "<tr><td>".$node->name."</td><td>".$node->code."</td><td>".$node->date."</td>";
$name = mysql_real_escape_string($node->name);
$code = $node->code;
$date = $node->date;
$sql = "INSERT INTO `mtg`.`sets` (`name`, `code`, `date`) VALUES ('$name', '$code', '$date');";
if(mysql_query($sql)) {
echo "<td><font color='green'><b>Success!</b></font></td></tr>";
} else {
echo "<td><font color='red'><b>Failure! (".mysql_error().")</b></font></td></tr>";
}
$z->next('set');
}
echo "</table>";
The above code is PHP, it also is used to visually display/debug and test the results. So should anything bring, the failure result will explain why.
It changes the ampersand to the word "and" and adds spaces before and after. It also changes the semicolon ; to a colon :. That is bizarre behavior.
On the other hand, if I enter
<br><br>
the tags are left intact and I end up with malformed XML, because XML cannot contain tags.
2. Additionally, if I try to use the "" tag for the opening italics mark, then the "<" gets stripped off in the flavor text. It shows up properly in rules text, though (but again, XML cannot legally contain the tag).
Those are the most important issues.
3. Also, I timed some things. When starting, the program took about 45 seconds, 73 seconds, and 2.5 minutes (but I killed it after that).
When processing a text file, the program took about 2 minutes to parse it. However, as soon as the list on screen was filled with cards, it went much faster and only took a second or two to parse the rest of the file. I believe the delay is being caused by the interface, possibly the .NET framework itself.
Speed really isn't an issue for me, but the bad XML is a huge deal.
By the way, if you want any help, I'd be glad to take a look at your code. I'm a programmer, too, but I understand if it is private.
Thanks a lot necrogenesis for looking into details of the program.
I'm not using special characters for newline etc. I haven't tested them yet, but I bet it can make the program crash as I didn't foresee any escape treatments for those cases. As long as you use 1 regular char mark for italic, newline and stuff, the xml export works properly. But I do agree I have to fix all those little problems, which can be bigger than expected for some users.
About the bizarre changing : the ; -> : shift is explained by the native format adopted for database, which is csv. So I have to get rid off all ";" in texts to avoid spurious columns in the csv. "&" are replaced by "and" for inner handling reasons.
I'm very surprised by the process time you report. On my computer :
Intel Quad Core Q6600 @ 2.4 GHz
4Go DDR2 RAM PC5300
SATA II Hard Drives
Windows XP 64bits
It takes about 1~2 seconds to parse spoiler text files. The problem may come from your disks if you have PATA HDD, but the process time still shouldn't be that long.
I'm currently recoding all the program, but I of course accept your help about all XML & MySQL issues. What do you propose to handle illegal tag for xml database ?
First of all, I just want to say what a great job you're doing. Thank you so much for your hard work and quick responses! I am working on a project myself, and your program is simply wonderful for my purposes. I do intend to donate to your project in the near future.
I'm currently recoding all the program, but I of course accept your help about all XML & MySQL issues. What do you propose to handle illegal tag for xml database ?
If you need to store files in CSV format, you can usually use a separator like pipe ( | ) instead of a semicolon. Pipe is rarely found in text, and I can't think of any Magic cards with it. Semi-colons are in the text of several Magic cards, like Active Volcano, so your program changes the text of those cards, too. Using a pipe instead shouldn't be too hard.
If you're using MySQL or another database to store text, then it is even easier. MySQL can store pretty much any thing, including special characters.
What programming language are you using by the way?
I'm not using special characters for newline etc. I haven't tested them yet, but I bet it can make the program crash as I didn't foresee any escape treatments for those cases. As long as you use 1 regular char mark for italic, newline and stuff, the xml export works properly. But I do agree I have to fix all those little problems, which can be bigger than expected for some users.
I was actually pretty happy about how well it did work. When I display the text from your XML file, I am displaying it as HTML. So being able to use "" and "" is very helpful to me. For the most part it works pretty well and doesn't look like it would be too hard to fix.
What I don't understand is how you are handling these characters internally. Are they of type String? How do you insert the italics codes into the flavor text and reminder text?
About the bizarre changing : the ; -> : shift is explained by the native format adopted for database, which is csv. So I have to get rid off all ";" in texts to avoid spurious columns in the csv. "&" are replaced by "and" for inner handling reasons.
I understand the semicolon, and like I said, a pipe might be better. I don't understand the "&" though. What do you use that for?
It takes about 1~2 seconds to parse spoiler text files. The problem may come from your disks if you have PATA HDD, but the process time still shouldn't be that long.
I think the parsing is fine and quick. I think it is the interface that is slow. That might be Microsoft's problem and not yours.
If you need to store files in CSV format, you can usually use a separator like pipe ( | ) instead of a semicolon. Pipe is rarely found in text, and I can't think of any Magic cards with it. Semi-colons are in the text of several Magic cards, like Active Volcano, so your program changes the text of those cards, too. Using a pipe instead shouldn't be too hard.
I didn't know that trick. I thought I must use semicolon to separate columns. I was thinking of changing the ";" in text only before saving the CSV, and replace them by a substitution character. But your solution seems to be far cleaner.
I was actually pretty happy about how well it did work. When I display the text from your XML file, I am displaying it as HTML. So being able to use "" and "" is very helpful to me. For the most part it works pretty well and doesn't look like it would be too hard to fix.
I understand you want to link the xml file to a HTML inteface. It's almost easy to fix that bug. "<" ,"$" and ">" are unvalid xml character, but can be replace in a xml file :
The Replace(,) Function just before saving should do that pretty well ^^.
What I don't understand is how you are handling these characters internally. Are they of type String? How do you insert the italics codes into the flavor text and reminder text?
Not very clean actually. Yes there are of type String. To insert italics code, I replace HTML marks with the one provided by the user.
I solved one problem I think. XML has a CDATA feature that will allow you to use "<", ">", and "&". It looks like this:
<![CDATA[ any text goes here ]]>
Where it says "any text goes here" you can put almost anything, even those characters that would normally be invalid. So, in order to get new lines in the rules text, my "new line" looks like this:
<![CDATA[<br><br>]]>
Similarly, my italics marks look like this:
opening mark:
<![CDATA[<i>
closing mark:
</i>]]>
It is a little complicated, but they both work perfectly for rules text as far as I can tell. I don't need to use the replace feature for anything.
Unfortunately, those codes don't work with flavor text, as it seems you are handling the flavor text differently somehow. But for now, I don't care about flavor text.
EDIT: New bug. I downloaded Tempest and found that "Knight of Dawn" is not in the list. Not sure what's going on there.
EDIT: New bug. I downloaded Tempest and found that "Knight of Dawn" is not in the list. Not sure what's going on there.
Altar of Dementia is also missing. Valor is missing from JDG and TSB, and Aerathi Berserkers from Legends. And the entire Anthologies set is missing.
When adding new set, it won't let me edit the new set's name o_O And then it doesn't actually save when you click Save, but might be related to not having a name. NPH will be in the Gatherer today!
(Edit: Nifty, it automatically updated. Doesn't help with the missing Anthologies and Renaissance data, though, and P is causing grief )
"Sufficiently advanced experience is indistinguishable from clairvoyance." -Carsten
"Ah those eyes, those horrible creepy eyes!" -Chaosof99
DCI Level 3 Judge & TO "I do not consider myself a hero. I know only what the Vec teach:
justice must always be served and corruption must always be opposed."
Go read! I am one of the three authors of Cranial Insertion.
But seriously, if you can't remember "Woapalanne", just call me Eli.
To post a comment, please login or register a new account.
what's new ?
Fixed extraction numbers of textless [ZEN] Basic lands
Fixed extraction numbers of [CHK] Brothers Yamazaki
Fixed extraction mana cost of [PRE] Ajani Vengeant
Fixed extraction bug of Duel Decks editions (extra tokens)
Added Russian translation (thanks dotsa83!)
Added Brazilian Portuguese translation (thanks rpgmem!)
I will add in the next release of EasyInstall (v1.3).
Thanks!
PS:May I suggest some changes in your installer?
All Sources For MWS
;InnoSetupVersion=5.3.9
[Setup]
AppName=Gatherer Extractor
AppVerName=Gatherer Extractor v2.2
AppVersion=2.2
Compression=lzma2/ultra
DefaultDirName={pf}\Gatherer Extractor
DefaultGroupName=Gatherer Extractor
InternalCompressLevel=ultra
OutputBaseFilename=Gatherer Extractor Installer v2.2
PrivilegesRequired=admin
SolidCompression=yes
WizardImageFile=embedded\WizardImage.bmp
WizardSmallImageFile=embedded\WizardSmallImage.bmp
UsePreviousAppDir=yes
[Files]
Source: "{app}\Gatherer Extractor.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{app}\Gatherer Extractor.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "{app}\Gatherer Extractor.vshost.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{app}\Gatherer Extractor.vshost.exe.manifest"; DestDir: "{app}"; Flags: ignoreversion
Source: "{app}\ReadMe.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{app}\pics\ReadMe.txt"; DestDir: "{app}\pics"; Flags: ignoreversion
Source: "{app}\data\Abreviations.cfg"; DestDir: "{app}\data"; Flags: ignoreversion
Source: "{app}\data\language\BR.lang"; DestDir: "{app}\data\language"; Flags: ignoreversion
Source: "{app}\data\language\EN.lang"; DestDir: "{app}\data\language"; Flags: ignoreversion
Source: "{app}\data\language\FR.lang"; DestDir: "{app}\data\language"; Flags: ignoreversion
Source: "{app}\data\language\RU.lang"; DestDir: "{app}\data\language"; Flags: ignoreversion
Source: "{app}\data\pics\status\0.png"; DestDir: "{app}\data\pics\status"; Flags: ignoreversion
Source: "{app}\data\pics\status\1.png"; DestDir: "{app}\data\pics\status"; Flags: ignoreversion
Source: "{app}\data\pics\status\2.png"; DestDir: "{app}\data\pics\status"; Flags: ignoreversion
Source: "{app}\data\pics\status\3.png"; DestDir: "{app}\data\pics\status"; Flags: ignoreversion
Source: "{app}\examples\ARB.csv"; DestDir: "{app}\examples"; Flags: ignoreversion
Source: "{app}\examples\ARB.txt"; DestDir: "{app}\examples"; Flags: ignoreversion
[Registry]
Root: HKCU; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Gatherer Extractor.exe; ValueType: String; ValueData: RUNASADMIN; Flags: uninsdeletekeyifempty;
[Icons]
Name: "{group}\Gatherer Extractor"; Filename: "{app}\Gatherer Extractor.exe";
Name: "{commondesktop}\Gatherer Extractor"; Filename: "{app}\Gatherer Extractor.exe"; Tasks: "desktopicon";
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Gatherer Extractor"; Filename: "{app}\Gatherer Extractor.exe"; Tasks: "quicklaunchicon";
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}";
[Run]
Filename: {app}\Gatherer Extractor.exe; Description: {cm:LaunchProgram}; Flags: nowait postinstall runascurrentuser skipifsilent
[CustomMessages]
english.NameAndVersion=%1 version %2
english.AdditionalIcons=Additional icons:
english.CreateDesktopIcon=Create a &desktop icon
english.CreateQuickLaunchIcon=Create a &Quick Launch icon
english.ProgramOnTheWeb=%1 on the Web
english.UninstallProgram=Uninstall %1
english.LaunchProgram=Launch %1
english.AssocFileExtension=&Associate %1 with the %2 file extension
english.AssocingFileExtension=Associating %1 with the %2 file extension...
english.dotnetmissing=This setup requires the .NET Framework v4. Please download and install the .NET Framework v4 and run this setup again. Do you want to download the framework now?
english.LaunchProgram=Launch Gatherer Extractor
french.NameAndVersion=%1 version %2
french.AdditionalIcons=Icônes supplémentaires :
french.CreateDesktopIcon=Créer une icône sur le &Bureau
french.CreateQuickLaunchIcon=Créer une icône dans la barre de &Lancement rapide
french.ProgramOnTheWeb=Page d'accueil de %1
french.UninstallProgram=Désinstaller %1
french.LaunchProgram=Exécuter %1
french.AssocFileExtension=&Associer %1 avec l'extension de fichier %2
french.AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
french.dotnetmissing=Cette installation nécessite le. NET Framework v4. S'il vous plaît télécharger et installer le. NET Framework v4 et exécuter ce programme d'installation. Voulez-vous télécharger le framework maintenant?
french.LaunchProgram=Lancement Gatherer Extractor
portuguese_br.NameAndVersion=%1 versão %2
portuguese_br.AdditionalIcons=Ícones adicionais:
portuguese_br.CreateDesktopIcon=Criar um ícone na Área de &Trabalho
portuguese_br.CreateQuickLaunchIcon=Criar um ícone na &Barra de Inicialização Rápida
portuguese_br.ProgramOnTheWeb=%1 na Internet
portuguese_br.UninstallProgram=Desinstalar %1
portuguese_br.LaunchProgram=Executar %1
portuguese_br.AssocFileExtension=Associar %1 com a e&xtensão de arquivo %2
portuguese_br.AssocingFileExtension=Associando %1 com a extensão de arquivo...
portuguese_br.dotnetmissing=Esta instalação requer o .NET Framework v4. Faça o download e instale o .NET Framework v4 e execute esta instalação novamente. Você deseja fazer o download deste pré-requisito agora?
portuguese_br.LaunchProgram=Iniciar o Gatherer Extractor
[Languages]
; These files are stubs
; To achieve better results after recompilation, use the real language files
Name: "english"; MessagesFile: "embedded\english.isl";
Name: "french"; MessagesFile: "embedded\french.isl";
Name: "portuguese_br"; MessagesFile: "embedded\portuguese_br.isl";
Name: "russian"; MessagesFile: "embedded\russian.isl";
[code]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
NetFrameWorkInstalled : Boolean;
Result1 : Boolean;
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled = false then
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled =false then
begin
//Result1 := (ExpandConstant('{cm:dotnetmissing}'), mbConfirmation, MB_YESNO) = idYes;
Result1 := MsgBox(ExpandConstant('{cm:dotnetmissing}'),
mbConfirmation, MB_YESNO) = idYes;
if Result1 =false then
begin
Result:=false;
end
else
begin
Result:=false;
ShellExec('open',
'http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7',
'','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
end;
end;
end;
end;
Includes:
- A simple check of FrameWork v4
- Run as administrator automatically
- Russian Language (may have to download a newer version of Inno Setup)
- Run program after installation
- Fixed file compression
- Running the installer as administrator 's career
- Inclusion of Application version (appversion)
That is, make sure that compiles correctly;-)
Thanks and Hugs!
All Sources For MWS
PS : I'm not an expert at all with Inno Setup, but to obtain a smooth compilation, the following modifications have been needed:
1/ "{app}\" is not required in the statement of Source in the [Files] block, but is required of course in the statement of DestDir.
2/ For languages, "embedded\" must be replaced by "compiler:\Languages\"
3/ Portuguese_br.isl must be replaced by BrazilianPortuguese.isl
Remember that when I decompiler your installer folder "{app} " is automatically created lol
2 - This change is only necessary if you do not use a file to build your installation. In this case you are instructing the Inno to get the language file present on itself (compiler).
3 - Exactly, this is also an exchange of names for the name of the original language of Inno Setup.
Inclur recommend the following line, to create shortcuts from the Start menu:
Name: {group}\Uninstall; Filename: {uninstallexe}
This will create an uninstall icon. Getting more intuitive to the end user.
;-)
All Sources For MWS
1. Options -> Text -> "Symbol for new line"
I would like it if this accepted escaped character sequences like "\n" that cause an actual newline character to get printed in the XML. I understand if you cannot save them to CSV, but XML preserves whitespace.
2. The connectivity check at the beginning seems unneeded. It takes a while on my internet connection and sometimes I don't even intend to download anything. I just want to load an old file.
3. Please separate the Abort and Reset functions. Sometimes I just want to stop the download but don't want to clear the list.
4. If I download the names from a set, and then later check the box to download additional data, it will add all the names again. That means each card will have two entries, one with the additional data and one without it. When getting additional data, it should probably check to see if the card is already present and then just update the entry.
5. When parsing the first text file for each set, the interface is terribly slow. My CPU is running at 100% and the lag it causes is pretty bad.
But, overall, these are just minor concerns. This is an exellent program and I think it will be a boon for me. I can't even tell you how much I appreciate this tool.
Thank you!
Finally a quick way to set up a M:tG database.
@ necrogenesis :
1. This will be added in the next version. The choice of /n is pretty obvious for many further manipulations.
2. It takes about 2 seconds. The gatherer servers have a very slow response time, but I can't do anything about this. I acknowledge that could be annoying, but the connectivity checking is required to get the set list when the main window is displayed.
3. Yeah, that should have been done since a long time. Aborting and Reseting will be separated in the next version.
4. That is a very interesting point of view, and is linked to point 3. You can for example cancel a download you want to resume later. Thus, the cards already downloaded (with additional data) will be ignored and the treatment will only involve the remaining cards.
5. You mean when the program has just finish downloaded the spoiler list and before it starts downloading the additional data ? When the program is reading the downloaded spoiler list, it can burn your CPU to 100% and the treatment of the text file to obtain the filled datagrid usually take 2 seconds. But I don't see any lags on my computer. An info text informs you on what the program is doing.
Thanks again for all your suggestions!
That's fine. I didn't know it was actually downloading something. I thought it was just performing a test to see if it could connect, but your explanation makes sense now. (By the way, I use satellite internet, so it is a little slower for me than 2 seconds, I think, but it is definitely something I can live with.)
Yeah, on my computer (Windows XP, 2GB RAM, AMD Athlon 2.16GHz), it takes a couple minutes to read the downloaded spoiler and update the datagrid before it downloads the additional data. Again, I don't mind much, as after that it works fast.
Thanks for responding.
If possible, I'd love to request a feature to support MySQL or SQL period? I am currently writing an XML => MySQL script to convert it over and put it into my database for ease of use. But if this could have been avoided it would have been great.
Also, when it comes to downloading scans, could it be made possible, relating to my first mention, could it be possible to make the program not redownload scans, rather check to see if file_exists, and continue on? To speed up the process, or remember where it last stopped?
In anycase, great program. I thought for a moment there, I was going to have to write my own. (Which would have never finished, or barely started for that matter.)
For MySQL/SQL consideration, I need to look into that language more in details, because I dont really use them.
About scan redownload, I kept in mind the fact that first versions of promo scans are always crap scans, and you find better scans later after the release. I wanted to overwrite the previous scans I downloaded without wondering if I should keep some of the former scans or not.... But I can of course add an option about checking if file exists and overwrite or not.
With all that material to add, I plane to code a version 3.0. necrogenesis's and your suggestions are very interesting, but require a deep recoding of the software.
Should I redownload the scans again, I'll re paste the error.
I'm just surprised no one else had experienced this error yet.
PHP Script for parsing XML files
I take no credit for writing this, I took an example XMLReader script and modified it to meet my purposes. I am simply posting it here, in the case should somebody want to learn how to read XML files with php, or at least a base example to work with.
I switched to id, and it perfectly executed without error. So, that is a plus.
Edit: I'll run the gatherer (Extractor) another time, with all 127 packs in mind this time around, and inform you if something happens.
Well, I figured I'd do it, just incase. My Installation of Windows XP is pretty crappy. Considering, it has more problems then anything. It is a special install, to add to that.
Other then that, yeah, there is no errors. It never huts to try anyway. But I did notice, when using ORIGINAL, while going through the extractor, the mirror has larger images then the gatherer has.
EDIT: Might as well provide a basic outline table for MySQL should anyone want it. (This is.. without the code from magiccards.info (sp?))
Here's the code I used to convert the XML information into MySQL. Modify it as you please. Posting this, incase someone might want to use it.
The above code is PHP, it also is used to visually display/debug and test the results. So should anything bring, the failure result will explain why.
Options -> Text -> Symbol for new line
1. When I enter
the program outputs
It changes the ampersand to the word "and" and adds spaces before and after. It also changes the semicolon ; to a colon :. That is bizarre behavior.
On the other hand, if I enter
the tags are left intact and I end up with malformed XML, because XML cannot contain
tags.
2. Additionally, if I try to use the "" tag for the opening italics mark, then the "<" gets stripped off in the flavor text. It shows up properly in rules text, though (but again, XML cannot legally contain the tag).
Those are the most important issues.
3. Also, I timed some things. When starting, the program took about 45 seconds, 73 seconds, and 2.5 minutes (but I killed it after that).
When processing a text file, the program took about 2 minutes to parse it. However, as soon as the list on screen was filled with cards, it went much faster and only took a second or two to parse the rest of the file. I believe the delay is being caused by the interface, possibly the .NET framework itself.
Speed really isn't an issue for me, but the bad XML is a huge deal.
By the way, if you want any help, I'd be glad to take a look at your code. I'm a programmer, too, but I understand if it is private.
I'm not using special characters for newline etc. I haven't tested them yet, but I bet it can make the program crash as I didn't foresee any escape treatments for those cases. As long as you use 1 regular char mark for italic, newline and stuff, the xml export works properly. But I do agree I have to fix all those little problems, which can be bigger than expected for some users.
About the bizarre changing : the ; -> : shift is explained by the native format adopted for database, which is csv. So I have to get rid off all ";" in texts to avoid spurious columns in the csv. "&" are replaced by "and" for inner handling reasons.
I'm very surprised by the process time you report. On my computer :
Intel Quad Core Q6600 @ 2.4 GHz
4Go DDR2 RAM PC5300
SATA II Hard Drives
Windows XP 64bits
It takes about 1~2 seconds to parse spoiler text files. The problem may come from your disks if you have PATA HDD, but the process time still shouldn't be that long.
I'm currently recoding all the program, but I of course accept your help about all XML & MySQL issues. What do you propose to handle illegal tag for xml database ?
If you need to store files in CSV format, you can usually use a separator like pipe ( | ) instead of a semicolon. Pipe is rarely found in text, and I can't think of any Magic cards with it. Semi-colons are in the text of several Magic cards, like Active Volcano, so your program changes the text of those cards, too. Using a pipe instead shouldn't be too hard.
If you're using MySQL or another database to store text, then it is even easier. MySQL can store pretty much any thing, including special characters.
What programming language are you using by the way?
I was actually pretty happy about how well it did work. When I display the text from your XML file, I am displaying it as HTML. So being able to use "" and "" is very helpful to me. For the most part it works pretty well and doesn't look like it would be too hard to fix.
What I don't understand is how you are handling these characters internally. Are they of type String? How do you insert the italics codes into the flavor text and reminder text?
I understand the semicolon, and like I said, a pipe might be better. I don't understand the "&" though. What do you use that for?
I think the parsing is fine and quick. I think it is the interface that is slow. That might be Microsoft's problem and not yours.
I understand you want to link the xml file to a HTML inteface. It's almost easy to fix that bug. "<" ,"$" and ">" are unvalid xml character, but can be replace in a xml file :
Unvalid -- Valid
& -- &
< -- <
> -- >
" -- "
' -- '
The Replace(,) Function just before saving should do that pretty well ^^.
Not very clean actually. Yes there are of type String. To insert italics code, I replace HTML marks with the one provided by the user.
Where it says "any text goes here" you can put almost anything, even those characters that would normally be invalid. So, in order to get new lines in the rules text, my "new line" looks like this:
Similarly, my italics marks look like this:
It is a little complicated, but they both work perfectly for rules text as far as I can tell. I don't need to use the replace feature for anything.
Unfortunately, those codes don't work with flavor text, as it seems you are handling the flavor text differently somehow. But for now, I don't care about flavor text.
EDIT: New bug. I downloaded Tempest and found that "Knight of Dawn" is not in the list. Not sure what's going on there.
Altar of Dementia is also missing. Valor is missing from JDG and TSB, and Aerathi Berserkers from Legends. And the entire Anthologies set is missing.
When adding new set, it won't let me edit the new set's name o_O And then it doesn't actually save when you click Save, but might be related to not having a name. NPH will be in the Gatherer today!
(Edit: Nifty, it automatically updated. Doesn't help with the missing Anthologies and Renaissance data, though, and P is causing grief
"Sufficiently advanced experience is indistinguishable from clairvoyance." -Carsten
"Ah those eyes, those horrible creepy eyes!" -Chaosof99
DCI Level 3 Judge & TO
"I do not consider myself a hero. I know only what the Vec teach:
justice must always be served and corruption must always be opposed."
Go read! I am one of the three authors of Cranial Insertion.
But seriously, if you can't remember "Woapalanne", just call me Eli.