Chaosforge Forum

  • August 16, 2022, 02:02
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Smart Mortem Namer Script (For Linux)  (Read 4180 times)

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Smart Mortem Namer Script (For Linux)
« 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), 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 (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

Constructive criticism and ruthless bashing (pun intended) are welcome. ;)
« Last Edit: April 26, 2011, 00:51 by Simon-v »
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Smart Mortem Namer Script (For Linux)
« Reply #1 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.
Logged

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Smart Mortem Namer Script (For Linux)
« Reply #2 on: February 11, 2011, 17:00 »

It's cool except that Angel of Shotgunnery is AoSh, not AoSg.
Logged
I computed, therefore I was.

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Smart Mortem Namer Script (For Linux)
« Reply #3 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.
« Last Edit: February 12, 2011, 10:52 by thelaptop »
Logged
I computed, therefore I was.

rchandra

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 359
    • View Profile
Re: Smart Mortem Namer Script (For Linux)
« Reply #4 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).
Logged
0.9.9.1-4: Arch-Vile Br. General [25/25/17/5/1]
0.9.9.5-7: Hell Baron Major [ 21 16 12 4 1 0 ]

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Smart Mortem Namer Script (For Linux)
« Reply #5 on: April 26, 2011, 00:52 »

Updated for 0.9.9.3 and disambiguated the challenge names (necessary for another script to work correctly).
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Smart Mortem Namer Script (For Linux)
« Reply #6 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).
Logged
Pages: [1]