projects
/
ILL-Zotero-RT
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d6d7079
)
rename to json_md5
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 26 Jul 2012 18:10:20 +0000
(20:10 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 26 Jul 2012 18:10:20 +0000
(20:10 +0200)
zotero.pl
patch
|
blob
|
history
diff --git
a/zotero.pl
b/zotero.pl
index
35f29a0
..
241c832
100755
(executable)
--- a/
zotero.pl
+++ b/
zotero.pl
@@
-79,14
+79,17
@@
foreach my $entry ( keys %{ $feed->{entry} } ) {
my $old_item = $db->get( "z_$UserID/$id" );
warn "# old_item ",dump($old_item);
my $old_item = $db->get( "z_$UserID/$id" );
warn "# old_item ",dump($old_item);
- my $
item
_md5 = md5_hex encode_json $item;
- $item->{
item_md5} = $item
_md5;
- if ( $old_item->{zapi_etag} ne $item->{zapi_etag} || $
item_md5 ne $old_item->{item
_md5} ) {
+ my $
json
_md5 = md5_hex encode_json $item;
+ $item->{
json_md5} = $json
_md5;
+ if ( $old_item->{zapi_etag} ne $item->{zapi_etag} || $
json_md5 ne $old_item->{json
_md5} ) {
$item->{_rev} = $old_item->{_rev};
$db->put( "z_$UserID/$id" => $item );
}
}
$item->{_rev} = $old_item->{_rev};
$db->put( "z_$UserID/$id" => $item );
}
}
+delete $feed->{entry};
+warn "# feed without entry ",dump( $feed );
+
warn "# tree ",dump( $tree );
warn "# ticket_items ",dump( $ticket_items );
warn "# tree ",dump( $tree );
warn "# ticket_items ",dump( $ticket_items );