From: | Vince Vielhaber <vev(at)michvhf(dot)com> |
---|---|
To: | Tony Grant <tony(at)animaproductions(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: html to postgres... |
Date: | 2001-07-16 15:43:11 |
Message-ID: | Pine.BSF.4.30.0107161137330.23283-100000@paprika.michvhf.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 16 Jul 2001, Tony Grant wrote:
> Hello,
>
> I have several hundred HTML (!) pages that need to be converted to a
> format that in turn can be imported into PostgreSQL. They are all built
> on a very similar grid.
>
> Any thoughts?
For the integrated docs I wrote a C program (I suck at perl) and a
shell script to send to stdout:
\connect whateverdatabaseyouwant
insert into table(pagereference,textofpage) values('titleofpage','
The parse the file and send it to stdout but take any apostrophes and
backslashes and escape them. Then follow it up with:
');\n
and when run it took a directory of about 480 files and neatly filed
them into a table.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Ballard | 2001-07-16 15:44:03 | Having trouble with Interval computation |
Previous Message | Thalis A. Kalfigopoulos | 2001-07-16 15:41:13 | Re: SQL for CREATE RULE |