Hello
If you are just trying to import a single TOPIC from that content.rdf.u8 file, you will know it takes for ever to let your server to run the nph-import. Ofcourse, you can follow what Alex suggested in another thread, but here is just another alternative.
Just save the following code snippet into a file,
say: fetchTopic.pl
Of course, update the startpattern with your own
topic of choice.
my $startpattern="Top/Regional/Asia/India";
my $flag = 0;
while(<>) {
####
if (/^<Topic r:id="${startpattern}/) {
$flag = 1;
} elsif (/^<Topic/) {
$flag = 0;
}
print if $flag;
}
Then,
% gunzip -c content.rdf.u8.gz | ./fetchTopic.pl > mytopic.rdf
That's it. And now you have your entire TOPIC extracted out and kept in its own RDF file. Just run nph-import on this file, and it wont take days and days.. but only few mins. to hours.
Hope this helps.
-Srinivas
If you are just trying to import a single TOPIC from that content.rdf.u8 file, you will know it takes for ever to let your server to run the nph-import. Ofcourse, you can follow what Alex suggested in another thread, but here is just another alternative.
Just save the following code snippet into a file,
say: fetchTopic.pl
Of course, update the startpattern with your own
topic of choice.
Code:
#!/usr/bin/perl my $startpattern="Top/Regional/Asia/India";
my $flag = 0;
while(<>) {
####
if (/^<Topic r:id="${startpattern}/) {
$flag = 1;
} elsif (/^<Topic/) {
$flag = 0;
}
print if $flag;
}
Then,
% gunzip -c content.rdf.u8.gz | ./fetchTopic.pl > mytopic.rdf
That's it. And now you have your entire TOPIC extracted out and kept in its own RDF file. Just run nph-import on this file, and it wont take days and days.. but only few mins. to hours.
Hope this helps.
-Srinivas