Zotero collection + subcollections as searchable folders hierarchies in windowsn

Hi,

For finding through one operation the exact place of the words/expressions in large amount of PDFs I use external PDF Tools (e.g. PDF Xchanger, Acrobat) to search based on folder content.

At this point, I am exporting the Zotero's collection + sub-collections (i.e. RDF or RIS with files) and then, in Windows, I select the folders to be searched using the external PDF tool.

It sounds a unnecessary workaround, since Zotero is quite powerful in smart solutions itself and has lots of handy plugins!

=> Point (a): is there any way I could create a mirror of my full library with collection and subcollections as hierarchies considering Windows hierarchical folder structure?

I mean, I don't want to copy/duplicate the PDFs from Zotero, but simulate the folder/hierarchies from the Zotero's collection/subcollections.

In this sense, it sounds the PDFs could be created as some kind of link. But it would be necessary that the external PDF tool would be able to understand/search/follow the link to execute the search properly. I already tried to search for PDF's shortcuts, and the PDF tools don't work. Instead of shortcuts, maybe Zotero would be able to create symbolic link (symlink). Actually, I am not sure if symlink would work as well, since I just heard about this stuff, but never used by myself.

Many thanks for any directions,
Cadu
  • The problem doing this with actual files is that collections aren't folders. One item can be in multiple collections, which causes all types of issues if you think about implementing this in folders.

    Symlinks would theoretically be a possibility, but they can't be created from Firefox/Zotero

    Note that Zotfile generally offers the possibility to create a folder hierarchy of PDFs based on metadata - just not on collections for the above reasons: www.zotfile.com
  • come to think of it - even Zotfile's send to tablet functionality would be a much smoother way of doing this that what you're currently doing.
  • Thanks. Indeed Zotfile's send to tablet functionality is useful for my purposes, although it creates/duplicates the PDFs, and I would love to handle everything from Zotero data structure.

    It seems the following plugin is able to create Windows folder structure based on Zotero's Collections/Subcollections and PDFs as symbolic links:

    https://github.com/mronkko/BuildFolderStructureForZoteroItems

    https://github.com/mronkko/BuildFolderStructureForZoteroItems/blob/master/BuildFolderStructureForZoteroItems.pl

    It is exactly what I need, since the PDF external tool (PDF Xchange) is able to search content from symbolic link. In this manner, it seems I could easily export a Zotero's collection for deeper searching in a couple of seconds and withouth PDFs hard copies duplicates.

    => Help: I don't have idea how to star/run a script like that in Zotero. Any tip / walk-through?
  • That's a perl script. You wouldn't run it from within Zotero (in fact, you should probably have Zotero closed when doing this). I'll assume you're on Windows. https://www.google.com/search?q=running+perl+scripts gives you a number of options. http://perl.about.com/od/gettingstartedwithperl/ss/How-To-Install-Perl-And-Run-Your-First-Script.htm is probably an ok tutorial
  • you need to install perl:
    http://www.gossland.com/perlcourse/default/install_perl
    then match those two lines to your profile:
    my $zoterostorage="/Users/mronkko/Documents/Research/Zotero Data";
    my $target="/Users/mronkko/Documents/Research/Articles";

    and resave the file. You should then be able to simply run
    perl BuildFolderStructureForZoteroItems.pl
    from the DOS console (after moving to the directory containing the script).
    Note that the script is two years old and hasn't been tested by anyone I know (except, presumably, Mikko), so no idea if it'll work at all.

    To keep this up to date, you'd probably also want to set up a chron job do run it periodically. Knowing Windows I assume that's a giant hassle but I assume it's somehow possible.
  • hey, that's actually not terrible ;)
  • Wow. Many thanks for all help.

    I'm almost there. When I ran the script based on my Zotero's profile (I thought I had to add Z:/):

    my $zoterostorage="Z:/Z_Data/Zotero/_Dados";
    my $target="Z:/Z_Data/Zotero/_Dados_symlink";

    I received the following error message (please see screen in the link):

    http://goo.gl/p11t6C

    It is pointed in prompt command some problem with line 62, which is:

    symlink($itempath,$linkpath) or die "Unable to create link";

    Any idea what is going wrong?

    Thanks,
    Cadu
  • This
    http://www.perlmonks.org/?node_id=933175
    is a couple of years old and it's worth asking on stack overflow, but it suggests that symlink isn't implemented for Perl under Windows because of Windows's sluggish adoption of symlinks (I believe they only properly landed with Windows 7, maybe Vista). Sorry!
  • by the way - mronkko's script doesn't do folder/collection hierarchies, either.
  • well, the symlink thing error might be due to permissions. You need admin privileges to create symlink. Maybe if you ran the script as admin, it would work (I'm guessing mronkko had this working). Otherwise, this may depend on what Perl you have installed. The ones I know of are ActiveState and Strawberry. Maybe you can run it under cygwin as well.
  • @aurimas - well, but mronkko is, of course, on a mac. Or do you have the symlink command working on perl for you?
  • Oops, for some reason I thought he was on Windows. I haven't checked on my end
  • Mikko, developer of QuickLook and ZotPad? nope ;) Even less likely to use Windows than me.
Sign In or Register to comment.