Re: html to postgres...

Поиск
Список
Период
Сортировка
От Vince Vielhaber
Тема Re: html to postgres...
Дата
Msg-id Pine.BSF.4.30.0107161137330.23283-100000@paprika.michvhf.com
обсуждение исходный текст
Ответ на html to postgres...  (Tony Grant <tony@animaproductions.com>)
Список 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@michvhf.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
==========================================================================




В списке pgsql-general по дате отправления:

Предыдущее
От: "Thalis A. Kalfigopoulos"
Дата:
Сообщение: Re: PASSWORD() function for postgresql?
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: Re: html to postgres...