Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Parse_RDF.pl Missing Features

Quote Reply
Parse_RDF.pl Missing Features
How difficult would it be to modify Parse_RDF.pl(The script that comes with Links SQL to import data in RDF format like dmoz) to allow you to select what category that data is put under? Also it would be nice to be able to select if the data should only be imported from that category or that category and all it's subcategories.

Steven
Quote Reply
Re: Parse_RDF.pl Missing Features In reply to
To have the script put links under a ceartain category, I think you can just do this:

on line 211 change:

$sth_Category->execute($CAT{$TOPICNAME}, $TOPICNAME, "", "", "", "", "", 0, 'No')

to:

$sth_Category->execute($CAT{$TOPICNAME}, "SomeCat/OtherCat/$TOPICNAME, "", "", "", "", "", 0, 'No')

and that should put all imported links under SomeCat/OtherCat.

To only import a single category (and not all subcats) you could try:

editing line 166, 183 which are both:

if ($TOPICNAME =~ m,^\Q$SUBSET\E,io)

to:

if ($TOPICNAME eq $SUBSET)

and I think that should work. Both are untested. =)

Cheers,

Alex