Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Rubric CPAN distribution.

Report information
The Basics
Id: 30820
Status: rejected
Priority: 0/
Queue: Rubric

People
Owner: Nobody in particular
Requestors: genehack [...] genehack.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: data generated with 'delbackup -y' can not be loaded with load_yaml.pl
Date: Sun, 18 Nov 2007 11:12:40 -0500
To: bug-Rubric [...] rt.cpan.org
From: John SJ Anderson <genehack [...] genehack.org>
The data schema that 'delbackup -y' generates is not quite what load_yaml.pl is expecting to see. Here is a patch (versus current Rubric git) that was sufficient for me to be able to load a delbackup YAML dump of my del.icio.us bookmarks and get all the data properly into Rubric: diff --git a/bin/load_yml.pl b/bin/load_yml.pl index 3bf1d3b..5ccced5 100755 --- a/bin/load_yml.pl +++ b/bin/load_yml.pl @@ -11,17 +11,17 @@ my $yaml; my $links = YAML::Load($yaml); foreach (@$links) { - my $link = Rubric::Link->find_or_create({uri => $_->{link}}); + my $link = Rubric::Link->find_or_create({uri => $_->{href}}); $link ||= ''; my $entry = $user->add_to_entries({ link => $link, - title => $_->{title}, - description => $_->{description}, + title => $_->{description}, + description => $_->{extended}, body => $_->{body}, - created => $_->{created}, + created => $_->{datetime}, modified => $_->{modified}, }); - $entry->add_to_tags({tag => $_}) for keys %{$_->{tags}}; + $entry->add_to_tags({tag => $_}) for @{$_->{tags}}; } $user->update; john. -- I'm just very selective about the reality I choose to accept. --- Calvin
load_yaml matched dump_yaml, not delbackup — which is stupid, and I don't know what I was thinking since del.icio.us is long gone, though, I'm just closing this down -- rjbs