/usr/bin/pagesjaunes is in libwww-search-perl 2.51.30-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | #!/usr/bin/perl -w
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
use strict;
use WWW::Search::Pagesjaunes;
use Getopt::Long;
use Pod::Usage;
my %opt;
GetOptions(
\%opt, 'activite|business|activity=s',
'nom|name=s', 'prenom|firstname:s',
'adresse|address:s', 'localite|ville|city|town=s',
'departement|district=s', 'limit:i', 'english', 'quiet',
'help|aide', 'man', 'separator|separateur=s',
'useragent=s', 'version', 'fast'
)
or pod2usage(2);
#
# $form->value('input_image', $x) où $x est:
#
# CD_PDR_SUP_REG => Région entière
# CD_PDR_SUP_DEP_REQ => Département entier
# CD_PDR_VOISIN_REQ => Localités voisines
# CD_PDR_INSCRIPTIONS_REQ => Sans nom ni adresse
# BT_INSCRIPTIONS_REQ_PROF => Afficher seulement les professionnels
#
die "$WWW::Search::Pagesjaunes::VERSION\n" if $opt{version};
pod2usage(1) if $opt{help};
pod2usage( -verbose => 2 ) if $opt{man};
pod2usage("$0: No town or district given.") unless ($opt{localite} || $opt{departement});
pod2usage("$0: No business or name given.")
unless ( $opt{activite} || $opt{nom} );
my $pj = WWW::Search::Pagesjaunes->new();
$pj->{lang} = 'EN' if $opt{english};
$pj->{error} = 0 if $opt{quiet};
$pj->{fast} = 1 if $opt{fast};
$pj->{ua}->agent($opt{useragent}) if $opt{useragent};
$pj->find(%opt);
do {
local $\ = "\n";
print join($opt{separator} || "\t", $_->entry) foreach ( $pj->results );
} while $pj->has_more;
__END__
=head1 NAME
pagesjaunes - Lookup phones numbers from www.pagesjaunes.fr
=head1 SYNOPSIS
pagesjaunes [options ...]
Options:
-activite -business : Business type
-nom -name : Name
-prenom -firstname : First name
-localite -town : Town
-departement -district : Dept district or Region
-useragent : String to be passed as User-Agent header
(this may be needed to bypass user-agent detection)
-fast : Submit the request directly without querying the form
-separator : Character used to separate the fields (default '\t')
-limit : Maximum number of results returned
-english : Use the pagesjaunes.fr english interface
-quiet : Turn off error messages display
-help : Brief help message
-man : Full documentation
-version : Display version number
You must provide the localite/town option, and either activite/business
or nom/name option. The prenom/firstname option is ignored if the
localite/town option is set.
=head1 OPTIONS
=over 8
=item B<-activite> or B<-business>
Activity or business type you're looking for. This is a mandatory switch
if you don't specify the B<-name> or B<-nom> switches.
=item B<-nom> or B<-name>
Name of the person or company you're looking for. Note that the search
is done with a fuzzy match.
=item B<-prenom> or B<-firstname>
First name of the person you're looking for. This option is ignored if
the B<-activite> or B<-business> are set.
=item B<-adresse> or B<-address>
Address of the person you're searching for.
=item B<-localite> or B<-town>
Name of the town.
=item B<-department> or B<-district>
Department district or Region you're searching in.
=item B<-separator>
Character used to separate fields in the result set.
Default is a tabulation character.
=item B<-useragent>
The default user-agent string passed to the www.pagesjaunes.fr site
is ""WWW::Search::Pagesjaunes/x.xx" where x.xx is the version of
the module.
Sometimes, it is needed to change it to other user-agent strings.
=item B<-limit>
Maximum number of entries returned. Default is 50. If you set it to 0 or
a negative number, it will return all the entries found.
=item B<-english>
Use the english interface of pagesjaunes.fr. This means that you can
enter business types in english (i.e. 'plumber' instead of 'plombier'),
and error messages will be displayed in english.
=item B<-quiet>
No error messages are printed when this switch is on
=item B<-help>
Print a brief help message and exits.
=item B<-man>
Prints the manual page and exits.
=item B<-version>
Prints the version of the script and exits.
=back
=head1 DESCRIPTION
This script provides name, phone number and addresses of French
telephone subscribers by using the http://www.pagesjaunes.fr directory
and the WWW::Search::Pagesjaunes module.
=head1 COPYRIGHT
Please read the Publisher information of L<http://www.pagesjaunes.fr>
available at the following URL:
L<http://www.pagesjaunes.fr/pj.cgi?html-=commun/avertissement.html&lang=en>
=encoding ISO8859-1
This script is Copyright (C) 2002, Briac Pilpré
This script is free software; you can redistribute it or modify it under
the same terms as Perl itself.
=head1 AUTHOR
Briac Pilpré <briac@cpan.org>
=cut
|