Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Open Directory RDF Dump Integration

(Page 3 of 3)
> >
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Raza,

I'm hardly the expert here, but if jcokos doesn't mind, I'll write up some instructions and post it in the FAQ.
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
jcokos is too busy and i do not think he is checking this forum, if you want his permission, e-mail him
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
lordmouse that would be a great help!

Smile

Adam
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
It may be a while though, even if John doesn't mind me doing the FAQ... I was supposed to start redesigning my friends' web site last week and I haven't started om it. I forgot all about it.
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
since you are busy as well, could you answer this with a simple yes or no

Quote:
is it possible to do this conversion from dumps to Links 2
compatible categories.db and links.db offline on a windows 95 PC?

if yes could you explain a little bit

thankyou!!

Quote Reply
Re: Open Directory RDF Dump Integration In reply to
WARNING - I worked out the setting and ran the cgi script and ended up crashing the web server I was on - my web host was not very happy!

Adam
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
these are kinda messy instructions:

yes you can run the script on a Windows9x system. You just need to set up a server, and install Perl. Download the RDFs, your current databases, and the script. Unzip the RDFs (you'll need like 375 MB total free disk space, not including the exported files). Create 2 blank files; somewhere at the top of the script are some variables - 2 point to the RDFs, 2 point to your new blank files. Find where is tells you set the ouput format according your links fields and do that (it's in there twice). If you want to export certain categories, find the post in this thread and modify the script accodingly (I have not used that, so I'm just assuming it works). That should be about it. Click the export program's icon and it should run (you may have to set up windows to run it automaticly). When the export is complete, just cut and past the files into your current databases, or upload the new files to your website and run the bulkload import program.

I'm about half done with my other work so I'll be free in a day or two write better and more detailed instructions.
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
 
Quote:
Find where
is tells you set the ouput format according your links fields and do that (it's in there twice).

is this the correct way:

$ID|$Title|$URL|$Date|$Category|$AltCategories|$Description|$Contact Name|$Contact Email|$Hits|$isNew|$isPopular|$Rating|$Votes|$ReceiveMail
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
I think that's correct for the link field format. Use category.cfg and links.cfg to get 'em right. I would suggest that you replace some of the field names with "0" and "NO" or "YES" (or otherwise blank) so you won't have to fill them in manually, because the script will put "0" in all the fields it doesn't recognize.
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Is there anyone out there that could supply just a /top/regional/canada dump from RDF to Links 2.0 format for me?

I keep trying to run the conversion and don't apparently have enough RAM (64).. keep getting an Out of Memory error from the software that Jonkos wrote...

Favours are appreciated and returned.. Smile

Paul
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Update... I found a server that will do the conversion but my formatting is wrong..

Anyone have a copy of the script that is setup for Links instead of Hyperseek?

I think that would benefit a LOT of people here if someone posted a working script... right now mine doesn't give categories unique numbers and a few other problems..

Thanks,

Paul
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
i do not think there is one for links, hyperseek script supose to work for both.
linkSQL comes with one but it does not work for links2 users
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
I have the hyperseek one but can't get it quite right for some reason... not good at this stuff... Smile

If someone could post their "translated" version I would much appreciate it. Smile

Paul
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
how can i download just this category
http://dmoz.org/Regional/Africa/
john said to put this code
next if $Category !~ "Something";
where something is the name of te category
so in this case the name of the category is
Regional/Africa
am i right?

[This message has been edited by theguy (edited January 07, 2000).]
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
I think it's "Top/Regional/Africa"
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Does anyone have a working demo with the rdf dumps working in links? If so please give me the link. I want to see it in action.

Thanks,

Mark
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Hi everyone,

I'm modifying the script that was referenced in this thread, to bring in url's from dmoz, and have a quick question.

The url is formatted strange from dmoz rdf file, it's almost like a mistake in there export, it looks like this...

<ExternalPage about="http://www.blahblah.com/index.html 133089">


notice the category # at the end??? I need to trim it out during the parse of the url.

a section of the import script is below, I have modified it somewhat for links 2.0 format , but I'm having trouble determining how to trim out the 3-6 number.

This is a snippet from the script,

sub Links {

print "Starting Conversion...\n";

$catstart = '<Topic r:id="';
$catend = '">';

$linkstart = '<ExternalPage about="';
$linkend = '"\>';

$titlestart = '<d:Title>';
$titleend = '</d:Title>';

$descstart = '<d escription>';
$descend = '</d escription>';

$ID = time;

open(CONVERTED,">content.dat");
open(FILE,"test.rdf");
while(<FILE> ) {

chomp;
if ($_ =~ m/$catstart([^<]+)$catend/sog) {
$Category = $1;
$Category =~ s/$top//g;
$Category =~ s/\//\//g;
$Category =~ s/_/_/g;
}

elsif ($_ =~ m/$linkstart([^<]+)$linkend/sog) { $URL = $1; }
elsif ($_ =~ m/$titlestart([^<]+)$titleend/sog) { $Title = $1; }
elsif ($_ =~ m/$descstart([^<]+)$descend/sog) {

## To select only certain categories ... uncomment
## next if($Category !~ "");

$Description = $1;
$ID++;

print ".";

## CHANGE THIS TO MATCH YOUR FILE FORMAT !!
print CONVERTED "$ID|$Title|$URL|24-Jan-2000|$Category|$Description|support|support\@test.com|0|1|0|0|0|0\n";
}

}

close(FILE);
close(CONVERTED);


I think I have to modify this line:
$linkend = '"\>';
so it also chops the numbers preceeding it (2-6 chars - varies), and not all urls end with .html...

I tried using a subst(),-6 , a splice, and looked for a variable on chop , but I think these are more for arrays, I have looked through my perl books but have not found an example that works for here, any help or hints would be really helpful.

Thanks

Dean
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Hi

Hope Dean gets a answer - but I also have a quick question.

Would it be possible if I could have a copy of someone working script (hope this is ok with John) just I got past my first problems and got some data out - but it was in the wrong format and tried to do all the cats. (I thought I set it right, but I never seem to have much luck with perl!)

Thanks

Adam
-------------
adam@i-tec.co.uk
Quote Reply
Re: Open Directory RDF Dump Integration In reply to
Hey!

Anyone come up with a WORKING mod yet? Im using LINKS 2.0 and would ideally like to be able to pull the data from another server, as I definately don't have 500Mb!!!!

ANYONE got a working script yet?? Email me!



------------------
-------------------------
http:/www.t-e.co.uk
Quote Reply
Re: [lordmouse] Open Directory RDF Dump Integration In reply to
Anybody got successful with a REAL EASY way of getting a links2.0 copy running with DMOZ categories and data or just DMOZ categories ?

HELP appreciated.
>> Nakul Goyal (SEO, Link Building Expert)
Web Site Promotion
Tips 'n' Tricks
SEO News


> >