Loss of local file links

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Loss of local file links

Will Monroe
Hello,

I'm using Bibdesk 1.3.19 on MacOS 10.5.6.  I have a rather large .bib  
file with a little over 600 entries.  I am trying to restore the links  
in my bibtex citations to locally saved PDF files.  I understand that  
Bibdesk versions 1.3.13 and higher use new file fields that appear as  
'Bdsk-File-N' where N is a number.  For example, in my .bib file I  
have the following entry:

@article{WoutersTabbersPaas2007,
        Author = {Wouters, Pieter and Tabbers, Huib and Paas, Fred},
        Date-Added = {2008-10-25 17:45:09 -0500},
        Date-Modified = {2008-12-10 17:36:37 -0600},
        Journal = {Educational Psychology Review},
        M3 = {10.1007/s10648-007-9045-4},
        Number = {3},
        Pages = {327--342},
        Title = {Interactivity in Video-based Models},
        Ty = {JOUR},
        Volume = {19},
        Year = {2007},
        Bdsk-File-1 =  
{YnBsaXN0MDDUAQIDBAUGCQpYJHZlcnNpb25UJHRvcFkkYXJjaGl2ZXJYJG9iamVjdHMSAAG
GoNEHCFRyb290gAFfEA9OU0tleWVkQXJjaGl2ZXKoCwwXGBkdJCVVJG51bGzTDQ4PEBEUViR
jbGFzc1dOUy5rZXlzWk5TLm9iamVjdHOAB6ISE4ACgAOiFRaABIAGWWFsaWFzRGF0YVxyZWxhdGl2ZVBhdGjSDRobHFdOUy5kYXRhgAVPEQGCAAAAAAGCAAIAAANIREQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADDWjPESCsAAAAIym0aV291dGVyc1RhYmJlcnNQYWFzMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWPULcTnIKcAAAAAAAAAAAAEAAIAAAkgAAAAAAAAAAAAAAAAAAAABnBhcGVycwAQAAgAAMNaiCQAAAARAAgAAMTnZvcAAAABAAwACMptAAi6XwAAeYgAAgAwSEREOlVzZXJzOldpbGw6cGFwZXJzOldvdXRlcnNUYWJiZXJzUGFhczIwMDcucGRmAA4ANgAaAFcAbwB1AHQAZQByAHMAVABhAGIAYgBlAHIAcwBQAGEAYQBzADIAMAAwADcALgBwAGQAZgAPAAgAAwBIAEQARAASACxVc2Vycy9XaWxsL3BhcGVycy9Xb3V0ZXJzVGFiYmVyc1BhYXMyMDA3LnBkZgATAAEvAAAVAAIAC///AADSHh8gIVgkY2xhc3Nlc1okY2xhc3NuYW1loyEiI11OU011dGFibGVEYXRhVk5TRGF0YVhOU09iamVjdF8QLS4uLy4uLy4uLy4uL3BhcGVycy9Xb3V0ZXJzVGFiYmVyc1BhYXMyMDA3LnBkZtIeHyYnoicjXE5TRGljdGlvbmFyeQAIABEAGgAfACkAMgA3ADoAPwBBAFMAXABiAGkAcAB4AIMAhQCIAIoAjACPAJEAkwCdAKoArwC3ALkCPwJEAk0CWAJcAmoCcQJ6AqoCrwKyAAAAAAAAAgEAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAr8=},
        Bdsk-Url-1 = {http://dx.doi.org/10.1007/s10648-007-9045-4}}

However, despite the presence of this field it now fails to link to  
the locally-saved PDF.  The location of the PDF has not changed.  
There is also a phantom icon in the side bar with a question mark that  
has the correct file name but does not actually link to the PDF.  This  
has happened for most but not all of my bibtex entries.

I have tried using the "fill the Local-Url field with the first linked  
file" script on the wiki but was unsuccessful in restoring the links.  
I'm not quite sure how to proceed in troubleshooting this problem.  
I'm hoping to avoid a tedious manual task of re-linking each file.

I've been a heavy Bibdesk user for two years.  I would appreciate any  
help in getting closer to a solution.

Thanks,

Will









------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Adam R. Maxwell

On Jan 24, 2009, at 11:21 AM, Will Monroe wrote:

> I am trying to restore the links
> in my bibtex citations to locally saved PDF files.  I understand that
> Bibdesk versions 1.3.13 and higher use new file fields that appear as
> 'Bdsk-File-N' where N is a number.

This is correct, and it was designed to avoid problems like the one  
you're seeing, so this is disturbing.

> However, despite the presence of this field it now fails to link to
> the locally-saved PDF.  The location of the PDF has not changed.

Has the location of your .bib file changed?  Have you switched  
computers or hard drives?  Is your home directory on a server?

> There is also a phantom icon in the side bar with a question mark that
> has the correct file name but does not actually link to the PDF.  This
> has happened for most but not all of my bibtex entries.

If you hover over that question mark icon with the mouse pointer, does  
a path show up in the tooltip?  If so, does it make sense?

thanks,
Adam


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Adam R. Maxwell

On Jan 24, 2009, at 9:52 AM, Adam R. Maxwell wrote:

>> There is also a phantom icon in the side bar with a question mark  
>> that
>> has the correct file name but does not actually link to the PDF.  
>> This
>> has happened for most but not all of my bibtex entries.
>
> If you hover over that question mark icon with the mouse pointer,  
> does a path show up in the tooltip?  If so, does it make sense?

If it helps, the path in the reference you posted is

../../../../papers/WoutersTabbersPaas2007.pdf

and this should be relative to the .bib file.  We still need to know  
why the aliases aren't working.

thanks,
Adam


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Will Monroe
In reply to this post by Adam R. Maxwell


I am trying to restore the links
in my bibtex citations to locally saved PDF files.  I understand that
Bibdesk versions 1.3.13 and higher use new file fields that appear as
'Bdsk-File-N' where N is a number.

This is correct, and it was designed to avoid problems like the one you're seeing, so this is disturbing.

However, despite the presence of this field it now fails to link to
the locally-saved PDF.  The location of the PDF has not changed.

Has the location of your .bib file changed?  Have you switched computers or hard drives?  Is your home directory on a server?

I rebuilt my machine and reinstalled Bibdesk.  I placed all my PDFs in the same location I have been using for years:  ~/papers.  I moved my .bib file though.  However, I've moved my .bib file previously without running in to any problems.  I always set the autofile settings to "file papers in fixed location" using the location I mentioned above.



There is also a phantom icon in the side bar with a question mark that
has the correct file name but does not actually link to the PDF.  This
has happened for most but not all of my bibtex entries.

If you hover over that question mark icon with the mouse pointer, does a path show up in the tooltip?  If so, does it make sense?


When I hover over the question mark icon I don't get get a path but I do get the PDF file name with extension:  WoutersTabbersPaas.pdf

If it helps, the path in the reference you posted is

../../../../papers/WoutersTabbersPaas2007.pdf

and this should be relative to the .bib file.  We still need to know why the aliases aren't working.

Now I think I understand.  The location of the .bib file relative to the PDF has indeed changed.  Could I restore the links by placing my .bib file back in location implied in the reference?  That would be a temporary solution as I will need to move the .bib file from time to time.  Is there a way to create an absolute reference to the PDF?

Thanks for your help!

Will

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Adam R. Maxwell

On Jan 24, 2009, at 1:17 PM, Will Monroe wrote:

>
>> If it helps, the path in the reference you posted is
>>
>> ../../../../papers/WoutersTabbersPaas2007.pdf
>>
>> and this should be relative to the .bib file.  We still need to  
>> know why the aliases aren't working.
>
> Now I think I understand.  The location of the .bib file relative to  
> the PDF has indeed changed.  Could I restore the links by placing  
> my .bib file back in location implied in the reference?  That would  
> be a temporary solution as I will need to move the .bib file from  
> time to time.  Is there a way to create an absolute reference to the  
> PDF?
Yes, try moving the .bib file back.  Open it up in BibDesk, then re-
save the file to update the aliases (assuming they're correct at this  
point, of course).  You should then be able to move the .bib file  
anywhere you want.

Let us know how it goes!

--
Adam



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Christiaan Hofman

On 24 Jan 2009, at 8:26 PM, Adam R. Maxwell wrote:

>
> On Jan 24, 2009, at 1:17 PM, Will Monroe wrote:
>>
>>> If it helps, the path in the reference you posted is
>>>
>>> ../../../../papers/WoutersTabbersPaas2007.pdf
>>>
>>> and this should be relative to the .bib file.  We still need to  
>>> know why the aliases aren't working.
>>
>> Now I think I understand.  The location of the .bib file relative  
>> to the PDF has indeed changed.  Could I restore the links by  
>> placing my .bib file back in location implied in the reference?  
>> That would be a temporary solution as I will need to move the .bib  
>> file from time to time.  Is there a way to create an absolute  
>> reference to the PDF?
>
> Yes, try moving the .bib file back.  Open it up in BibDesk, then re-
> save the file to update the aliases (assuming they're correct at  
> this point, of course).  You should then be able to move the .bib  
> file anywhere you want.
>
> Let us know how it goes!
>
> --
> Adam
>

One more piece of advice: add a Local File column to the main table.  
If there is a missing file you'll see a red paperclip in that column.

Also, whenever you move either a linked files or the .bib file, make  
sure you save the .bib file afterwards, to update all information for  
the linked files. You can change one part of the info, but when you're  
changing several parts at the same time (like your system AND the  
relative location of the .bib file), the links have a big change of  
breaking. Remember that an absolute path is relative to the root, not  
your home folder.

Christiaan


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Will Monroe


> One more piece of advice: add a Local File column to the main table.
> If there is a missing file you'll see a red paperclip in that column.

Yes, I use this now; very useful.

>
> Also, whenever you move either a linked files or the .bib file, make
> sure you save the .bib file afterwards, to update all information for
> the linked files. You can change one part of the info, but when you're
> changing several parts at the same time (like your system AND the
> relative location of the .bib file), the links have a big change of
> breaking. Remember that an absolute path is relative to the root, not
> your home folder.

Thanks.  I appreciate the help.

Will

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Will Monroe
In reply to this post by Christiaan Hofman

On Jan 24, 2009, at 1:37 PM, Christiaan Hofman wrote:

> Also, whenever you move either a linked files or the .bib file, make
> sure you save the .bib file afterwards, to update all information for
> the linked files. You can change one part of the info, but when you're
> changing several parts at the same time (like your system AND the
> relative location of the .bib file), the links have a big change of
> breaking. Remember that an absolute path is relative to the root, not
> your home folder.

Christiaan,

I understand the distinction between absolute and relative paths but  
I'm not sure how saving the .bib file after moving it updates the  
information for the linked files (PDFs).  I'd like to avoid this  
problem in the future.  Is there something in the wiki or help pages  
that will explain how this works?  Again, I've never run into this  
problem before despite the movement of my .bib files so I'm in the dark.

Thanks,

Will

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Adam R. Maxwell

On Jan 24, 2009, at 1:56 PM, Will Monroe wrote:

> I understand the distinction between absolute and relative paths but
> I'm not sure how saving the .bib file after moving it updates the
> information for the linked files (PDFs).

The Bdsk-File entries store Mac OS aliases, which contain a file ID  
and absolute path.  If you reformat your volume, the file ID is no  
longer valid; if you change your directory layout, the path may no  
longer valid.  Bdsk-File entries also store a relative path, which is  
used if the alias is broken.

If you break all of these at once, you'll end up with a question mark  
icon.  Once you can get a valid file icon (using the temporary layout  
I mentioned offlist), saving the file should update the alias records  
for your new volume layout.  You can then move the .bib file in  
Finder, and the next time you save it the relative paths will be  
updated.

The likely problem is this:

1) reformat and restore everything to the same location
2) open .bib file; aliases are broken, but it looks fine
    since relative paths were used
3) move .bib file in Finder
4) open .bib file; relative paths are now broken as well

Maybe there could be a warning if aliases were updated, but that could  
be annoying if it happens in "normal" usage.  I'm not sure if that's  
known at file open time...

--
Adam


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Christiaan Hofman
In reply to this post by Will Monroe

On 24 Jan 2009, at 8:56 PM, Will Monroe wrote:

>
> On Jan 24, 2009, at 1:37 PM, Christiaan Hofman wrote:
>
>> Also, whenever you move either a linked files or the .bib file, make
>> sure you save the .bib file afterwards, to update all information for
>> the linked files. You can change one part of the info, but when  
>> you're
>> changing several parts at the same time (like your system AND the
>> relative location of the .bib file), the links have a big change of
>> breaking. Remember that an absolute path is relative to the root, not
>> your home folder.
>
> Christiaan,
>
> I understand the distinction between absolute and relative paths but
> I'm not sure how saving the .bib file after moving it updates the
> information for the linked files (PDFs).  I'd like to avoid this
> problem in the future.  Is there something in the wiki or help pages
> that will explain how this works?  Again, I've never run into this
> problem before despite the movement of my .bib files so I'm in the  
> dark.
>
> Thanks,
>
> Will

The data blobs you see contains various different references to the  
linked files, to make it more reliable. It contains a relative path  
and an alias. The alias contains information about a full path and a  
(persistent) file ID (and perhaps more info). When you move the .bib  
file or a linked file, only part of that information will remain  
valid, which means that the links are weaker. For example if you would  
then make another change, the link could break. This is what you  
experienced, because the aliases probably became invalid when you  
rebuilt your system, and the relative paths became invalid when you  
moved the .bib file to a different (relative) location. When you moved  
the .bib file in the past, at least the aliases remained valid. When  
you save the .bib file after changing either the location of the .bib  
file or the location of a linked file, the full link information will  
be updated and saved, so you won't have partially invalid links.

If you want to move the .bib file it's much safer to do this using  
BibDesk using Save As. This also gives you a backup in the old  
location in case things go wrong.

Christiaan


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Will Monroe

On Jan 24, 2009, at 2:16 PM, Christiaan Hofman wrote:

> The data blobs you see contains various different references to the
> linked files, to make it more reliable. It contains a relative path
> and an alias. The alias contains information about a full path and a
> (persistent) file ID (and perhaps more info). When you move the .bib
> file or a linked file, only part of that information will remain
> valid, which means that the links are weaker. For example if you would
> then make another change, the link could break. This is what you
> experienced, because the aliases probably became invalid when you
> rebuilt your system, and the relative paths became invalid when you
> moved the .bib file to a different (relative) location. When you moved
> the .bib file in the past, at least the aliases remained valid. When
> you save the .bib file after changing either the location of the .bib
> file or the location of a linked file, the full link information will
> be updated and saved, so you won't have partially invalid links.
>
> If you want to move the .bib file it's much safer to do this using
> BibDesk using Save As. This also gives you a backup in the old
> location in case things go wrong.
>
> Christiaan

Thanks, Christiaan.   This is a very clear explanation.  I appreciate  
the detail that went into designing the newer Bdsk-File field with its  
redundant location and ID information.  Thanks for all the hard work  
on Bibdesk.  Using Latex with Bibdesk and Textmate has made writing  
much, much more efficient.

Best,

Will

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Loss of local file links

Adam R. Maxwell
In reply to this post by Adam R. Maxwell

On Jan 24, 2009, at 12:16 PM, Adam R. Maxwell wrote:

> Bdsk-File entries also store a relative path, which is used if the  
> alias is broken.

Attached is a trivial Python script that dumps the relative path from  
a Bdsk-File field.  This is basically what I used to extract the  
relative path from Will's example entry, so others may find it useful  
for debugging.

--
Adam






------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

read_bdsk_file.py (1015 bytes) Download Attachment
smime.p7s (3K) Download Attachment