AnimeSuki.com Forum

AnimeSuki Forum (http://forums.animesuki.com/index.php)
-   Forum & Site Feedback (http://forums.animesuki.com/forumdisplay.php?f=2)
-   -   PM box is full (backup PMs) (http://forums.animesuki.com/showthread.php?t=40553)

Jinto 2006-12-21 18:38

PM box is full (backup PMs)
 
Maybe you had already this problem. Your PM box is almost full and you need to delete certain messages to gain space. The Pm box has a nice feature though, one can save all the PMs in several formats as a backup to the local disk.

This feature however is not too comfortable (e.g. reading an XML file may be not so funny). Thatswhy I've written a little tool that will write a main .html file based on the informations in the xml file, that links to many PM.html files in a subfolder.

That way you can view your backuped PMs almost as comfortable as in the forums.

There are limitations however (I did only implement basic BB-Code and the basic smilies that includes also [QUOTE] and [SPOILER]). But there won't be any signatures, and the user profile is extremly simpel (yet linked to the forums, so retrieving information about a user is not a problem).

It is coded as a command line tool for Windows (yet uses much ANSI C and only one WIN32 API, though if you feel like it, you can convert it to Linux for example (source code is provided, and is not licensed in any way). A warning though... since I am somewhat lazy (did not want to waste more then 2 days on that tool), I used fixed assuptioms regarding buffer sizes - it works for all my PMs yet you may find a weird example that can cause buffer overruns which will crash the tool. You can report that to me, maybe I will do something to prevent this then :D )

I used a header/stylesheet file (.dat) from the standard Animesuki skin, feel free to change that if you like.

here is a picture so you can get an idea of how the result looks like:

http://www.digital-soul-drift.de/screen_msgbox.jpg

leftside Inbox, rightside Sentbox

Disclaimer: I am not responsible for any damage that tool might do to your PC (I cannot imagine that tool can harm your PC anyhow, but disclaimers are for those unbelievable situations, that should have never occurd :heh: ).

the tool demands an two parameters as input, the source and the target file. The traget file will always reside in the working folder of the tool. And that is quite practical, since the image folder for certain smilies and stuff is in the same directory. It will create a subfolder of the same name as the target file (just without ".html"). There will be the single PM .html files stored, they are ordered by timestamp (since PM is not meant for chatting, that should be exact enough).

pmxmltohtml.exe [source.xml] [target.html]

You can download it here

I have written this tool to fit my needs, though I hope maybe it will be usefull for some other users here too.

felix 2006-12-21 21:48

Well you can save them as text files also.. as far as I can tell..
And just going in some thread and pasting then previewing it gives a pretty decent result IMO..

Anyway aren't there other simpler posibilities to solve that problem.. :uhoh:

Well I personally don't save my pms.. I just delete them when they get really really near to 100.. don't see what's the point of saving them would be anyway.. :rolleyes:

Post Scriptum: Just in case you haven't notice yet.. TABLE tag..
Thank you NightWish.. structuring tutorials will be loz easier now :D

Jinto 2006-12-21 22:14

Quote:

Originally Posted by BlackCatXIII (Post 776128)
Well I personally don't save my pms.. I just delete them when they get really really near to 100.. don't see what's the point of saving them would be anyway.. :rolleyes:

I have my reasons though :D
( I knew not many would find this tool usefull, but I share it anyway )

Quote:

Originally Posted by BlackCatXIII (Post 776128)
Post Scriptum: Just in case you haven't notice yet.. TABLE tag..
Thank you NightWish.. structuring tutorials will be loz easier now :D

Right, I didn't notice until now. Nice :) Thank you Nightwish.

monir 2006-12-23 01:49

Very nice Jinto Lin. I'm one of those people who are reluctant to delete anything. One of my email account tells me I've used 96% percent of the space of the given 100 mb space. So yeah, I appreciate your tool and will use it as soon as I figure out what you are saying in the opening post. cookies..

NoSanninWa 2006-12-23 02:03

Thank you Jinto. I go through my PM box allotment (and it is a huge allotment) faster than I'd like to consider. Being a mod has immense PM requirements. It is nice to know I will now be able to find a relevant record of that past amongst all the backups.

Lost 2006-12-23 02:42

Wow, I too would find this tool very useful, Thank you very much! :D

One thing about your post tho, if you could write a more concise step-by-step explanation on how to actually use the tool after downloading, that would be really helpful (especially for people unfamiliar with these things, like me). I'm afraid I don't know how to get it to work.. :(

Jinto 2006-12-23 10:44

Quote:

Originally Posted by Lost (Post 777442)
Wow, I too would find this tool very useful, Thank you very much! :D

One thing about your post tho, if you could write a more concise step-by-step explanation on how to actually use the tool after downloading, that would be really helpful (especially for people unfamiliar with these things, like me). I'm afraid I don't know how to get it to work.. :(

You are right, I really should have put more thought into this.

1) A good way to backup the messages is to save them in a main directory (lets say e.g. a folder called "Animesuki private messages" on your desktop). Therefore one has to create this folder.

2) Now the "pmxmltohtml.exe", "images", "asukiheader.dat" files/folders need to be extracted to the Animesuki private messages folder.

3) Everything is setup for the xml source file now. In the private messages area of the forums, exists a section called "Download all Private Messages as:" (near the bottom of the messages page). There one chooses the XML option and saves the resulting file in the "Animesuki private messages" directory.

4) One can run cmd now, this opens the command console of Windows. One need to change to the subdirectory "Animesuki private messages" and then run the tool with the xml file name as source input parameter and an html file name as output parameter. Please have in mind that I do not check for special characters, which might cause the program to abort, since it cannot use some special characters in file names. And try to keep the output name short (and don't include blanks " " please - sorry I've been really very lazy in that part of the program).

http://www.digital-soul-drift.de/screen_cmd_pm.jpg
this little exmaple shows how the tool is used in cmd.

5) If there wasn't any critical error, the tool has created a subfolder and the output html file now.

http://www.digital-soul-drift.de/screen_pm_folder.jpg

6) If you want to use a different stylesheet, take a look into the asukiheader.dat please. If you do not change the style names, you can safely alter any attributes to your needs there. (only important if you wish to use other styles)

Important! I removed a serious bug regarding the interpretation of the XML "<![CDATA[]]>" tag. I strongly recommend to use my new version, since the bug can cause the loss of falsly translated very simple pm's in the html structure. (use the same download link please)
I hope you still have your XML files though, I'ld recommend to not delete them.

Lost 2006-12-23 11:01

Ah I see how to use it now. Right right. Thanks again (and thanks for explaining). :) This is a great tool.


p.s. Just to report something that might be of use to you:

When viewing the output file in Firefox, Firefox can't open any of the links (i.e. the individual PMs) in a new window (it says that "the protocol (c) isn't associated with any program"). It can however open the links as a new tab. I think it could be because I've set FF to be my default net browser.

Jinto 2006-12-23 11:34

Quote:

Originally Posted by Lost (Post 777705)
Ah I see how to use it now. Right right. Thanks again (and thanks for explaining). :) This is a great tool.


p.s. Just to report something that might be of use to you:

When viewing the output file in Firefox, Firefox can't open any of the links (i.e. the individual PMs) in a new window (it says that "the protocol (c) isn't associated with any program"). It can however open the links as a new tab. I think it could be because I've set FF to be my default net browser.


Okay I will take care of this. I assume FF cannot interprete the "file:///" thing. I have to use relative pathes instead. Sorry I should have thought of that too.

edit: Okay I fixed all absolute pathes to relative ones (at least I hope I did not forget something).

Quote:

Originally Posted by monir (Post 777416)
Very nice Jinto Lin. I'm one of those people who are reluctant to delete anything. One of my email account tells me I've used 96% percent of the space of the given 100 mb space. So yeah, I appreciate your tool and will use it as soon as I figure out what you are saying in the opening post. cookies..

I hope I did not mislead you, please don't try to use this tool on your e-mail account though, it is only meant for the post messages XML backup feature of the vBulletin board.

I hope my poor english doesn't trouble you too much ^^'

Cz 2006-12-23 15:39

Quote:

Originally Posted by Jinto Lin (Post 777688)
http://www.digital-soul-drift.de/screen_cmd_pm.jpg
this little exmaple shows how the tool is used in cmd.

Tsk... using Administrator account? Shame on you. :p You should be running as a non-administrator. :D

Anyway, cool app. I used to save my CSVs and TXTs and XMLs whenever my PM box got full. I saved all formats because I don't know which ones I would eventually want to use. :heh:

Jinto 2006-12-23 16:55

Quote:

Originally Posted by lwl12 (Post 777872)
Tsk... using Administrator account? Shame on you. :p You should be running as a non-administrator. :D

Yes I am guilty :D Nah, I am just too lazy to change accounts whenever I try to install something or I need to use JIT (just in time) debuging. In linux I'ld just open a new shell and do such things being "SU", while being logged in as a "underprivileged" normal user at the same time. Since Windows doesn't offer such things, I stick with the Admin account (though I tightend security meassures where it is neccessary).

Quote:

Originally Posted by lwl12 (Post 777872)
Anyway, cool app. I used to save my CSVs and TXTs and XMLs whenever my PM box got full. I saved all formats because I don't know which ones I would eventually want to use. :heh:

Afaik the XML contains more information than the txt version and I believe is better structured then CSV... thatswhy was my choice for XML in that case. Now you can add HTML to the list :)

Cz 2006-12-23 17:04

Quote:

Originally Posted by Jinto Lin (Post 777930)
Yes I am guilty :D Nah, I am just too lazy to change accounts whenever I try to install something or I need to use JIT (just in time) debuging. In linux I'ld just open a new shell and do such things being "SU", while being logged in as a "underprivileged" normal user at the same time. Since Windows doesn't offer such things, I stick with the Admin account (though I tightend security meassures where it is neccessary).

There's always "Run as..." and sudown (sudo for Windows). :)

monir 2006-12-25 00:58

Quote:

Originally Posted by Jinto Lin (Post 777725)
I hope I did not mislead you, please don't try to use this tool on your e-mail account though, it is only meant for the post messages XML backup feature of the vBulletin board.

I hope my poor english doesn't trouble you too much ^^'

You might have been onto something a few years back, but presently, I can play my anime without using CCCP which I think is pretty neat. :D Your tool just laid an egg with an html extension and I swear it wasn't there a second ago. Oh joy, for I now can delete a lot of those PM to ease the warning that says: Your PM box is 90% full. Thank you!

tyciol 2012-07-23 12:31

Quote:

Originally Posted by Cz (Post 777872)
Tsk... using Administrator account? Shame on you. :p You should be running as a non-administrator. :D

Do a lot of people do this? I need to run as an Admin to install programs so it seems like less of a hassle to use it all the time. I guess it's less safe though since it's easier to install malware by accident?

Dist 2012-07-25 10:36

Installing malware by accident .. exactly how? Unless you're stupid and look at web like '' Oh look, free emoticons, lets install this program that somehow lets me use them on Facebook '', you're not gonna install any malware by '' accident ''.

I have no idea what Cz meant by that but the emoticons would point that he may not even have been serious, also that post (as well as the whole thread) is from 2006.

A good firewall and AV is enough to block accidental or otherwise forced malware/spyware installations so messing with Admin/User accounts is hardly necessary. But if you used Win7 it wouldn't exactly be a hassle as if you try to install something as an user, you'd just get a popup to say to insert Admin password so the installation can continue. No need to log out and back in or anything.


All times are GMT -5. The time now is 10:37.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.