]>
Commit | Line | Data |
---|---|---|
01ba3ddc MG |
1 | #!/usr/bin/perl |
2 | use 5.014000; | |
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use App::NAOdash; | |
0fb1f859 | 7 | use Getopt::Long; |
01ba3ddc | 8 | |
0fb1f859 MG |
9 | my %args = ( |
10 | include_versions => [], | |
11 | exclude_versions => [], | |
12 | ); | |
13 | ||
14 | GetOptions( | |
15 | "exclude-version=s@", \$args{exclude_versions}, | |
16 | "include-version=s@", \$args{include_versions}, | |
17 | ); | |
18 | ||
19 | App::NAOdash::run(\%args, @ARGV); | |
01ba3ddc MG |
20 | |
21 | __END__ | |
22 | ||
23 | =encoding utf-8 | |
24 | ||
25 | =head1 NAME | |
26 | ||
27 | naodash - Analyze NetHack xlogfiles and extract statistics (command-line interface) | |
28 | ||
29 | =head1 SYNOPSIS | |
30 | ||
31 | naodash mgv # Show statistics for the mgv user on NAO | |
32 | naodash /path/to/xlogfile # Show statistics for a given xlogfile | |
33 | ||
0fb1f859 MG |
34 | # Show statistics for mgv, only including games played on 3.4.3 or 3.60 |
35 | naodash --include-versions=3.6.0 --include-versions=3.4.3 mgv | |
36 | # Show statistics for mgv, ignoring games played on 3.6.0 | |
37 | naodash --exclude-versions=3.6.0 mgv | |
38 | ||
01ba3ddc MG |
39 | =head1 DESCRIPTION |
40 | ||
41 | naodash is a command-line interface to L<NetHack::NAOdash>. It takes a | |
42 | NAO username or a path to an xlogfile, analyzes it, and prints the | |
c5cfd5bc | 43 | results of the analysis. A terminal with ANSI escape code support is |
01ba3ddc MG |
44 | required. Do not parse this command's output. For computer-readable |
45 | output, please use the L<NetHack::NAOdash> library directly. | |
46 | ||
0fb1f859 MG |
47 | =head1 OPTIONS |
48 | ||
49 | =over | |
50 | ||
51 | =item B<--include-version>=I<version> | |
52 | ||
53 | Only consider games played on this version of NetHack. Can be | |
54 | specified multiple times to include multiple versions. | |
55 | ||
56 | =item B<--exclude-version>=I<version> | |
57 | ||
58 | Do not consider games played on this version of NetHack. Can be | |
59 | specified multiple times to exclude multiple versions. | |
60 | ||
61 | =back | |
62 | ||
63 | If a version is included and excluded at the same time, games played | |
64 | on that version will not be considered. | |
65 | ||
49bfce9d MG |
66 | =head1 ENVIRONMENT |
67 | ||
68 | =over | |
69 | ||
70 | =item NAODASH_CACHE | |
71 | ||
72 | Path to a directory that should be used to cache xlogfiles downloaded | |
73 | from NAO, or the special value 'none' (case-insensitive) to disable | |
74 | caching. | |
75 | ||
76 | By default a directory named 'naodash' in the default temporary | |
77 | directory (C<< File::Spec->tmpdir >>) is used. | |
78 | ||
79 | =back | |
80 | ||
01ba3ddc MG |
81 | =head1 SEE ALSO |
82 | ||
83 | L<NetHack::NAOdash>, L<http://alt.org/nethack/>, L<App::NAOdash>, L<App::Web::NAOdash> | |
84 | ||
85 | =head1 AUTHOR | |
86 | ||
87 | Marius Gavrilescu, E<lt>marius@ieval.roE<gt> | |
88 | ||
89 | =head1 COPYRIGHT AND LICENSE | |
90 | ||
91 | Copyright (C) 2015 by Marius Gavrilescu | |
92 | ||
93 | This library is free software; you can redistribute it and/or modify | |
94 | it under the same terms as Perl itself, either Perl version 5.20.2 or, | |
95 | at your option, any later version of Perl 5 you may have available. | |
96 | ||
97 | ||
98 | =cut |