Skip to content

Commit

Permalink
Update authors from API results
Browse files Browse the repository at this point in the history
This keeps the rich data from the Zotero API while maintaining the
current infrastructure.

Signed-off-by: Dan Scott <[email protected]>
  • Loading branch information
dbs committed Dec 29, 2016
1 parent d5b6d26 commit 8a6b951
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ris2web_api
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ After loading we'll need to adjust some of the data:
UPDATE citations SET title2 = publisher WHERE doc_type = 'JOUR' AND publisher IS NOT NULL;
UPDATE citations SET publisher = NULL WHERE doc_type = 'JOUR' AND publisher IS NOT NULL;
UPDATE zotero_cites_to_authors SET author_id = a.id FROM authors a WHERE a.author_name = name;
INSERT INTO authors (author_name) SELECT DISTINCT name FROM zotero_cites_to_authors WHERE author_id IS NULL;
UPDATE zotero_cites_to_authors SET author_id = a.id FROM authors a WHERE a.author_name = name AND author_id IS NULL;
# zotero.Zotero.items returns a data list as follows:
{
"data": {
Expand Down

0 comments on commit 8a6b951

Please sign in to comment.