View unanswered posts | View active topics It is currently Thu Mar 28, 2024 11:37 pm



Reply to topic  [ 134 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next
 ability to publish game logs to a blogger account. 
Author Message
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
i think i got it now on how to do it with your script. i am going to test it soon but i might need help emailing the Html file as an email to blogger.(from the command line) but i will keep checking to see if it can be done.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 9:12 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
will this do the trick i am looking for? http://www.blat.net/194/

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 9:16 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
Check it out!! I DID IT :) now all i need to do is get one day at a time and then i will be truly happy. http://slother30.blogspot.com/2011/08/game-test.html
THank you Mongoose for the script. it worked well.

EDIT: like always once the link served it's perpose it was deleted. as this link no longer works.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Last edited by slother3x on Mon Sep 05, 2011 6:50 pm, edited 1 time in total.



Fri Aug 26, 2011 10:31 pm
Profile YIM
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Re: ability to publish game logs to a blogger account.
slother3x wrote:
Check it out!! I DID IT :) now all i need to do is get one day at a time and then i will be truly happy. http://slother30.blogspot.com/2011/08/game-test.html
THank you Mongoose for the script. it worked well.


Very nice! Good Job! :D

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Fri Aug 26, 2011 10:41 pm
Profile ICQ WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
now i wait and see if my automation works with the 2 .bat files i made for the Blat program and Mongoose's script to be run by TWGS in order to capture the aspects of the game in a way i can use. and now make it look good for my blogger account. (Finger's Crossed)

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Fri Aug 26, 2011 11:03 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
well i was able to automate the log posting to my blog by making 2 simple .bat files.

as you can see http://slother30.blogspot.com/2011/08/game-logs-for-yesterday-game-b.html
http://slother30.blogspot.com/2011/08/game-logs-for-yesterday-gamea.html
http://slother30.blogspot.com/2011/08/game-logs-for-yesterday-game-c.html
, the 3 games posted but the whole log was uploaded. when all i wanted was the day before.

Mongoose how do i use your script to only post the previous day's logfiles.

here is a copy of the .bat files i made...
Createmail.bat
Code:
type %1\TWOPENG.DAT | java -jar TWOPENG.Jar > %1\log.html

Email.bat
Code:
blat %1\log.html -to ************@blogger.com -subject %2


and this is the settings i used in TWGS for Game A

to create the logfiles

Task
Code:
C:\Program Files\EIS\TWGS\Game\createmail.bat


command
Code:
"C:\Program Files\EIS\TWGS\Game\GAMEA"


and to post the logfiles

Task
Code:
C:\Program Files\EIS\TWGS\Game\email.bat


command
Code:
"C:\Program Files\EIS\TWGS\Game\GAMEA"  "Game logs for Yesterday GAMEA"

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Sat Aug 27, 2011 1:32 am
Profile YIM
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: ability to publish game logs to a blogger account.
slother3x wrote:
Mongoose how do i use your script to only post the previous day's logfiles.


If you specify one date on the command line it will only output entries from 00:00:00 to 23:59:59 on that day. If you specify two dates, it will output entries from 00:00:00 on the first date to 23:59:59 on the second date. The date format is mm/dd/yy, and it uses game years, not real years.

So the command would look something like:

Code:
cat TWOPENG.DAT | java -jar TWOPENG.jar 08/27/23 > output.html


I'm seeing a lot of blank entries in the logs you posted. Also, the dividers that say "Daily Journal S.D. 08/20/23" have the date stamp above them, and they shouldn't. If you send me the original log files that produced that HTML, I'll fix those bugs.

_________________
Suddenly you're Busted!


Sat Aug 27, 2011 3:27 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
Mongoose wrote:
I'm seeing a lot of blank entries in the logs you posted. Also, the dividers that say "Daily Journal S.D. 08/20/23" have the date stamp above them, and they shouldn't. If you send me the original log files that produced that HTML, I'll fix those bugs.



here you go. in zip format.


Attachments:
File comment: the source files to my logs on blogger
Logfiles.zip [1.84 KiB]
Downloaded 382 times

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"
Sat Aug 27, 2011 5:43 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
once i get this working in the format that i want i will be starting my blog over again and just posting my game logs to my blog.

the reason i have allot of blank entries is because i have little to no traffic coming to my TWGS.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Sat Aug 27, 2011 5:46 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
ok here is another question. how do you add 12 years to the %date% string without changing the date on the computer? and better yet how do you subtract a day to get yesterdays "Date" from the same date?

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Sat Aug 27, 2011 6:01 pm
Profile YIM
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: ability to publish game logs to a blogger account.
Hey... went camping this weekend.

I noticed that the log uses a completely different system of codes for the colors of ship names, so I'm going to rewrite my program to handle that. I'll also make it so you can just put 'yesterday' on the command line.

Are TW years always 12 years in the future?

_________________
Suddenly you're Busted!


Mon Aug 29, 2011 7:25 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
Mongoose wrote:
Are TW years always 12 years in the future?

not sure. as i know that on my computer it is. it is just that i assume that it is as i did just some quick math and figured that it was on my computer. i do not know how it is calculated for sure. but thank you for doing this for me. as soon as i get it to just post one day at a time i will be restarting both the blog and the games. i just wish i could get more traffic to my game server. makes buying those extra nodes worth it. :)

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Wed Aug 31, 2011 1:19 pm
Profile YIM
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
in case your wondering. i took those posts that i did by email off my blog. but like i said. once i get "one" day at a time i will be posting fresh game logs on my blog using the same method. but i thought i would share that to the new traffic i see that my blog has been getting. from this forum.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Thu Sep 01, 2011 7:26 pm
Profile YIM
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: ability to publish game logs to a blogger account.
Edit: LOL, dude, once again you posted while I was writing. :lol:

All right, I think I got this working! The code is a little more complex now, a little bigger... and a lot more flexible and extensible. Once again, rename the zip extension to jar. Please report any and all differences between the HTML rendering and the actual log in the game. I want to make it as accurate a representation as possible.

Changes in this version:
- Parses and converts the codes used for ship type text attributes.
- Recognizes a couple more message types.
- You can now use the dates "today" or "yesterday" as arguments.
- IMPORTANT: Prints diagnostic messages on standard error if it encounters an unrecognized color code. These will appear in your HTML output unless you redirect standard output separately from standard error. This is done by redirecting with 1> instead of just >. So instead of a command like:

Code:
cat TWOPENG.DAT | java -jar TWOPENG2.jar yesterday > log.html


Use this

Code:
cat TWOPENG.DAT | java -jar TWOPENG2.jar yesterday 1> log.html


I'm pretty sure this works the same on both Windows and UNIX.

QUESTION FOR JP: I noticed that the first byte of each log entry is some kind of message type identifier. I keep encountering more message types that I hadn't seen before. Could you tell me what all of them are? Or better yet, just tell me how the game's log display decides what messages to print the timestamp for. For example, when someone posts a general announcement, it creates two entries in the log: one for the text that says "So-an- so posted a general announcement:" and one with the text of the announcement. Both have timestamps, but the first timestamp is printed while the second is not. And I've seen two different message type bytes signifying the second part of an announcement...


Attachments:
TWOPENG2-source.zip [5.55 KiB]
Downloaded 383 times
File comment: Rename this file to .jar
TWOPENG2.zip [16.91 KiB]
Downloaded 398 times

_________________
Suddenly you're Busted!
Thu Sep 01, 2011 7:27 pm
Profile WWW
Gameop
User avatar

Joined: Wed Jun 15, 2011 1:26 am
Posts: 165
Location: Martensville SK Canada
Unread post Re: ability to publish game logs to a blogger account.
well i downloaded the jar file and updated my .Bat files to use it and if i am still up, i will tell you how they worked at midnight since that is when they will run. again thank you for your help Mongoose.

_________________
http://bbs.slother3x.info
http://www.slother3x.info My own website, hosted by myself.

"it only takes one to ruin it for all"
"The promises of our youth will always haunt us in the wisdom of our old age"


Thu Sep 01, 2011 9:44 pm
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 134 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next

Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.