ZotFile - Advanced PDF management for Zotero
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
This discussion has been closed.
Can you explain the last part of your request?
p id="zotfile-data" style="color: #cccccc;" title="{"lastmod":1421173362000,"mode":1,"location":"[BaseFolder]\\Industrial and Organizational Psychology_1_1_52-55_2008_Dalal_Brummel_Wee.pdf","projectFolder":""}"
The pdf is located here in the file system:
C:\Users\Brenton\AppData\Roaming\Zotero\Zotero\Profiles\egbkrqal.default\zotero\storage\NICU6QHI\Industrial and Organizational Psychology_1_1_52-55_2008_Dalal_Brummel_Wee.pdf
Note though, the failure to rename the pdf is not necessarily tied to the tablet functionality. I don't usually use the tablet feature, and the renaming fails whether it is disabled or enabled. This occurs for all pdfs, not just the one I referenced.
I reverted this commit, and the problem went away. Renaming began to work correctly
Thanks for the suggestion! The issue was using "reportNumber" and "" (to create a blank field) in my custom wildcards. Renaming is working now.
TypeError: anno.color is undefined
(chrome://zotfile/content/zotfile.js, 3750
Running Firefox 35.0 on Mac Os X 10.6.8.; Zotero 4.0.25.2.; Zutilo 1.2.10; Poppler 1.1. Poppler is selected for extraction. The PDF producer is: Mac OS X 10.6.8 Quartz PDFContext. PDFs are attached in the default location. The library is not synched.
Created a Debug ID D1158390013
I have been using Zotfile for extractions successfully in this configuration. But, recently I updated to the latest version of Zotfile and Zotero when I had to do a complete reset and installation of Firefox. Not sure if that is a factor.
and then moved to this forum as directed.
The answer is that the issue with extractions is related to the update to Zotfile. Extractions work now using pdf.js instead of Poppler.
To do this: select "Extract Annotations using pdf.js" in the advanced settings of the ZotFile preferences.
bwiernik: When I understand things correctly, your problem with related with user-defined wildcards and not a zotfile bug, right? It's easy to make mistakes with user-defined wildcards. Zotfile does not check whether they are correct at all. That would be good but is not going to happen anytime soon.
EileenClancy: I think I know what the problem is and already fixed it. The development version on github includes the changes and I will submit as soon as the other problems are fixed. Until then, you can switch to pdf.js-based extraction, which is much better than it used to be and often outperforms the poppler-based extraction.
pchrapka: Do you still have the same problem? Can you report more details? Seems to be unrelated to bwiernik's issue.
The renaming rule of zotfile is very useful but I want to set the wildcards options as only first pages.
Here is the example..
{%s_}{%y_}{%v_}{%f_}{%F}
Carbon_2013_53_286-291_TanX.pdf
Is there any method to rename only first page like this?
Carbon_2013_53_286_TanX.pdf
Thanks for an amazing tool. I have a feature request: it would be great to have an option to choose what to extract (underlined citations, or only notes) from PDFs.
I don't know how the fdf stuff in pdf-annotations is structured, so this might not be possible...
Regards
David
Be careful thought. It's really an advanced feature and it's easy to make mistakes.
grbr, that wouldn't be very hard to implement but I won't get to it anytime soon. I am open to pull-requests though.
Working version:
lastmod{1414087374000}; mode{1}; location{[BaseFolder]/@To Skim/Kokkala_Särkkä - 2014 - Combining Particle MCMC with Rao-Blackwellized Monte Carlo Data Association for.pdf}; projectFolder{/@To Skim}
Problem:
lastmod{1410990675235}; mode{1}; location{[BaseFolder]\@To Skim\Whitfield-Gabrieli, Nieto-Castanon - 2012 - Conn.pdf}; projectFolder{\@To Skim}
seems like the path is the issue, just the last slash before the file name. this is the error i get for the last one:
Zotfile Error
Unknown error!
Zotfile Error
The file "/home/phil/Dropbox/Papers/@To Skim\Whitfield-Gabrieli, Nieto-Castanon - 2012 - Conn.pdf" does not exist
First of all (and let us not forget) thanks for a fabulous add-on, makes my life so easy!
Now, for a fairly major problem with exporting attachments to tablet using 4.1.2 (updated to 4.1.3 from GitHub but same problem persists) as reported by pchrapka above. I export with Zotero subcollections as folders.
The problem manifests itself by the fact that empty folders with the name of the PDF file (which is not exported) is created for random files. So if I want to export a file "Jones - Title of paper (2013)" (this is my format) I get an empty folder with this name, and no PDF file inside it, or at the same level.
If I retry the export (without resetting anything), it will often work! But then some other files in another subcollection will fail later.
If I remove the _tablet tag and delete all files/folders in the export folder, and try again from scratch it is not always the same files that fail! For instance, I had a Zotero subcollection with 31 attachments, first attempt 2 failed, second clean attempt, 3 failed, two of the same plus one other attachment. In another folder the same attachment failed repeatedly, and in a third it worked the second time for all. So quite strange...
This is all on a new install of ZotFile, but all these files exported without problem on my older laptop using an older version of ZotFile...
So, 4.1.3 is not quite there yet...
Let me know if I can do more to help find the problem
A
Otherwise it's hard to do something about it.
I tried 4.1.3 on linux and it solved my problem. Thanks for looking into this!
I changed the renaming preference of Zotfile to this {%t}{_%a}{_%y}, but when I click "Rename file from parent metadat", it only renames to this format: {%a-}{%y-}{%t}. I have never set up this format anywhere but it's always doing this.
Although when I click "Update" button in Zotfile preference, it's showing the correct format.
I tried uninstalling and re-installing all. Same thing happens.
Basically, it happens if you have an attachment that has not *already* been renamed to the Zotfile format specified when you try to save it to a tablet. In my case I use two computers and sync via the paid Zotero option, and on the second computer I have not installed Zotfile. What seems to happen is that Zotfile stores the the non-renamed filename, then renames it, and then tries to copy the file with the original filename, not the renamed file.
Have a look at two screenshots I put in this file: http://bergh.fm/zotero.jpg
Should be simple to fix I guess :-)
A
Yeah I checked. It's unchecked.
I solved the problem by editing the code. Here's my patch. https://github.com/sohamm17/zotfile/commit/2f433a43cea374bc82bd196e6d9f66c25ee804d9
I don't know if it will be accepted or not. However, I think we should allow people to rename file in-place.
Does someone could help with regex? (I hate writing those things...)
So I want
a) Having a 2-digits year
I got my 2 last digits by
"function": "replace",
"regex": "[0-9]{2}([0-9]{2})",
"replacement": "$1",
"flags": "g"
But my problem is that I still have day and month printed. How I remove it?
b) Remove completely space in publication title.
I found this regex in internet, but doesn't work for me
"function": "replace",
"regex": "(/ /g, '')",
Thanks and sorry for my knowledge's lacks...
Mel
So I copy here the final result, in case someone else is interested to those renaming personnalization.
"6": {
"field": "date",
"operations": [
{
"function": "exec",
"regex": "\\b\\d{2}(\\d{2})\\b",
"group": "1"
}
]
},
"7": {
"field": "journalAbbreviation",
"operations": [
{
"function": "replace",
"regex": "\\s",
"replacement": ""
}
Mel