Page 1 of 1

(How) can we import PDFs from Finder to Bookends while preserving the inode (i.e., a "mv") or filename ("copy")

Posted: Thu Oct 01, 2020 3:25 pm
by LucCogZest
I have all my PDFs in Finder (from Papers 3). I would like to move them into Bookends in such a way as to preserve either their inode or file name. Is there a way to do that?

The best case for me would be if Bookends' import function has the option to use the equivalent of a UNIX _move_ (or Finder move) rather than just a copy (_cp_). As a move, it would not just copy the files into the Bookends folder, but move them (which would preserve the inode of course).

But if it's a copy, it would need to preserve the file name (i.e., the name of the file before the import should be the name of the file on Finder in the user's Bookends PDFs folder)

### Rationale for this

The reason is that I would like all Hook's links to my PDFs that I've created with the Hook productivity app to point to the imported (bookends) versions/copies of the file. You can think of Hook's links as Finder aliases, but they're more flexible. Hook links are robust, in that they can track a file by inode and by file name. (They can also figure in 'hooks', which are bidirectional)

1. If Bookends' import can be a move, then Hook links will continue to work (just like aliases would)
2. For the filename case (as opposed to the "move" case above), if Bookends were to preserve the filename, then after an import if he were to delete all the original PDFs, the Hook links would "attach themselves" to the imported files. Hook's mechanism works across file systems.

I have hundreds, properly thousands, of links between PDFs and various other resources, so this is critical to me... and to our customers who use Papers 3 and would like to migrate to Bookends.

I'm not merely asking on my behalf. I'm an academic but also a leading member of the Hook productivity development team. I will share what I learn here on [Hook's forum](https://discourse.hookproductivity.com/) and on a "Help" page dedicated to Bookends integration. ( Hook is compatible with (and hence enables the user to link) many apps, including Papers 3 (but not the latest Papers), Bookends and Zotero. )

### other options

If the above is not directly provided, we (at CogSci Apps Corp.) are also willing to contribute some code (AppleScript or whatever) to facilitate a graceful transition from Papers to Bookends. In that case, we'd appreciate pointers.

### sharing the solution

I'm not yet a Bookends power user, obviously; but I intend to become one :D . I do R&D on, and write books about, personal information management.

I'm looking forward to writing showcases of Bookends (https://hookproductivity.com/blog/category/showcases. ) once my transition to Bookends is complete.

Thanks for reading.

Re: (How) can we import PDFs from Finder to Bookends while preserving the inode (i.e., a "mv") or filename ("copy")

Posted: Thu Oct 01, 2020 4:47 pm
by Jon
In case you haven't seen our instructions on how to move for Papers 3 to Bookends, please see this page

https://www.sonnysoftware.com/bookends/ ... mport.html

In the first method (there are 2), you export the PDFs from Papers 3 (copies, in fact) to the Bookends default attachment folder. Once the metadata are transferred, Bookends should be able to find them. This this is what you want.

Note this important fact: Bookends does NOT store the pathname to attachments. It stores just the name. But Bookends does store the name of the default attachment folder, and any ad hoc folder from which an attachment was made and not moved to the default folder. When Bookends looks for an attachment, it searches the default folder, and if it's not found there it searches the ad hoc folders.

I hope this is clear enough for your to get the transfer to work as you want.

Jon
Sonny Software

Re: (How) can we import PDFs from Finder to Bookends while preserving the inode (i.e., a "mv") or filename ("copy")

Posted: Fri Oct 02, 2020 12:41 am
by LucCogZest
Thank you, Jon.

I've imported the references and papers into Bookends, following your instructions (minus toggling sync). The file names seem to all be preserved (method 2), and Hook is reattaching its links. I will soon verify more thoroughly to be sure, and post some tips for migrating from Papers to Bookends while preserving the links. In a nutshell, after the migration one might archive the original Papers library (in Finder) as a zip file, then delete the previous Papers Finder library folder and empty the Finder trash. Hook automatically adjusts its database link entries for each PDF, to make the links point to the corresponding entry in the Bookends Attachment folder. (that's something that Finder aliases don't match).

I'll also publish some additional notes regarding PDFs with same names, and about URL schemes.

I remember in 2015 when Papers introduced features that scrambled file names. I was stunned that they would cause PDFs to have arbitrary filenames, and I wrote about it here: [Papers 3 Wi-Fi syncing, Virtual Disk, File Naming and the 2-Second File Access Rule – CogZest](https://cogzest.com/2015/08/papers-3-wi ... cess-rule/).

So: Thank you/congratulations for ensuring the filenames are preserved during the import.