Chaosforge Forum

DoomRL => Discussion => Topic started by: Simon-v on March 18, 2010, 17:03

Title: Smart Mortem Namer Script (For Linux)
Post by: Simon-v on March 18, 2010, 17:03
Linux users rejoice!
Due to not having the patience to convince Kornel and Co. that mortem file names should be more descriptive (see: http://forum.chaosforge.org/index.php/topic,2898.html (http://forum.chaosforge.org/index.php/topic,2898.html)), i used my expertise (an overstatement) to craft a shell script to do just that: make the mortem file names more descriptive.

All interested parties may download and (ab)use it as they please.

Newbie note: make the file executable, then run it in the terminal. Oh, and read the notes.

Summary:
Code: [Select]
# This script renames raw DoomRL mortem files according to the following
# (by far more useful) naming scheme:
# Year-Month-Day Hour-Minute-Second Difficulty-GameType-Result PlayerName.txt
# Example: '2009-12-04 19-44-07 N-AoMr-St Simon.txt'
# The script will first match the files by name, then inspect their contents
# to verify and fill the missing information.
# The script is slow and unoptimized, but otherwise works.
# To use, either run this script from your mortem directory, or run it
# with the path to your mortem directory as the first argument

The script has been updated for DoomRL 0.9.9.3, which includes a different date format by default.

Additional notes:
In an attempt to avoid ambiguity as much as possible, which is necessary for my other script, doomrl-stats (http://dl.dropbox.com/u/23785083/DoomRL-Sandbox/doomrl-stats.sh) (a script that counts your games/wins for different play modes), i have taken the liberty to mark Angel of Haste as AoHa and Angel of Purity as AoPu. You may either accept it or change it to whatever you believe is appropriate.

Download:
http://dl.dropbox.com/u/23785083/DoomRL-Sandbox/fix-doomrl-mortem.sh (http://dl.dropbox.com/u/23785083/DoomRL-Sandbox/fix-doomrl-mortem.sh)

Constructive criticism and ruthless bashing (pun intended) are welcome. ;)
Title: Re: Smart Mortem Namer Script (For Linux)
Post by: Simon-v on February 11, 2011, 11:58
With DoomRL 0.9.9.2 out, i reviewed the script and changed a few things to make it forwards-compatible, the most important feature being the newfound ability to get mortems from playing the sandbox, which required adjustments to the naming scheme.

If you'd like something like this for Windows, you can either bug Malek Deneith for a batch file or bug Kornel himself for implementing the feature in the DoomRL core. Good luck with either of that.
Title: Re: Smart Mortem Namer Script (For Linux)
Post by: thelaptop on February 11, 2011, 17:00
It's cool except that Angel of Shotgunnery is AoSh, not AoSg.
Title: Re: Smart Mortem Namer Script (For Linux)
Post by: thelaptop on February 12, 2011, 10:29
It's cool except that Angel of Shotgunnery is AoSh, not AoSg.
I quote from the official binary that it is AoSh, so no argument there.

=P

Ed: Just realised that Angel of Purity is rendered as AoPu instead if AoP.
Title: Re: Smart Mortem Namer Script (For Linux)
Post by: rchandra on February 12, 2011, 11:03
Ed: Just realised that Angel of Purity is rendered as AoPu instead if AoP.

that one is my fault, I thought it was more clear to use AoPu (because of AoPc).
Title: Re: Smart Mortem Namer Script (For Linux)
Post by: Simon-v on April 26, 2011, 00:52
Updated for 0.9.9.3 and disambiguated the challenge names (necessary for another script to work correctly).
Title: Re: Smart Mortem Namer Script (For Linux)
Post by: Simon-v on May 19, 2011, 08:51
Added optional recording of kill percentage in the file name, toggled by setting a variable in the script header. Mortem files processed by a previous version of the script will NOT be converted to the new format (this may or may not be changed in the future).