Merchant Archive

Thread: Merchant Email to XML Program Now Available

PepeGSay
Thu Nov 27, 2003 11:44 am
#1

All,


I wrote a windows program in .Net for processing vendor emails. Heres the gist:


1. Use the /mailsave function and you will get the emails in a local folder.


2. You set up a project that is an XML file (the program does it for you) that contains the Email folder for your char and the output file for the XML.


3. You hit 'Process Emails' and you get an XML file with the sales data.


4. You can then open that file in Excel or your program of choice.


The program is availabel in a zip file at http://www.thedotcommakesitfunny.com/swg/it is called the SWG Merchant Email Processor.


A couple of things to keep in mind:


1. This program is an ALPHA release. It works, it might have bugs, but it does work. It's definitely pre-beta.


2. The program fulllyrecreates the output XML from the email foldereach time it is run. So if you move the emails or delete them, you will get a new file without the ones you deleted. You could get around this by dating or otherwise revisioning your output files and then combining them. I left this open, cause it was troublesome to code and because I figured everyone would want to deal with their emailsdifferently so this is more flexible.


3. The program looks for emails from SWG.*ServerName*.Auctioner ... it skips the emails about items delisting. However, I am unsure what other emails the auctioner might send and have been unable to test them all. One example might be if the vendor sends an email when its maintenance gets low, not sure what the program will do in that situation (probably blow up).


4. The program is written in .Net so you will need to have the .Net framework. You can get it from Windows Update or from Microsofts site.


Enjoy! Andplease send any comments, bug reports, feature requests, etc. to [email protected]


Thanks,




Tiquor Canche - Intrepid
Stim City: Naboo, Moenia 5326 -4084 Meds & A Ton of Other Merchants
Proud Member of SIN (Strength In Numbers)

+20 Medical, Combat Medical & Chef Experimentation
"When your HAM is looking shi&&y, you'll be glad you shopped at Stim City"
Merchant Email Processor available at http://www.thedotcommakesitfunny.com/swg/ Now on Alpha 11.

PepeGSay
Thu Nov 27, 2003 6:22 pm
#2

/bump




Tiquor Canche - Intrepid
Stim City: Naboo, Moenia 5326 -4084 Meds & A Ton of Other Merchants
Proud Member of SIN (Strength In Numbers)

+20 Medical, Combat Medical & Chef Experimentation
"When your HAM is looking shi&&y, you'll be glad you shopped at Stim City"
Merchant Email Processor available at http://www.thedotcommakesitfunny.com/swg/ Now on Alpha 11.

Moepple
Thu Nov 27, 2003 6:44 pm
#3

Hi,


if it would not mean to invite mr gates to my pc, i might try it.


Read ya.

PepeGSay
Thu Nov 27, 2003 7:01 pm
#4

hehe, so you are running Linux to play SWG I assume?



Tiquor Canche - Intrepid
Stim City: Naboo, Moenia 5326 -4084 Meds & A Ton of Other Merchants
Proud Member of SIN (Strength In Numbers)

+20 Medical, Combat Medical & Chef Experimentation
"When your HAM is looking shi&&y, you'll be glad you shopped at Stim City"
Merchant Email Processor available at http://www.thedotcommakesitfunny.com/swg/ Now on Alpha 11.

PepeGSay
Thu Nov 27, 2003 7:20 pm
#5

If it makes you feel any better I am going to release the code once I have my initial vision implemented.



Tiquor Canche - Intrepid
Stim City: Naboo, Moenia 5326 -4084 Meds & A Ton of Other Merchants
Proud Member of SIN (Strength In Numbers)

+20 Medical, Combat Medical & Chef Experimentation
"When your HAM is looking shi&&y, you'll be glad you shopped at Stim City"
Merchant Email Processor available at http://www.thedotcommakesitfunny.com/swg/ Now on Alpha 11.

PepeGSay
Fri Nov 28, 2003 7:21 am
#6

Alpha 3 Is now Available.



Tiquor Canche - Intrepid
Stim City: Naboo, Moenia 5326 -4084 Meds & A Ton of Other Merchants
Proud Member of SIN (Strength In Numbers)

+20 Medical, Combat Medical & Chef Experimentation
"When your HAM is looking shi&&y, you'll be glad you shopped at Stim City"
Merchant Email Processor available at http://www.thedotcommakesitfunny.com/swg/ Now on Alpha 11.

StarWorker
Fri Nov 28, 2003 8:52 am
#7

I love the concept of this program. I was using alpha 2 yesterday, and it crashed and crashed, due to startindex being less than zero or something like that.

I tried deleting emails, but it crashed and crashed. Then I stood back with only 8 emails. One of these was an email from a bazaar sale. It still crashed. When I deleted this bazaar email, the application created the xml file flawlessy.

I will check if this is still the case in the new version when I come home.



Chilastra: K'yp Darron
Core Resources power vendor: Tusk'ens Bane (-4530, -5915)

TC-Prime: Leno, Bamih and Locin We-Eda
Ewach
Fri Nov 28, 2003 12:35 pm
#8

How do you translate the timestamp to date and time?




SWG Lexicon: "Every Player" Means "Except Crafters"



Ewach - Founder of Travelers Respite on Sunrunner
Located halfway between Anchorhead and Mos Eisley (2180, -4684)
Visit my Shop at (2030, -4660)
PepeGSay
Fri Nov 28, 2003 2:53 pm
#9

Alpha 4 is available, it should be a pretty significant bug fix. I changed the method that was used to determine Vendor Emails.



Tiquor Canche - Intrepid
Stim City: Naboo, Moenia 5326 -4084 Meds & A Ton of Other Merchants
Proud Member of SIN (Strength In Numbers)

+20 Medical, Combat Medical & Chef Experimentation
"When your HAM is looking shi&&y, you'll be glad you shopped at Stim City"
Merchant Email Processor available at http://www.thedotcommakesitfunny.com/swg/ Now on Alpha 11.

Moepple
Fri Nov 28, 2003 9:14 pm
#10

Hi Pepe,


well, I dont want to install .net, thats all .-)


Read ya.

StarWorker
Fri Nov 28, 2003 10:20 pm
#11

217 vendor emails processed, no errors occurring in alpha 4 for me. Good job.





Chilastra: K'yp Darron
Core Resources power vendor: Tusk'ens Bane (-4530, -5915)

TC-Prime: Leno, Bamih and Locin We-Eda
Ewach
Sat Nov 29, 2003 1:00 am
#12

I saved a message and reverse engineered the TIMESTAMP to known date/time in message using Excel.


The timestamp is number of seconds elapsed since a reference date & time.


Looks to me like the reference date/time is: 1 Jan 1970 06:00:00


To convert timestamp to date & time:


days = @int(timestamp/86400) {divide by total number of secs in day to find number of days}


remainder = timestamp - (days * 86400) {find number of seconds remaining on current day}


hour = @int(remainder / 3600) {find number of hours}


remainder = remainder - (hour * 3600)


minutes = @int(remainder/60) {find number of minutes}


remainder = remainder- (minutes * 60)


seconds = remainder


In Excel, add days to reference date (1/1/1970) to get the current date.




SWG Lexicon: "Every Player" Means "Except Crafters"



Ewach - Founder of Travelers Respite on Sunrunner
Located halfway between Anchorhead and Mos Eisley (2180, -4684)
Visit my Shop at (2030, -4660)
Raduk
Sat Nov 29, 2003 1:29 am
#13

This is great...can't wait to see the code.
Page 1 of 3
Previous Next