Page 1 of 1
Orphalese Report Tool
Posted: Mon 13 Jun, 2005 1:45 am
by Cowhead
All of the decks, spreads, card-data files, and other downloadables available on OTZ are a wonderful thing, but I'm becoming a bit overwhelmed. Wouldn't it nice to have a single file where I could sort and search lists of my decks and spreads and so on? Most, if not all, of the data I'm looking for is stored in the various XML files created by Orphalese, but there are a *lot* of those files on my machine now, and the count keeps growing and growing.
So, I'm thinking about creating some way of programmatically walking through the Orphalese Tarot folders on my drive, reading the XML files, and storing the data in some sort of file that could easily be sorted and searched. For flexibility, the best output might be a simple delimited text file, because it could easily be read into a spreadsheet or Access database file.
I just don't want to make this more complicated than it needs to be, so I have a few questions for any programmers out there that read this. Do you know of any simple tools for reading XML that are available to the VB / VBA / VB Script programmer? I've tried Access's data import tools, but it gags on some of the XML files I have tried to import. I'm guessing that any chunk of text longer than 255 characters will break it, because Access apparently tries to stuff everything into plain text fields.
Maybe I should use this as my excuse for picking up VB .Net -- I have read that the .Net development tools make working with XML dead simple.
Any ideas and suggestions will be most appreciated. If I come up with anything that is useful to me, I'll be glad to share it with the rest of you.
Thanks.
Re: Orphalese Report Tool
Posted: Mon 13 Jun, 2005 2:17 am
by Cowhead
>> Most, if not all, of the data I'm looking for is stored in the various XML files <<
Actually, this isn't quite true. For example, here are *some* of the facts I would like to collect about the contents of my Packs folder:
1) Folder path (with Orphalese Tarot/Packs considered the root).
2) All data from the Options/Other tab.
3) Total card count. (Excluding card-backs, xml files, and other extras...)
4) Back design chosen, if not a Back.* card from the deck's folder.
5) Source of files (Would probably be manually entered).
6) Data in CardData.xml?
7) Unexpected files? That is, not NN.* or Back.* or CardData.xml or packinfo.xml... This could include box illustrations, text files, etc. They aren't there as a rule, but there are still many packs where they exist.
8) See also... Manually entered, listing other packs that make interesting comparisons. Maybe one pack is an earlier version of another, for example. So, for Tarot of Durer I might enter See also: Tarocchi Durer.
Okay, I admit it. I'm a geek. But I would really like to be able to search this kind of information...
-- Cowhead
Re: Orphalese Report Tool
Posted: Mon 13 Jun, 2005 2:33 am
by Cowhead
Other possible fields:
1) Type (e.g. 78 card Tarot pack, Majors only, Playing Card/Cartomantic, Runes, etc.) Yes, folders help for this kind of thing, but sorting and searching by folder-path could be a pain.
2) Wish List? (Which packs do I want to purchase?)
3) My Rating: Could be a star-rating, or one-to-ten scale, or something like that. Mainly, it would be a quick way to zero in on my favorite packs, or easily exclude the ones that I just don't care for.
4) Other freeform notes.
Okay, that's enough!

Re: Re: Orphalese Report Tool
Posted: Mon 13 Jun, 2005 8:43 am
by Programmer
Hi Cowhead,
Well, you can guess already that I would recommend you to get into .NET. It certainly does make working with XML data very simple indeed. To give an example, the code for saving a spread from the Spreads page on the OTZ and installing it in the user's My Spreads list is as simple as this (my code is in C# but the VB.Net syntax would be something like it anyway):
Private Sub DownloadSpread ( )
Dim sPathOnServer As String
Dim sPathOnLocalMachine As String
Dim dsData As New DataSet
sPathOnServer = blah
sPathOnLocalMachine = whatever
dsDataSet.ReadXML(sPathOnServer)
dsDataSet.WriteXML(sPathOnLocalMachine)
End Sub
If only everything in life were that simple!
I would be equally easy to output the result of the report in XML (you could have various output options including CSV etc).
As you know I am trying to cut down on new programming for the time being at least and limit myself to fixing bugs and so on. It occurs to me that if you could program this it would be a good introduction to .NET programming. Then we could offer it here as a free download - the first official Orphalese Tarot Add On. What do you think?
Re the other fields you want added (rating, category etc) we would obviously need to put our heads together on that. I could add them either to the PackInfo file or the DeckCollectionData file depending on which were more appropriate.
The only complication I can foresee is when the user does not speak English. Fields like category would have to be purely numeric, or be placeholders like CartomancyLabel. The program would then read this and go off and get the correct translation. The tarot program could have public methods for returning the appropriate resource to the reporting tool.
Let me know what you think. There would be no rush and there are plenty of friendly testers here which of course is a great help!
BTW There are VB6 classes you can find on the internet for manipulating XML, I think some of my colleagues at work have used them in legacy apps. They are a bit flakey though compared to .NET.
Richard
Re: Re: Re: Orphalese Report Tool
Posted: Mon 13 Jun, 2005 2:22 pm
by Cowhead
Thanks for all of the information, Richard. I think the .NET path is the one I'll take. If the end result looks worthwhile, I'll be happy to offer it here to whoever wants it.
>> Re the other fields you want added (rating, category etc) we would obviously need to put our heads together on that. I could add them either to the PackInfo file or the DeckCollectionData file depending on which were more appropriate. > There would be no rush ... <<
Good thing! I'm already swamped at work! It's a bit of craziness to even contemplate this right now, but it still sounds fun.
Cheers!
-- Cowhead