Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-04-2018, 12:52 PM   #151
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
You are not reading my post #20 that explains why you are wasting your time. Zotero does not support what you are trying to do. I stated why. Read my post #20 carefully.

If you wish to pursue this, you should test your ZMI .ris export file after manually changing it in a Text Editor using Search & Replace. Then, import it into Zotero.

You should contact Zotero Support as to why their RIS Import Translator, RIS.js, does not support automatically creating a link to a file attachment using the L1 tag. This is not a Calibre issue. It is a Zotero issue.
DaltonST is offline   Reply With Quote
Old 04-04-2018, 06:22 PM   #152
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Calibre File Path Not Valid URI per Zotero

aquiaolad:

I have been running Zotero in its debug mode, and have discovered that the reason that L1 is not being honored is because the Path to the Calibre Library's Book, such as "S:/Calibre/CalibreZotero/AlfredCoppel/Flight from Time (5558).pdf", is not (per Zotero itself) a valid URI.

I manually changed the L1 path for a ZMI RIS export .ris file to "https://www.mobileread.com/forums/attachment.php?attachmentid=146807&d=1456852975", which is a random .pdf file for one of my Calibre plugins stored on mobileread.com, and Zotero properly attached it after downloading it.

So, the challenge is to find a Path to a Calibre book that Zotero will view as a valid URI. If it is on the Internet, then it is valid.

Example of what did not work: S:\Calibre\CalibreZotero\AlfredCoppel\Flight from Time (5558).pdf

However, this worked perfectly: C:\Users\DaltonST\Zotero\storage\2VKJEH7F\1461.de. pdf

Zotero is written in JavaScript, and totally integrated with the Internet, so it plays by a different set of rules.

I will test using the new Calibre Server to see if pointing to that in some fashion passes the Zotero URI litmus test. I can change ZMI as necessary to facilitate a valid L1 URI.

I will look at this further until I can determine some workaround that works with Calibre, but I thought you would want to know.




DaltonST
DaltonST is offline   Reply With Quote
Advert
Old 04-04-2018, 09:21 PM   #153
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,078
Karma: 10563148
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Not sure if its relevant: when I want a URI for file, such as D:\Documents\Hart's Style Guide.pdf, I use a string such as this ==>> file:///D:/Documents/Hart%27s%20Style%20Guide.pdf

Essentially, prefix with "file:///", change back-slashes to forward-slashes, and url-encode any non-alphanumeric characters.

BR
BetterRed is offline   Reply With Quote
Old 04-05-2018, 05:39 AM   #154
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Thanks.
DaltonST is offline   Reply With Quote
Old 04-05-2018, 10:09 AM   #155
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Oh well, nothing is ever that simple.

Zotero absolutely hates Calibre's naming of subdirectories for its books, and throws an error if a perfectly valid Path in Windows and in Calibre is used if a subdirectory has anything that Zotero could possibly interpret as part of a URI that it has to make "human readable".

Extracted from Zotero's Debug History:

GOOD: Translate: Got file S:\Calibre\CalibreZotero\Ackerman, Diane\The Zookeepers Wife (5557)\qs_basic_functionality_overview (1).pdf as absolute path


BAD: Translate: File at absolute path S:\Calibre\CalibreZotero\Ackerman, Diane\The Zookeepers Wife (5557)\qs_basic_functionality_overview (1).pdf does not exist.


This is a Zotero error, since in reality, "The Zookeeper’s Wife (5557)" in Calibre is actually spelled "The Zookeeper’s Wife (5557)", but Zotero tries to prettify it, thereby ruining it by changing "Zookeeper’s" to "Zookeeper's".

Using Qt or Python to create a valid local file URI does not help matters, since Zotero will do the same thing as shown above.


Later this week I will post a new version of ZMI that copies the selected Calibre ebooks to a temporary folder with a simple folder name and with a simple temporary file name, and then points the RIS attachments specified in RIS Tags L1 (pdf) and L3 (epub, etc.) to the appropriate simple temporary files.

RIS Tag M2 "Extras" will still default to the original Calibre book path for future reference.


DaltonST

Last edited by DaltonST; 04-05-2018 at 10:13 AM.
DaltonST is offline   Reply With Quote
Advert
Old 04-05-2018, 03:57 PM   #156
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Version 1.0.55 Beta: Activated RIS Export Tag L1 for PDF file attachments

Deleted. Instead, see: Version 1.0.56 RIS Export Tag L1 for PDF file attachments

Last edited by DaltonST; 04-07-2018 at 09:52 AM. Reason: Version 1.0.56 RIS Export Tag L1 for PDF file attachments
DaltonST is offline   Reply With Quote
Old 04-06-2018, 12:52 AM   #157
aquiaolado
Member
aquiaolado began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
Thanks

Thanks for your efforts.
aquiaolado is offline   Reply With Quote
Old 04-06-2018, 01:16 AM   #158
aquiaolado
Member
aquiaolado began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
M2 for L1

DaltonST:

This is strange now.

Let me tell you what I did.

You must have changed the value of {path} because before the value of {path} did not return the full path, it returned the path without the filename.

Let me tell you what I did.

I used the Beta version, added it to Calibre

Tried to export a RIS file of one book and succeded. Then I went to Zotero and imported that file, as you said Zotero imported all the data and attached the pdf file.

I went to see the file attached and the name of the pdf was a random name composed of 4 numbers.

So everything worked has you said it would.

Then, by curiosity, I went to see the values in the RIS file. And I was surprised that it is not present the prefix "file:///". So you changed much more then only the value of {path}, also how it is presented.

Anyway I then tried to go a step further and substituted the value of L1 for the value of M2 (that has the full original path), save the file and imported it o Zotero, and it worked: it imported the file with the correct name.

Is there a way for you to let the L1 row be editable again, since {path} now delivers the full path and the way you made it doesn't require de "file:///" to be imported, it would makes things operable in a simple way.

Am I seeing this wrongly?

Thanks.
aquiaolado is offline   Reply With Quote
Old 04-06-2018, 05:06 AM   #159
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Your data just happened to work. You are lucky. I have to design for all scenarios, not just for the best-case scenario. Also, you are wrong about the number being random. It is the Calibre book id. That is shown in yellow in the example attached to my last post. It ties to M2 which is Extra in Zotero, and shows the Calibre full path of the attachment. Audit trail.

Also, file:/// is not needed at all.

Added: Zotero has plugins that will rename any or all file attachments however you please. "ZotFile" is one of those, if memory serves.


DaltonST

Last edited by DaltonST; 04-06-2018 at 08:57 AM. Reason: Info about Zotero Plugins to Rename File Attachments
DaltonST is offline   Reply With Quote
Old 04-07-2018, 09:51 AM   #160
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
RIS Export Tag L1 and L4 for PDF and Ebook file attachments

Version 1.0.57 - 2018-04-07 New: RIS Export Tag L4 for Ebook file attachments

Version 1.0.56 - 2018-04-07 New: RIS Export Tag L1 for PDF file attachments

ZMI now both imports files from Zotero into Calibre, and exports files from Calibre for import into Zotero.



DaltonST

Last edited by DaltonST; 04-08-2018 at 09:50 AM. Reason: Version 1.0.57
DaltonST is offline   Reply With Quote
Old 04-11-2018, 05:07 PM   #161
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Version 1.0.58 New: Add the Zotero Key to each just-exported Calibre book

Version 1.0.58 - 2018-04-11 New: Add the Zotero Key to each just-exported Calibre book after its import into Zotero so that the ZMI:Comparison Tab functionality may be used for both books imported from Zotero and Zotero books imported from Calibre.


See the attached example with ToolTips that explain the process.


DaltonST
Attached Thumbnails
Click image for larger version

Name:	zmi_retrieve_zkey_from_new_zotero_attachments.jpg
Views:	131
Size:	1.04 MB
ID:	163429  
DaltonST is offline   Reply With Quote
Old 08-14-2018, 11:16 AM   #162
EmilThelonius
Member
EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.EmilThelonius for a long time would go to bed early.
 
Posts: 17
Karma: 17750
Join Date: May 2016
Device: Sony DPT-RP1 and Pocketbook Touch Lux 2 and Basic
Thank you so much for your work!

I have one question: Is there a possibility to have the original files just in one directory. I use to markup the files and don't want to have them double (one being in the Zotero file directory and one being in the calibre directory)...
EmilThelonius is offline   Reply With Quote
Old 08-14-2018, 11:36 AM   #163
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,252
Karma: 100496
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Select All Books > Right Click Mouse > Remove Books > Remove All Formats from Selected Books. See the attached image.


DaltonST
Attached Thumbnails
Click image for larger version

Name:	2018-08-14 10_27_18-Window.jpg
Views:	19
Size:	39.6 KB
ID:	165588  
DaltonST is offline   Reply With Quote
Reply

Tags
ris, zotero

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Consolidate All Library Metadata (CALM) DaltonST Plugins 191 10-04-2018 10:30 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 412 04-24-2018 06:07 PM
[GUI Plugin] OPML Importer (RSS feeds from feedly/google reader) fem Plugins 14 07-19-2014 10:41 AM
Getting custom metadata field in GUI plugin SauliusP. Development 7 02-11-2012 01:31 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:29 PM.


MobileRead.com is a privately owned, operated and funded community.