This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnetkan-indexer
executable file
·111 lines (75 loc) · 2.09 KB
/
netkan-indexer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use autodie qw(:all);
use Sys::RunAlone;
use Time::Limit '10800'; # Something wrong if we are taking longer than 3 hours
use Getopt::Long;
use File::Spec;
use App::KSP_CKAN::NetKAN;
use App::KSP_CKAN::Tools::Config;
# PODNAME: netkan-indexer
# ABSTRACT: netkan-indexer - Extant NetKAN indexing bot
# VERSION
=head1 SYNOPSIS
Usage:
Debugging commands:
netkan-indexer --debug : Run with debugging enabled.
=head1 SETUP
=head2 Installation
If you have not already installed this software, the easiest way
is to use L<cpanm> and L<local::lib>. If you don't have them installed,
it's easy with:
curl -L http://cpanmin.us/ | perl - --self-upgrade
~/perl5/bin/cpanm -L ~/perl5 App::local::lib::helper
source ~/perl5/bin/localenv-bashrc
You might want to put that last line in your F<~/.bashrc> file.
You can then install C<netkan-indexer> and related utilities with:
cpanm App::KSP_CKAN
=head1 DESCRIPTION
This is the extant NetKAN Indexing Bot for KSP-CKAN
=head1 BUGS/Features Requests
Please submit any bugs, feature requests to
L<https://github.com/KSP-CKAN/NetKAN-bot/issues> .
Contributions are more than welcome!
=head1 SEE ALSO
L<App::KSP-CKAN>
=cut
my $PROGNAME = (File::Spec->splitpath($0))[2];
$PROGNAME ||= 'netkan-indexer';
my $DEBUG = 0;
my $LITE = 0;
my $getopts_rc = GetOptions(
"version" => \&version,
"debug!" => \$DEBUG,
"lite!" => \$LITE,
"help|?" => \&print_usage,
);
# TODO: Allow config to be specified
my $config = App::KSP_CKAN::Tools::Config->new(
debugging => $DEBUG,
);
my $netkan = App::KSP_CKAN::NetKAN->new(
config => $config,
);
if (! $LITE ) {
$netkan->full_index;
} else {
$netkan->lite_index;
}
sub version {
$::VERSION ||= "Unreleased";
say "netkan-indexer version : $::VERSION";
exit 1;
}
sub print_usage {
say q{
Usage:
netkan-indexer --debug : Run with debugging enabled.
netkan-indexer --version : Show version information
For more documentation, use `perldoc netkan-indexer`.
};
exit 1;
}
__END__