10-24-2017, 02:48 PM | #136 |
Junior Member
Posts: 5
Karma: 10
Join Date: Oct 2017
Device: none
|
You made this fast and it works clean, thanks!
I've done a data copy in LibreOffice Calc from "Link Attachements" to "Extra" in the Zotero exported csv file and imported in Calibre then i let ZMI do the job Next step i used bulk metadata edit to filter urls in #zotero_extra to #temp with: Search Field: #zotero_extra Search for: http://www.sudoc.fr/(.*); http://www.worldcat.org/search\?q=no%(.*) Replace with: sudoc:\1, worldcat:\2 Destination Field: #temp options: replace, break Result Ok I get the field #temp filled with data like sudoc:147110335, worldcat:3A758470786 Now I would like to append those to the identifiers field with: Search Field: #temp Search for: (.*), (.*) Replace with: \1, \2 Destination Field: identifiers id type: * options: append, break, delimiter ", " (wo quotes) Preview seems Ok , sudoc:147110335, worldcat:3A758470786 But Apply is not making any change to identifiers... I must have missed something... Gilles |
10-24-2017, 03:24 PM | #137 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
I think the issue might possibly be that you are trying to create 2 Identifiers simultaneously from a single source field. Identifiers is a complex metadata item, which is why it is not shown in the columns available in Preferences > Add your own columns. It is stored in the database with a key of both book ID and ID TYPE (e.g. isbn or issn or sudoc) and a result field of the value for that combination of book ID and ID TYPE. See the attached image of the metadata.db table "identifiers". That should give you a visual impression of the "destination" that you actually are attempting to populate.
You could create a temporary "Comments Short-Text Like Title" Custom Column each for sudoc and worldcat, then populate each using S&R separately. Then, use S&R for each temporary Custom Column to create a single Identifier for that respective temporary Custom Column. Once both of the Identifiers have been updated, you could delete the contents of the temporary Custom Columns. Or, you could just keep the temporary Custom Columns permanently, and not make them into Identifiers. Up to you. Note that if you want to see an Identifier in the Library View, you must create a Composite Custom Column (i.e., built from other columns) with a template such as {identifiers:select(sudoc)} or {identifiers:select(worldcat)} or {identifiers:select(isbn)}. If you already have a "real" Custom Column for sudoc and worldcat, you would not need a Composite Custom Column to see their values. Your choice. As usual with Calibre, there are many ways to do something. Your personal preferences should guide you to the correct one for you. DaltonST |
Advert | |
|
10-24-2017, 07:12 PM | #138 |
Junior Member
Posts: 5
Karma: 10
Join Date: Oct 2017
Device: none
|
I've read some threads quite before so i already managed to add identifiers view from start also custom fields to view ids isolated, no problem thanks.
If amazon and google are stored in identifiers why those sudoc and worldcat should not be stored the same way? Sudoc provides localization and inter library loan, it's a basic need for students. WorldsWithoutEnd, is it some kind of model extension for automating id type web link (Sudoc is not providing one neither other public libraries i may use)? Thanks, Gilles |
04-03-2018, 03:45 AM | #139 |
Member
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
|
L1
Hi there!
Is it possible to alter the plugin so it can generate a ZIS Tag L1 so that Zotero recognizes the location of the file through {path}? Thank you. |
04-03-2018, 10:42 AM | #140 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Sure, but where do you see L1 appear in Zotero? I already have {path} in M2, and it appears in "Extras". I manually added L1 to a test ZMI RIS export file, and after changing the backslashes from / to \ for Win10, Zotero accepts the L1 without any error but does not seem to do anything with it. M2 still appears where it belongs, but nothing else seems to change. What are you seeing if you manually add L1 to your personal ZMI RIS export file?
DaltonST |
Advert | |
|
04-03-2018, 04:58 PM | #141 | |
Member
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
|
Quote:
Problems: I know nothing about this.... The L1 returns what I wanted but it puts several spaces between the two expressions. The value of {path} is not the value of the file though, so it doesn't import anything. I made an experiment exporting a RIS file with only one book from Zotero and then reloading it back to see what was in it, that is how I get to L1 and then to altering your plugin. Anyway it works but I cannot replicate it, and I tried as you can see by now... What is the value for files in Calibre as the value for path is {path}? How do I remove the spaces between the two expressions? Can you still help me? It works with the file exported from Zotero and then reloaded back to Zotero. So Zotero recognizes the instruction and acts accordingly. I even changed the direction of the slashes in the exemple I am sending you... Can you make sense of all of this? Sorry. the RIS file that works has this inside: TY - BOOK T1 - The Manipulation of Online Self-Presentation SN - 9781137483416 DO - 10.1057/9781137483416.0001 L1 - file:///D:/Livros do Doutoramento/A. Attrill/The Manipulation of Online Self-Pre (595)/The Manipulation of Online Self - A. Attrill.pdf ER - Last edited by aquiaolado; 04-03-2018 at 05:04 PM. Reason: I forgot to send you what works |
|
04-03-2018, 05:55 PM | #142 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Calibre supports 'all' ebook formats such as .epub, etc. The test I did was for an epub, which explains why I saw no results in Zotero. L1 appears to only be used for .pdf files.
When I built ZMI I reverse engineered Zotero's JavaScript import adaptor for generic RIS files with a record type of 'BOOK'. Hence, L1 was not included as a supported tag for Calibre exports since it is not generic. I set M2 as {path}, which works perfectly for real ebooks. What was the record type for your RIS file exported from Zotero that you immediately reimported? It should appear at the very top of each RIS record. I might enhance the plugin to export an L1 tag if the Calibre ebook format is pdf if you can answer the questions above and below. I would still like an answer as to where in Zotero you saw the L1 tag come to rest. What does it do for you? Exactly? DaltonST |
04-03-2018, 07:02 PM | #143 |
Member
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
|
RIS records and goal
Hi there,
Did you see the picture i sent? It has a view of each thing I did. First question's answer: The RIS record type is the one present in the record I reproduced at the end of the reply (the one that works) and is "TY - BOOK". Second question's answer: The L1 tag adds the pdf file to the record, as you can see in the picture attached. Finally, and maybe I should have stated this in the beginning, what I am trying to achieve:
|
04-04-2018, 09:18 AM | #144 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
L1 for ZMI's RIS export function (PDF Format Only)
Looks good. I will add L1 to ZMI's RIS export function for Calibre books that have a .pdf format. I should upload the new ZMI version later today.
DaltonST |
04-04-2018, 11:50 AM | #145 |
Deviser
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:
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 Last edited by DaltonST; 04-04-2018 at 01:32 PM. Reason: .zip file replaced with a tweak version 1.0.54 |
04-04-2018, 01:15 PM | #146 |
Member
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
|
Expression for L1
Hi there DaltonST,
Besides the fact that I know little about this, I think i did not explain myself well, sorry. When we are in the "ZMI: Export RIS" in the "L1" row how can i put an expression that goes like this: "file:\\\"+"{path}"+"{filename}" whereas "file:\\\" I turned it around and created a column in Calibre with the content "file:\\\" for all entries and it is called "file" and then I put {#file} in the "ZMI: Export RIS" and it returns in the RIS file after "L1 - " the expression "file:\\\" "{path}" Returns, as normal, the path of the file connected to each of the rows - but it doesn't return the filename. It just returns the path, without the filename "{filename}" I don't know how to ask Calibre for the filename. As well as path there must be an expression that returns the filename in Calibre. So the problem is not in Zotero, maybe you are misreading it. The problem is that I cannot build a full expression that redirects Zotero to the actual file I can build file:\\\ + {path} but it puts some spaces between the two expressions. And more than that I don't know how to complete it with the actual filename. Sorry. Hope you can understand me. PS: Is there a way for us to do a conference online? |
04-04-2018, 01:25 PM | #147 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
As I mentioned in my last post, you must read the ToolTips. It explains the syntax for the value fields. To combine 2 templates, you must separate them with a slash. Example: {#mysomething}/{#myotherthing}
Regardless, Zotero will not be redirected to the actual file because Zotero did not export the .ris file; it was created within Calibre. Please read my prior post. What you are trying to do appears to be a waste of time for the reasons I stated. I have tweaked the .zip file attached to the previous post. You should reinstall ZMI from that .zip file. DaltonST Last edited by DaltonST; 04-04-2018 at 01:31 PM. |
04-04-2018, 01:32 PM | #148 |
Member
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
|
build expression
I know what you are saying. I did that. I read all the instructions. I join {#file}/{path}. It returns what I want but puts spaces between the expressions. But beside that I still need {#file}/{path}/{something that would return the filename from Calibre}.
Can we speak directly? The Zotero works fine with the file you plugin/Calibre produces and with a file that was never inside zotero. If I produce the RIS file with your plugin and then alter it manually to a file that zotero does not know it works. Last edited by aquiaolado; 04-04-2018 at 01:38 PM. Reason: additional information |
04-04-2018, 01:33 PM | #149 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
You are not listening. What you are doing is a waste of time. Read my prior post.
Added: you should manually edit your exported-from-Calibre .ris file to make it how you like, and then import it into Zotero. You will see that nothing good happens for the reasons I stated. Last edited by DaltonST; 04-04-2018 at 01:38 PM. Reason: comments |
04-04-2018, 01:43 PM | #150 |
Member
Posts: 14
Karma: 10
Join Date: Mar 2018
Device: smartphone
|
It works
Sorry. I know you think I am not making sense but please give me some time and let me work with you. It does work, i just don't know how to do it, but you know how to. Can we talk directly?
|
Tags |
ris, zotero |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 495 | 10-19-2024 07:06 AM |
[GUI Plugin] Consolidate All Library Metadata (CALM) | DaltonST | Plugins | 333 | 12-15-2023 09:40 PM |
[GUI Plugin] OPML Importer (RSS feeds from feedly/google reader) | fem | Plugins | 14 | 07-19-2014 11:41 AM |
Getting custom metadata field in GUI plugin | SauliusP. | Development | 7 | 02-11-2012 02:31 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |