Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] Perl Gui Client
this is a basic hacked together code to give you an idea to do it. This
pulls almost everything from hylafax into an array that you can then use to
pull the info you want. The sort command will sort it.
I dont know if this code does. I've hacked it together from other code I
have seen and some I've written myself. It should just give you a good idea
on how to go...
Chris.
use Net::FTP;
my $cgi = new CGI;
$FAXSERVER = "linuxserver";
$HYLAFAX = 4559;
my $hfax = new Net::FTP $FAXSERVER, Port=>$HYLAFAX
or die "Can't connect to host $FAXSERVER";
$hfax->login("username","password")
or die "Can't login to host $FAXSERVER";
$hfax->binary;
my $jobfmt = join "$;", map "%$_", "a".."z", "A".."Z";
$hfax->quot("JOBFMT","\"$jobfmt\"");
my @recv;
$hfax->quot("RCVFMT","\"$jobfmt\"");
die $hfax->message unless $hfax->ok;
@recv = list_jobs $hfax, "recvq";
# sort by filename.
my @recv = sort {
$a->{'f'} cmp $b->{'f'}
} @_;
for(@jobs)
{
print <<JOB;
Filename: $_->{f}
Sender: $_->{"s"}
Pages: $_->{p}$_->{z}
Time: $_->{t}
JOB
;
}
> -----Original Message-----
> From: hylafax-users-bounce@xxxxxxxxxxx
> [mailto:hylafax-users-bounce@xxxxxxxxxxx]On Behalf Of Paul Kraus
> Sent: Tuesday, 30 September 2003 11:27 PM
> To: Chris Parsons; hylafax-users@xxxxxxxxxxx
> Subject: Re: [hylafax-users] Perl Gui Client
>
>
> I was looking into this with Net::FTP yesterday. However I
> don't see how
> you can change the way that the directory is listed to something more
> meaning full? Or for that matter how to reprint. Hmmm.
>
> Paul
>
> -----Original Message-----
> From: Chris Parsons [mailto:chrisp@xxxxxxxxxxxxxx]
> Sent: Monday, September 29, 2003 7:59 PM
> To: 'pkraus@xxxxxxxxxxxxx'; 'hylafax-users@xxxxxxxxxxx'
> Subject: RE: [hylafax-users] Perl Gui Client
>
>
> Use the ftp commands. Much easier way of doing things. By listing the
> contents of the recvq through ftp, you will have a list of received
> faxes labeled via however you wish. Also able to be sorted.
> Have a look
> at some of the perl www front ends for hylafax available at
> the hylafax
> links page. There are some good but easily hacked examples of
> how to do
> things in there.
>
>
> Chris Parsons
> Infotec Communications
>
> Hint: use Net::FTP;
>
>
>
>
>
>
> > -----Original Message-----
> > From: hylafax-users-bounce@xxxxxxxxxxx
> > [mailto:hylafax-users-bounce@xxxxxxxxxxx]On Behalf Of Paul Kraus
> > Sent: Monday, 29 September 2003 11:40 PM
> > To: hylafax-users@xxxxxxxxxxx
> > Subject: [hylafax-users] Perl Gui Client
> >
> >
> > As a project I am trying to write a client for Hylafax that
> > can be used
> > via command line and gui. I choose to use perl because I can
> > use perl Tk
> > and have a gui that will work both with Linux and windows.
> >
> > Now I have been looking at the docs and the ftp commands
> and have come
>
> > to the conclusion the best way to display a list of received faxes
> > that are labeled via incoming fax number is to parse out the files
> > that are in the log directory.
> >
> > I can parse them and generate my list. Is there a better way
> > to do this.
> > Some command I may be missing?
> >
> > Thoughts insights?
> >
> > Paul Kraus
> >
> >
> > ____________________ HylaFAX(tm) Users Mailing List
> > _______________________
> > To subscribe/unsubscribe, click
> > http://lists.hylafax.org/cgi-bin/lsg2.cgi
> > On UNIX: mail -s unsubscribe
> > hylafax-users-request@xxxxxxxxxxx < /dev/null
> > *To learn about commercial HylaFAX(tm) support, mail
> > sales@xxxxxxxxxxxx*
> >
> >
>
>
> ____________________ HylaFAX(tm) Users Mailing List
> _______________________
> To subscribe/unsubscribe, click
> http://lists.hylafax.org/cgi-bin/lsg2.cgi
> On UNIX: mail -s unsubscribe
> hylafax-users-request@xxxxxxxxxxx < /dev/null
> *To learn about commercial HylaFAX(tm) support, mail
> sales@xxxxxxxxxxxx*
>
>
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxxxxx*