summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Von Moll <avonmoll@gmail.com>2018-10-05 11:02:00 -0400
committerAlejandro Gallo <aamsgallo@gmail.com>2018-10-09 11:29:25 +0200
commit64f86c145e71903ccafe0970fdf5d9c79000cb4b (patch)
tree627e66584b7685042b2e22ec38c6368a56fbbaef
parent50188525b329d3e0503284101e78114beb07ddb1 (diff)
Fixed zotero-sql to work for 5.0.55.1
-rwxr-xr-xexamples/scripts/papis-zotero-sql17
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/scripts/papis-zotero-sql b/examples/scripts/papis-zotero-sql
index a14fcefd..76501edc 100755
--- a/examples/scripts/papis-zotero-sql
+++ b/examples/scripts/papis-zotero-sql
@@ -77,20 +77,19 @@ def getCreators(connection, itemId):
itemCreatorQuery = """
SELECT
creatorTypes.creatorType,
- creatorData.firstName,
- creatorData.lastName
+ creators.firstName,
+ creators.lastName
FROM
creatorTypes,
creators,
- creatorData,
itemCreators
WHERE
itemCreators.itemID = {itemID} AND
creatorTypes.creatorTypeID = itemCreators.creatorTypeID AND
- creators.creatorID = itemCreators.creatorID AND
- creatorData.creatorDataID = creators.creatorDataID
+ creators.creatorID = itemCreators.creatorID
ORDER BY
- creatorTypes.creatorType
+ creatorTypes.creatorType,
+ itemCreators.orderIndex
"""
creatorCursor = connection.cursor()
creatorCursor.execute(
@@ -123,13 +122,13 @@ def getFiles(connection, itemId, itemKey):
SELECT
items.key,
itemAttachments.path,
- itemAttachments.mimeType
+ itemAttachments.contentType
FROM
itemAttachments,
items
WHERE
- itemAttachments.sourceItemID = {itemID} AND
- itemAttachments.mimeType IN {mimeTypes} AND
+ itemAttachments.parentItemID = {itemID} AND
+ itemAttachments.contentType IN {mimeTypes} AND
items.itemID = itemAttachments.itemID
"""
mimeTypes = getTuple(includedAttachments.keys())