View Single Post
Old 04-04-2018, 11:50 AM   #145
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Version 1.0.54 - Added RIS Export Tag L1 for .PDF Files (Only)

aquiaolado:

Although I have attached is an updated version of ZMI supporting L1 as an RIS export tag, I cannot reproduce your results.

I very strongly suspect that it is due to the fact that you have previously manually linked or attached the Calibre ebook file to your Zotero Item, so when Zotero exports its own RIS file, it "knows" about it already. When you immediately re-import what it just exported, it can do so cleanly for that reason.

A revised ZMI RIS export file for a .pdf is shown below:

Spoiler:

Code:
TY - BOOK        
AU - Ackerman, Diane
A2 -         
A3 -         
A4 -         
AB -         
AV -         
CN -         
CR -         
CY -         
DA - 2011-11-05        
DB - Calibre        
DP -         
ET -         
KW -         
LA - por        
L1 - file:\\\S:\Calibre\CalibreZotero\Ackerman, Diane\The Zookeeper’s Wife (5557).pdf
M1 -         
M2 - S:/Calibre/CalibreZotero/Ackerman, Diane/The Zookeeper’s Wife (5557).pdf        
N1 -         
N2 -         
NV -         
PB - Norton        
RN -         
RN -         
RN -         
RN -         
RN -         
RN -         
RN -         
RN -         
RN -         
RN -         
SN - 9780393069358        
SP -         
ST -         
T1 - The Zookeeper’s Wife        
T2 -         
UR -         
VL -         
Y2 -         
ER -


If you wish to manually change anything within the attached .zip plugin file, search for "D:/Livros do Doutoramento/A. Attrill/The Manipulation of Online Self-Pre (595)/The Manipulation of Online Self - A. Attrill.pdf" in the same .py file that you were previously playing with, zmi_dialog.py. However, removing or adding "file:///" or "file:\\\" makes no difference in my testing, because I am starting with a Zotero lacking any of my test data, whereas you are exporting your test data and then immediately re-importing it.

In short, you want to use the ZMI RIS file to automatically link/attach your Calibre .pdf files within Zotero. That would be wonderful if it worked, but as far as my testing can determine, the Zotero input adapter for RIS files does not support that unless it is doing what you did (export an existing attachment to an RIS file and then immediately re-importing it).

This version is just for you to manually download. I have not officially published it to Calibre yet.

Added: you likely corrupted your "Zotero Metadata Importer.json" file for its value for the key of "L1". You should open that file with a good UTF-8 enabled text editor, delete the entire L1 line, save, and exit. When you next run ZMI, it will default L1 to the proper value, "{path}", automatically. If you read the ToolTips for the ZMI RIS Export Tab, you will understand why you cannot add random colons in those values.



DaltonST
Attached Files
File Type: zip zmi_development.zip (58.0 KB, 259 views)

Last edited by DaltonST; 04-04-2018 at 01:32 PM. Reason: .zip file replaced with a tweak version 1.0.54
DaltonST is offline   Reply With Quote