Re: searchable webpage

2003-11-06 Thread Desmond Coughlan
Le Wed, Nov 05, 2003 at 09:59:15PM -0800, R. Joseph Newton a écrit ... 

  I know that this exists already, but I can't find any code to pinch on
  the web.  :-(
 
  The thing I want to do, is to create a searchable index on a webpage.
  It's a spoof newsgroup designed to take the piss out of someone on an
  Internet group.  The address is
  url:http://www.zeouane.org/peinedemort/gimmicks/
 
  I can do the HTML, but as it'll be a CGI, I reckon, there's going to be
  a fair bit of perl lurking in the background.  :-)

 Don't expect a whole lot of help with this here.  We actually like
 newsgroups to work properly.  Spoofing is not good for anyone,
 particularly the person who does it.

Perhaps I should be more precise.  The newsgroup is not 'spoofed' in the
sense that I wrote it to 'pretend' to be someone else.  In that context,
it's a 'genuine' site.  A more accurate description would probably have
been 'it's a humour website' ... 

I'll check out CPAN and see if they have anything suitable.  Thanks.

D.


-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org


pgp0.pgp
Description: PGP signature


Re: PostgreSQL and Customer Database

2003-10-19 Thread Desmond Coughlan
Le Sat, Oct 18, 2003 at 01:16:56PM -0500, Daniel Staal a écrit ... 

{ snip }

 In which case, my second question is: where can I learn how to do it ?
 I have 'Introduction to Perl' translated, and the only mention of
 databases is in telling me to use::DBI.  Fine, but ...  _how_ do I use
 DBI ?

 Well, you could install the modules and read the manuals, FAQs, and other
 docs that come with them (or available on CPAN's web site)...  (As well
 as the info on http://dbi.perl.org/ and other websites.) But that's not
 actually what I'd recommend.  (Though there is plenty of information that
 way.)

 If you don't mind spending a little money, I would highly recommend
 'Programming the Perl DBI', also an O'Reilly book.  You still need to
 know SQL and your database, but it covers the rest of the DBI end.

Thanks for the above.  Yep, I think that money needs to be spent.  DBI
obtained and installed.  Thanks !! 

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org


pgp0.pgp
Description: PGP signature


PostgreSQL and Customer Database

2003-10-18 Thread Desmond Coughlan
Hi,
I've been working on both SQL and Perl for a while now, and have lots more
to learn, but am getting there.  I'm going on a trip to the UK soon, and my
choice of reading on the Eurostar is 'Programming Perl' by O'Reilly.  :-\

I have a pet project, which is probably (what with all the other things
that I have to do at the moment) not going to see the light of day until
the middle of 2004, but that's cool.  My question to this list isn't a
request to 'hold my hand' and write the code for me, but rather, to give me
a few pointers to where I can find the information I need, in order to
learn how to do it myself.

Here's the deal ... 

A friend runs a small record shop in Paris.  He has several tens of
thousands of CDs, 45s, and 33s (or whatever you call them).  He wants to
get them all onto an SQL database, and be able to keep track of sales, as
well as being able to see what's selling well, not so well, etc.  

Now, I know enough about SQL to be able to knock up a DB along the lines
described above, and to extract the information he needs.  I run PostgreSQL
here on my server, and could get a text file, copy it into a database, and
even (with a bit more reading) produce reports.  

However, that's not the issue, otherwise I'd have posted this question to
the PostgreSQL mailing list to which I'm subscribed.  Why ?  Because he
knows next to nothing about computers, and I can't see him wanting to spend
the time learning.  So here's what I want to do.  I want to use perl to
produce a webpage, which will be on his PC sitting on the counter in his
shop.  He'll enter the artist name, the title, the reference, the price
that he paid for the record (or the CD, or ... yeah, you get the idea), and
then when it's sold, the price he sold it for.  This page will dynamically
update a PostgreSQL database running on a server in the back of his shop.
An added bonus will be if he can maintain a 'mailshot' list, where people
will ask to be notified of new acquisitions (strictly on an 'ask first'
basis, as he's not interested in sending spam), or a customer database
where customers will only be notified of new acquisitions in a particular
'genre', where they've previously expressed an interest.

If things go well, he'd even like to have certain (but not all) aspects of
the database available to customers and potential customers, via a webpage.
An added possibility is that I could keep (and maintain, from a DbA point
of view) the database here, and he could login via an encrypted connection,
to add and remove records.

OK, first question: is all the above possible ?  I think that I know the
answer, and that it's yes.  In which case, my second question is: where can
I learn how to do it ?  I have 'Introduction to Perl' translated, and the
only mention of databases is in telling me to use::DBI.  Fine, but ...
_how_ do I use DBI ?  After that, I need to swot up on CGI, which I've
already touched upon in writing a 'feedback' form for my webpage.

Your opinions would be welcome. 

Thanks for listening.

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org


pgp0.pgp
Description: PGP signature


Re: Script Works With One Newsgroup, Not With Another

2003-02-25 Thread Desmond Coughlan
Le Fri, Feb 21, 2003 at 05:19:06PM -0800, Michael Kelly a écrit ... 

  OK ... no wants to answer me.  
  
  *shrug*

 It's often not a matter of people not wanting to answer you so much as
 not being able to. I personally have no experience in the area of your
 question. Answers on mailing lists are provided assuming that (a) the
 right people with the right areas of experience see your message and (b)
 that they can donate their time to help fix someone else's problem.
 
 Check where you define the values in your if statement. Make sure they
 exist when you think they do, and are what you think they are.

OK, thanks, I'll have a look, but I fear that I'm not going to get far, as
I'm very much at the 'beginner' level, and the script isn't mine, but is
one that a friend modified, from an already existing script.

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org


pgp0.pgp
Description: PGP signature


Re: Script Works With One Newsgroup, Not With Another

2003-02-25 Thread Desmond Coughlan
Le Sat, Feb 22, 2003 at 11:37:57AM -0800, R. Joseph Newton a écrit ... 

   I post statistics to a newsgroup called news:alt.activism.death-penalty
   once per week, using the 'ngstatistics' script by H. Alex LaHurreau and
   Davide G. M. Salvetti.  You can see the script in its entirety here ...

  OK ... no wants to answer me.

 Well, you are going to have to do the lead work here.  this isn't just a
 concept test--it's a full application, and debugging it is the
 programmer's job.  You will probably want to start by inserting print
 statements at critical points in the script to see where it is hanging.

Good tactic, I'll try that, but still can't figure out why, if it's hanging
with one newsgroup, why isn't it doing it with them all ?

 You also will want to use an existing news application to sample the
 output from each group and examine it closely.  Look for the application
 which shows the richest header information.

Willdo.

{ snip remaining advice }

I'll keep y'all posted, then.  :-)

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org


pgp0.pgp
Description: PGP signature


Re: script for deleting server log files

2003-02-24 Thread Desmond Coughlan
Le Sun, Feb 23, 2003 at 10:49:27PM +0200, Ronen Kfir a écrit ... 

 I have log files on an IIS web server (WIN2K), that I want to delete
 after a couple of days, lets say -14. I want the script to run under a
 schedule, and delete those files.

I seem to recall seeing a script on cpan (http://www.cpan.org/) that will
do this.  

D.

PS Was it really necessary to set X-Priority to '1' on your e-mail ? 

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org


pgp0.pgp
Description: PGP signature


Re: Script Works With One Newsgroup, Not With Another

2003-02-21 Thread Desmond Coughlan
Le Wed, Feb 12, 2003 at 02:14:53AM +, Desmond Coughlan a écrit ... 

 I post statistics to a newsgroup called news:alt.activism.death-penalty
 once per week, using the 'ngstatistics' script by H. Alex LaHurreau and
 Davide G. M. Salvetti.  You can see the script in its entirety here ... 

{ snip }

OK ... no wants to answer me.  

*shrug*

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Script Works With One Newsgroup, Not With Another

2003-02-12 Thread Desmond Coughlan
Hi,
I post statistics to a newsgroup called news:alt.activism.death-penalty
once per week, using the 'ngstatistics' script by H. Alex LaHurreau and
Davide G. M. Salvetti.  You can see the script in its entirety here ... 

url:http://www.zeouane.org/perl/ngstatistics.pl

It works perfectly ... 

url:http://groups.google.com/groups?q=g:thl2649704580ddq=hl=frlr=ie=UTF-8selm=apgkif%241am37%241%40ID-91468.news.dfncis.de

I run it from a shell script in /usr/local/sbin, as follows ... 

#!/bin/sh

chdir /root

/home/desmond/bin/ngstatistics -np -g alt.activism.death-penalty --days 7 -l 
10 -s 10 -e -ea [EMAIL PROTECTED] -en Des -eta [EMAIL PROTECTED] -et 
Des -v --dotted=yes 

Now, just out of curiosity, I change the newsgroup to another one to which
I'm subscribed (news:rec.travel.europe), and run the same script (without
changing _anything_ in the script).  The result is ... 

Scanning 7 days of rec.travel.europe...Can't call method address on an
undefined value at /usr/local/lib/perl5/site_perl/5.8.0/News/Scan/Article.pm line 155, 
GEN53 line 34.

Line 155 of /usr/local/lib/perl5/site_perl/5.8.0/News/Scan/Article.pm looks
like this ... 

if (exists $self-group-aliases-{lc $addr-address}) {

I've put a copy of ../Article.pm here, to save bandwidth ... 

url:http://www.zeouane.org/perl/Article.pm

Anyone care to lend a hand ?  How can a script work with one group, yet not
with another, when nothing in the script has been changed ?  Also, my news
server _is_ subscribed to both groups.

Thanks in advance.

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org



msg38395/pgp0.pgp
Description: PGP signature


harness test failed

2003-01-31 Thread Desmond Coughlan
Hi,
I'm installing perl 5.8.0 on a friend's machine, and at the 'make test'
phase, I see that the test harness in ../t has failed.  

make install runs anyway (so far) ... could someone indicate whether this
particular aspect of the test is likely to cause problems and (if
necessary), how to fix it ?

Thanks.

D.

-- 
Desmond Coughlan  |'Io non mori, e non rimasi vivo'
[EMAIL PROTECTED] 
http://www.zeouane.org



msg37702/pgp0.pgp
Description: PGP signature


Re: Help!!!

2003-01-07 Thread Desmond Coughlan
Le Mon, Jan 06, 2003 at 11:55:11AM -0500, Jose Vicente Paredes Loor a écrit ... 

 I am looking for a script(or a group of them) to monitor my network,i
 mean, i want to ping from one server and collect the data in some web page
 maybe, and show the ping result from all my servers in only one page.
 I have scripts to make ping from the server, but i dont know how to
 collect the data to show them after.
 I need to know when i dont have internet from a specific server.

I'm a perl beginner (spot the understatement !), too, but you _might_ find
what you want, with 'Big Brother'.

D.

-- 
Desmond Coughlan
[EMAIL PROTECTED]
http://www.zeouane.org



msg36001/pgp0.pgp
Description: PGP signature


changing case

2002-11-03 Thread Desmond Coughlan
Hi,
I'm trying to figure out how I can change the filenames in a directory, from
having an initial capital letter, to all lowercase.  The files came from
a Windows system, which doesn't really care about case.  My BSD box, however,
does !

I've tried fiddling around with tr and lc, but I don't know perl enough
to get it to work.  FYI, the directory is called $HOME/documents, and 
the files are called 'Indexpage.html', or 'Reportback.html' and so on ...

Thanks in advance.

D.

-- 
Desmond Coughlan
[EMAIL PROTECTED]
http://www.zeouane.org



msg33254/pgp0.pgp
Description: PGP signature