need a program to parse odp PLEASE
#1 martin30
Posted 09 December 2003 - 11:33 PM
I couldn't get anything useful in http://dmoz.org/Comp...ta/Upload_Tools
Does anybody know how to export the results to a sql database?
#2
Posted 10 December 2003 - 01:23 AM
A simple XML parser that inserts the ODP strucure into MySQL DB
odp.reader-0.1.zip"
along the lines of what you're looking for?
Also take a look at http://rainwaterrept...dp/rdflist.html
#3 martin30
Posted 10 December 2003 - 08:09 AM
#4
Posted 15 December 2003 - 01:08 AM
It reads odp content throgh the web interface. This makes
sense if you are only intersted in your categories data.
The approach of tulipchain is not usable for parsing larger parts of the directory)
However it does not insert its data into a database. I am currently working on such a feature. However I am using Berkeley DB/Object database, because mySQL is far too slow on hierarchical data.
#6
Posted 15 December 2003 - 04:48 AM
But as stated above it does not solve the problem. It can produce HTML output of a complete tree with some tricks, but _if_ you want to spider a small part of the ODP I suggest spidering it directly, not with a tool like this that produces output that has to be spidered again.
Wichtige Links: Deutsche ODP FAQ / Deutsche ODP-Richtlinien Important Links: English ODP FAQ / English ODP Guidelines
#7
Posted 15 December 2003 - 09:59 AM
:icon_arro Sorry, but private messages to me about site status will be ignored :icon_excl
Dummies Guide to dmoz.org
There is no queue - there is no schedule :confuse2:
#8
Posted 15 December 2003 - 12:23 PM
Quote
I extract most of the information and put it into mySQL tables, though my programs are very editor oriented so probably wouldn't be of much use to anyone else. But one way I speed this up is to extract the information into a tab-delimited flat file--for example, if I have a table with URL, Title, Description, and Category the each site would be on one line, with the URL, title, description and category separated by tabs.
Once I'm finished writing all the data to flat files, I then Truncate the table (or delete everything from the table), and then I use LOAD DATA LOCAL INFILE "flatfile.txt" INTO TABLE tablename
I don't use an index on the table containing the 4 mil+ sites, but if you do, you don't want the index there until you've loaded all the sites into the table. Then create the index.
One other very big time (and space) saver, is to create a catid table. This table should have only two fields: catid and path, where catid is the cat id in the RDF for each category, and path is the full path of the category, like Arts/Online_Writing. Then, in any other table where you need to specify a category, use the catid. When you query a table with a catid, join it with the catid table to get the path.
Using those techniques, and a few others that are more complicated to explain, I've reduced the parsing time to under an hour. :monacle:
#9 martin30
Posted 15 December 2003 - 03:29 PM
That is exactly what I was looking for! Great!
:D
#10
Posted 10 April 2004 - 10:49 PM
#11
Posted 11 April 2004 - 04:00 AM
You could always run a local copy of Apache, PHP, and mySQL, so that it appears that you are on a server. Access it through http://localhost/ or http://127.0.0.1/ etc.
#12
Posted 11 April 2004 - 11:57 AM
Quote
You could always run a local copy of Apache, PHP, and mySQL, so that it appears that you are on a server. Access it through http://localhost/ or http://127.0.0.1/ etc.
Good idea g1smd !! I will just try it !!
#13
Posted 18 June 2004 - 01:56 AM

Help













