PlaneShift

Support => Linux Specific Issues => Topic started by: Velh Krome on April 15, 2008, 06:42:26 am

Title: Logcleaner
Post by: Velh Krome on April 15, 2008, 06:42:26 am
Greetings...
A little script that helps cleaning logfiles, according to an example as follows:
Code: [Select]
(23:44:11) Thief steps up close to Crafter and looks over her shoulder "Oh, I guess I saw something interesting here... hm..", while he tries to dive his hand into Crafters bag discretely
(23:44:19) Crafter counts the coins and drops them inside her purse
(23:44:33) Crafter tells you: [roll?]
(23:45:09) You tell Crafter: [you say o/]
(23:45:11) Crafter tells group: Player Thief has joined the group!
(23:45:15) >Player Crafter has rolled a 10-sided die for a 10.
(23:45:21) Thief says: [-.-]
(23:45:2Cool >Player Thief has rolled a 10-sided die for a 6.
(23:45:43) Crafter eyes down to Thief catching his move "Shortie?"
(23:46:11) Crafter stretches her back and grabs the hilts of her swords
(23:46:12) Someone reaches for his hammer, eyeing Thief
Code: [Select]
Thief steps up close to Crafter and looks over her shoulder "Oh, I guess I saw something interesting here... hm..", while he tries to dive his hand into Crafters bag discretely
Crafter counts the coins and drops them inside her purse
Crafter eyes down to Thief, catching his move "Shortie?"
Crafter stretches her back and grabs the hilts of her swords
Someone reaches for his hammer, eyeing Thief
Thanks to the sidux-user CaesarTjalbo who authored, and Noriin who hosts. The code is under gpl.v3 and can be found here (http://www.cyanureill.net/mindseye/files/ps_logcleaner.tar.gz). "ps_logcleaner -h" shows up helping information, moving it to /usr/(local/)bin may provide comfortability.
Title: Re: Logcleaner
Post by: Velh Krome on April 15, 2008, 04:49:49 pm
Quote from: Noriin
Nice script however, shame we can't make it run in windows
Argh.. since initially I had issues to create this post ("Forbidden.."), I finally had luck with this quite cut one.

Unfortunately a question got cut too:
Its a pie-thon-script: Anyone knows if there are ways to use it on Windows- or Mac-Systems?

edit:
Neko, when I try to spell "pie-thon" with a "y", it will show me that "Forbidden"-page  ::|
Title: Re: Logcleaner
Post by: TymTheEnchanter on April 16, 2008, 01:13:01 am
Its a pie-thon-script: Anyone knows if there are ways to use it on Windows- or Mac-Systems?

As it's Pie-thon you should be able to install Pie-thon from pie-thon.org (installers for Win & OSX if correct spelling) and just run it. The joy of interpreted languages :)

I too received the Forbidden page if I used the normal spelling
Title: Re: Logcleaner
Post by: Velh Krome on April 16, 2008, 01:36:00 am
Ah, pleasant news, thanks Tym o/
Do you know how would it work? Perhaps like having it like an "installed console" you could type in the same command for the script?

PS:
Oh, and for "pie-thon" problem, Neko said it would probably be an issue of smf-forums in general. I just intented to let him know about the harmful consequences this particular word can have lol
Title: Re: Logcleaner
Post by: TymTheEnchanter on April 16, 2008, 01:53:58 am
Usually you can just run

Code: [Select]
> pie-thon file.py
to run any pie-thon prog, the .py is optional so the script should work as is.

I assume you will need to run from a console as I don't think the installs come with a special console app, but from the general instructions in the script just open a console in the directory where the log file is located and run

Code: [Select]
> pie-thon ps_logcleaner -f name_of_your_log_file
this will create a name_of_your_log_file.processed file for you reading comfort and pleasure.