How to copy (several) PDF in library to File Manager
Firefox 11/Linux Fedora 15/Zotero 3.0.3
There is a neat feature to save a PDF from (e.g.) Google search, to Zotero. I saved a bunch of PDF to my library. I need to copy them in my file manager.
I tried to Ctrl+a the PDF in the library, and to drag them in a directory of my file server. That's not working.
"Export" is not what I am looking for. "Show file" shows me the PDF in its cache directory.
How? Thanks
There is a neat feature to save a PDF from (e.g.) Google search, to Zotero. I saved a bunch of PDF to my library. I need to copy them in my file manager.
I tried to Ctrl+a the PDF in the library, and to drag them in a directory of my file server. That's not working.
"Export" is not what I am looking for. "Show file" shows me the PDF in its cache directory.
How? Thanks
In general, you can do "Show file" and then copy-paste each file where you want. But there are also other alternatives such as ZotFile, or shell scripts, or searching the local file system etc.
If you just want all PDFs, just do a search in your file manager for all PDFs within the Zotero data directory.
I now collected 10 PDF. They are in my library. How can I copy & past them (or drag them) all at once in my file manager? Can I even do it?
"Show file" will open 10 windows of my file manager. That's not fine.
--
ZotFile looks great for batch renaming, thanks for the pointer, but I am not sure I can "mouse select" several documents at once, and copy them to my file manager?
File drag-and-drop straight from the Zotero pane doesn't work on Linux.
Thank you. Is there a plan to make it work a way or another?
What Dan and mronkko are suggesting is that if you will need to do this frequently you should look into a way to have those pdfs handy outside Zotero - since pdfs are typically renamend in a straightforward fashion, having a saved search/virtual folder with all pdfs is actually a pretty quick option for that.
The PDF files I download through Zotero go to a sub-directories of "/storage/" eg. "MUHCXSN6", "QQD8CK6H"
My only problem: I want to save some of these PDF to a location on my file manager, either weekly or monthly.
I used to tag them as "PDF"; following your (their) suggestion, I created a virtual search directory. I can see all the PDF at once, but since I can't drag and drop them on my file manager, because of the bug, the files are still spread in several sub-directories of /storage/.
The only way I see (as mronkko suggested) is to $ find & copy recursively in /storage/, and to make a script of the command.
Is that correct?
What do you mean by: "since pdfs are typically renamend in a straightforward fashion" That's a user action, or some automatic renaming feature in Zotero?
A. I finally get it. But I don't think a virtual search feature exists on the light-way file managers I use (LXDE & XFE desktops), anyway, I will ask.
B. Renaming via translators and context menu: good to know.
C. How do you quote me? I use Format comments as Text. When I switch to Html, [I don't see a change] edit: it revert back to text.
http://students.washington.edu/drmccloy/resources/zoteroPDFsLinker.py
You'll need to change line 6 to match where your Zotero storage folder actually is, and line 8 to where you want the PDF "copies" to live. I put "copies" in quotes because currently it's set up to create hard links rather than copies, and there is an option in the code somewhere around line 34 to switch that to symlinks instead of hard links... but it doesn't make true copies precisely because I wrote this to prevent wasting disk space. Note that the script is not smart enough to handle file name conflicts, and depending on how long Zotero is set to keep items in the trash, it may take a while for PDFs removed from Zotero to actually disappear from the output folder.
The script probably only works on Linux since it uses the os.link() function, and has been tested with Python 2.6. It comes with the standard disclaimer: no warranty (express or implied), use at your own risk, may damage your system, etc etc etc.
Personally, I have a little shell script set up to run this every time I shut down the computer, but you can of course run it manually from the command line too.
If you don't mind, I would like to see your shell script.
https://github.com/mronkko/BuildFolderStructureForZoteroItems
I changed with my parameters :
l5. my $zoterostorage="/home/mt/.mozilla/firefox/h8e4kdp1.default/zotero/storage";
l6. my $target="home/nm/zotero";
l8. my $dbh = DBI->connect("dbi:SQLite:dbname=$zoterostorage/zotero.sqlite","",""); [do I need to change zoterostrage to zotero?]
I get this message when I run the perl script:
[mt@nh28d bin]$ mronkko_zotero.pl
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /home/mt/bin/mronkko_zotero.pl line 3.
BEGIN failed--compilation aborted at /home/mt/bin/mronkko_zotero.pl line 3.
[mt@nh28d bin]$
#! /bin/bash
python /path/to/wherever/you/put/the/python/script/zoteroPDFsLinker.py
Put the shell script wherever you want, then make a symbolic link to it in the folder /etc/rc0.d/, and name the link something like "K99zotero" (the K99 part controls the order it gets executed with respect to other shutdown scripts)
http://www.google.com/search?q="Can't locate DBI.pm"
I will also ask about mronkkro perl script, on a script forum, when I have time.
I have installed perl-DBI.
Installed Packages
Name : perl-DBI
Arch : i686
Version : 1.616
Release : 3.fc15
Size : 1.9 M
Repo : installed
From repo : fedora
Summary : A database access API for perl
URL : http://dbi.perl.org/
License : GPL+ or Artistic
Description : DBI is a database access Application Programming Interface (API) for
: the Perl Language. The DBI API Specification defines a set of
: functions, variables and conventions that provide a consistent
: database interface independent of the actual database being used.
I still fail running the script.
[mt@nh28d bin]$ perl mronkko_zotero2.pl
install_driver(SQLite) failed: Can't locate DBD/SQLite.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at (eval 3) line 3.
Perhaps the DBD::SQLite perl module hasn't been fully installed,
or perhaps the capitalisation of 'SQLite' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
at mronkko_zotero2.pl line 8
I grep the list of packages with DBI.
[mt@nh28d bin]$ yum list |grep DBI
perl-DBI.i686 1.616-3.fc15 @fedora
R-DBI.noarch 0.2.5-3.fc15 updates
perl-Apache-DBI.noarch 1.10-2.fc15 fedora
perl-Apache-DBI-Cache.noarch 0.08-9.fc15 fedora
perl-CGI-Application-Plugin-DBIC-Schema.noarch
perl-CGI-Application-Plugin-DBIProfile.noarch
perl-CGI-Application-Plugin-DBIx-Class.noarch
perl-Catalyst-Authentication-Store-DBIx-Class.noarch
perl-Catalyst-Model-DBIC-Schema.noarch 0.40-5.fc15 fedora
perl-Catalyst-Model-DBIC-Schema-tests.noarch
perl-Catalyst-Plugin-Session-Store-DBIC.noarch
perl-Class-DBI.noarch 3.0.17-9.fc15 fedora
perl-Class-DBI-AbstractSearch.noarch 0.07-11.fc15 fedora
perl-Class-DBI-AsForm.noarch 2.42-11.fc14 fedora
perl-Class-DBI-FromCGI.noarch 1.00-10.fc15 fedora
perl-Class-DBI-Loader.noarch 0.34-8.fc15 fedora
perl-Class-DBI-Loader-Relationship.noarch 1.3-14.fc15 fedora
perl-Class-DBI-Pager.noarch 0.08-10.fc15 fedora
perl-Class-DBI-Pg.noarch 0.09-11.fc15 fedora
perl-Class-DBI-Plugin.noarch 0.03-13.fc15 fedora
perl-Class-DBI-Plugin-DeepAbstractSearch.noarch
perl-Class-DBI-Plugin-RetrieveAll.noarch 1.04-10.fc15 fedora
perl-Class-DBI-Plugin-Type.noarch 0.02-13.fc15 fedora
perl-Class-DBI-SQLite.noarch 0.11-11.fc15 fedora
perl-Class-DBI-mysql.noarch 1.00-11.fc15 fedora
perl-DBI-Dumper.i686 2.01-13.fc15 fedora
perl-DBICx-TestDatabase.noarch 0.02-6.fc15 fedora
perl-DBICx-TestDatabase-tests.noarch 0.02-6.fc15 fedora
perl-DBIx-Class.noarch 0.08127-2.fc15 fedora
perl-DBIx-Class-Cursor-Cached.noarch 1.001001-1.fc15 updates
perl-DBIx-Class-DateTime-Epoch.noarch 0.07-1.fc15 fedora
perl-DBIx-Class-DateTime-Epoch-tests.noarch 0.07-1.fc15 fedora
perl-DBIx-Class-DynamicDefault.noarch 0.04-1.fc15 updates
perl-DBIx-Class-EncodedColumn.noarch 0.00010-4.fc15 fedora
perl-DBIx-Class-IntrospectableM2M.noarch 0.001001-1.fc15 updates
perl-DBIx-Class-Schema-Loader.noarch 0.07010-1.fc15 fedora
perl-DBIx-Class-Schema-Loader-tests.noarch 0.07010-1.fc15 fedora
perl-DBIx-Class-TimeStamp.noarch 0.14-3.fc15 fedora
perl-DBIx-Class-tests.noarch 0.08127-2.fc15 fedora
perl-DBIx-ContextualFetch.noarch 1.03-12.fc15 fedora
perl-DBIx-DBSchema.noarch 0.40-1.fc15 updates
perl-DBIx-POS.noarch 0.03-11.fc15 fedora
perl-DBIx-Safe.noarch 1.2.5-12.fc15 fedora
perl-DBIx-SearchBuilder.noarch 1.62-1.fc15 updates
perl-DBIx-Simple.noarch 1.35-2.fc15 fedora
perl-DateTime-Format-DBI.noarch 0.032-7.fc15 fedora
perl-HTML-FormFu-Model-DBIC.noarch 0.08002-3.fc15 fedora
perl-HTML-FormFu-Model-DBIC-tests.noarch 0.08002-3.fc15 fedora
perl-Ima-DBI.noarch 0.35-11.fc15 fedora
perl-POE-Component-DBIAgent.noarch 0.26-9.fc15 fedora
perl-POE-Component-SimpleDBI.noarch 1.27-6.fc15 fedora
perl-Tie-DBI.noarch 1.05-3.fc15 fedora
perl-XML-Generator-DBI.noarch 1.00-11.fc15 fedora
It's probably there under a different name. I should probably ask on my distribution forum. I don't have much expertise.
As suggested in this post, I am trying to run the script by mronkko to "export" items stored in Zotero: https://github.com/mronkko/BuildFolderStructureForZoteroItems
Since all of you already discussed this, I would appreciate any tip/workaround for the problem I am facing, which discussion has started in another Zotero's post today:
https://forums.zotero.org/discussion/36120/zotero-collection--subcollections-as-searchable-folders-hierarchies-in-windowsn/
Thanks in advance,
Cadu
"PDF drag and drop / copy and paste from Zotero to other apps is broken on Linux"
(Please correct the wording if necessary)
As this is a regression, according to adamsmith's 26th of April 2012 comment, I thought it should appear on GitHub to attract some attention. Even though it seems to be a problem with Linux or Firefox, I can not find any details about it, and continuing the discussion on GitHub would allow us to centralise information relevant to developpers about this issue.
Does anyone know of a bug reported for Linux or Firefox? Or any other thread in Zotero's forums?
Just for the record, before understanding the rules of issue reporting on GitHub, that was my attempt at reporting it: https://github.com/zotero/zotero/issues/491
Cheers