The entire directory structure and listings of category "X" from the Dmoz directory would be extracted and inserted into an editable flat file database in the following format.
For categories and subcategories folders will be created instead of flat files. The flat files for those categories or subcategories will contain a flat file with the listings.
For Example: (Please NOTE that this is an example only and that I will provde to you the directory i wish to extract when you are awarded the project)
If the category was "Dolphin Shoes" then the top level folder created would be named "Dolphin_Shoes"
Inside of that folder Dolphin_Shoes would be any folders for subcategories as well as one flat file containing any listings directly under Dolphin Shoes using the flat file db format depcited below.
$listing_title|$listing_url|$listing_description
Example Continued:
Let us imagine that under the folder "Dolphin_Shoes", which is representative of the category "Dolphin Shoes" there were 2 subcategories and 2 listings.
The sub category names for this example would be "Chats and Forums" and "Directories". Because there are 2 sub categories then 2 folders should be created in the "Dolphin_Shoes" directory. #1: "Chats_and_Directories" #2. "Directories".
Now remember I mentioned that there were 2 listings too! So a text file should also be created named db.flat.
In this example let us imagine that listing number 1 and 2 are as follows.
Listing #1: Mike's Dolphin Shoes - Dolphin shoes for mike
URL: [login to view URL]
Listing #2: Lisa's Dolphin Shoes - Dolphin shoes for Lisa
URL: [login to view URL]
In this example that [login to view URL] file would be created and the information would be stored as such.
Mike's Dolphin Shoes|[login to view URL]|Dolphin shoes for Mike
Lisa's Dolphin Shoes|[login to view URL]|Dolphin shoes for Lisa
* NOTES * The 3 pipes represent the Title,URL and description for Mike's Dolphin Shoes
The above examples will be repeated over and over deeper and deeper until the bottom of the dmoz directory structure has been reached.