Git Product home page Git Product logo

nhs's Introduction

NETHACK SCOREBOARD

Note: This original version of the NetHack Scoreboard is no longer maintained as I have stopped working on it. Further development is happening in this fork.


This is the code used to run NetHack Scoreboard web site. The code consists of two main components: feeder and stats generator. The feeder retrieves xlogfiles from public NetHack servers, parses them and stores the parsed log entries in a back-end database. The stats generator then uses this data to generate static HTML pages with various statistics, including personal pages.

The NetHack Scoreboard is written using:

  • perl as the programming language
  • PostgreSQL as backend database
  • Template Toolkit as templating engine
  • Log4Perl as logging system
  • Moo as OOP framework

Command-line parameters

All the options that suply variants, servers or player names can be either used multiple times on the command-line, or they can have aggregate multiple strings by joining them with commas. Example:

 nhdb-feeder --variant=all --variant=nh --variant=nh4
 nhdb-feeder --variant=all,nh,nh4

nhdb-feeder.pl

--logfiles
This will list all configured data sources and exit without doing anything else.

--server=server
Only sources on specified server will be processed. "srv" is three letter server acronym such as "nao", "nxc" etc. Using this option will override the source server being defined as unoperational in the database (table 'logfiles'), but it will not override the server being defined as static. This behaviour enables reloading inoperational servers without needing to go to the database to temporarily switch their 'oper' field. Please note, that one server can host multiple variants (and therefore have multiple logs associated with it), use --variant to further limit processing to single source.

--variant=variant
Limit processing only to variant specified by its short-code (such as "nh", "unh" etc.)

--logid=id
Limit processing only to logfiles specified by their log ids. Log id is NHS's internal identification of a configured logfile. The --logfiles option will display these id's.

--purge
Erase all database entries that match --logid, --server and --variant options. If used alone without any specification, all the entries are deleted.

--oper, --nooper
Enable/disable all processing of selected sources.

--static, --nostatic
Make selected sources static (or non-static), ie. never try to download the source's configured xlogfile, but still process it if it grows or its database entries are purged.

--pmap-list
Display list of current player name translations.

--pmap-add=SRCNAME/SERVER=DSTNAME
Add new translation, playername srcname on server server will be considered dstname. Multiple translations can be added at the same time and this can be combined with --pmap-remove.

--pmap-remove=SRCNAME/SERVER
Remove existing translation. Multiple translations can be removed at the same time and this can be combined with --pmap-add.

nhdb-stats.pl

--noaggr
Disable generation of aggregate pages (such as list of recent ascensions, streak list and so on).

--force
Force processing of all variants and players, even if they do not need updating. Note, that regenerating all players' pages takes very long time. If you just want force regenerating aggregate pages only, use the --noplayers option along with --force.

--variant=variant
Limit processing only to specified variant. This can be used multiple times. Variant can also be "all".

--noplayers
Disable generating player pages.

--player=player
Use this to limit processing player pages to specific player or players.

nhs's People

Contributors

aoeixsz4 avatar borekl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nhs's Issues

Dump file names need to be urlencoded

NH4 based variants can have pretty much any character in playername and playername is part of dump filename.

09:52 < FIQ> https://www.hardfought.org/userdata/L/Luxidream/fiqhack/dumplog/2017-11-28%2006:03:11,%20o~~~~wo%20what's%20this?-Pri-Orc-Mal-Cha,%20ascended.txt
09:53 < FIQ> https://www.hardfought.org/userdata/L/Luxidream/fiqhack/dumplog/2017-11-27%2019:18:33,%20#ORCTOWN4FH-Pri-Orc-Mal-Cha,%20died.txt

Copying/Licensing

Hi Borek.

Technically I've illegally forked and modified your repository.
Would you mind adding an open-source license like MIT or GPLv3 (whatever you want to choose really)?
I will then add the same to my fork.

Thanks!
Jo

Accomodate xlogfile fix in FIQhack

FIQ will add base64 encoded dump filename into xlogfile to avoid the problems with ambiguous escapes.

FIQhack commit ref 59fcf05, c67f910

[stats] Use of uninitialized variable

2015/05/30 11:13:55 I Creating page: @ajm/all
Use of uninitialized value $t in integer division (/) at ./nhdb-stats.pl line 101.
Use of uninitialized value $t in integer modulus (%) at ./nhdb-stats.pl line 102.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.