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