Skip to content

Commit 05eca8b

Browse files
author
Kai Pöykiö
committed
resave Khkb/Blec bcoz they erased local catalogue
1 parent f830413 commit 05eca8b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
String qry = """
2+
collection = 'hold'
3+
AND deleted = 'false'
4+
AND data#>>'{@graph,1,heldBy,@id}' = 'https://libris.kb.se/library/BleC'
5+
AND data#>'{@graph,1,associatedMedia}' IS NOT NULL
6+
"""
7+
8+
selectBySqlWhere(qry) { hold ->
9+
10+
def item = hold.graph[1]
11+
12+
item.associatedMedia.each { am ->
13+
am.uri.each { uri ->
14+
if ( uri.contains('www.cineasterna.com') ) {
15+
//resave
16+
//println(uri)
17+
hold.scheduleSave(loud: true)
18+
}
19+
}
20+
}
21+
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
String qry = """
2+
collection = 'hold'
3+
AND deleted = 'false'
4+
AND data#>>'{@graph,1,heldBy,@id}' = 'https://libris.kb.se/library/Khkb'
5+
AND data#>'{@graph,1,associatedMedia}' IS NOT NULL
6+
"""
7+
8+
selectBySqlWhere(qry) { hold ->
9+
10+
def item = hold.graph[1]
11+
12+
item.associatedMedia.each { am ->
13+
am.uri.each { uri ->
14+
if (uri.contains('access.ur.se')) {
15+
//resave
16+
hold.scheduleSave(loud: true)
17+
//println(uri)
18+
}
19+
}
20+
}
21+
22+
}

0 commit comments

Comments
 (0)