NetHack Patch Database v0.27

323 patches

post scores with external script

Namepost scores with external script 1
RatingNot rated
AuthorEric Herman
ForNetHack 3.4.3
DescriptionAllows users to post their scores via an external integration script
 Allows the integration of an external script for posting scores.

Set the 'postcommand' in the .nethackrc file and the script specified by this variable will be executed upon game completion. The first argument passed to the script will be the nethack score data.

If the .nethackrc file defines 'postuserdata' then this additional data will be added as the second argument.

I tested this with the following defined by the path in 'postcommand' and my "twitter_name:password" defined as my 'postuserdata'

#!/bin/bash
# trim leading and trailing whitespace & compress remaining whitespace
export TWEET=$(echo ${1});
curl -u ${2} -d status="${TWEET}" http://twitter.com/statuses/update.xml

The following appeared on twitter:
0 eric-Wiz-Gno-Fem-Neu died in The Dungeons of Doom on level 1. Killed by a jackal. - [11]
4 minutes ago from API
Downloadhttp://tiedyedfreaks.org/eric/dload/patches/nethack/nethack-3.4.3-post_command-1.patch (6.1 Kb)
AddedSeptember 27, 2009 23:49
Submit an update to this patch

Add a comment

Name ()required
Rating (0 is worst, 5 is best) 
Commentrequired
You can use up to 1024 characters.
Only supported tag is [url]clickable_link[/url].

You will need to answer the following question correctly: What symbol represents a piece of armor?