Globally modify locations of linked files?

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.

Globally modify locations of linked files?

Postby PauHana658 » Wed Oct 01, 2008 8:02 pm

So far, DVDpedia has been working wonderfully. Genuinely useful, not just a pretty list. I've now decided to commit the rest of my movie collection to DVDpedia, but this will entail moving a boatload of media files from a couple of small external drives to a larger dedicated external drive (yet to be purchased), which will break the associated links in DVDpedia. I know that I can simply modify the link itself to reflect the new location, but we're talking several hundred files now, and manually changing each link would be tedious and prone to errors.

Is there some way of doing this globally? All I need to change is the root volume name, for example, from "file:///Volumes/iPhone media/Casablanca.m4v" to "file:///Volumes/Movies/Casablanca.m4v." A global find and replace would be ideal, replacing "iPhone media" with "Movies". Does such a feature exist? If not, can AppleScript or Automator be used to accomplish this?

If not, is there some way to do this without manually changing the link? In the "Edit DVD/Links" window, there's a button for "Move," but while that does automate the link modification process, it also moves the file to the DVDpedia folder, which not quite what I want to do. If I could specify in the Preferences where this "Move" action moved the file, that would save some time, but it would still be a lengthy process.

Really, a Find/Replace function limited to modifying only the links would be the best way to accomplish this. I imagine that other people would also like to have this capability, if not now, then down the road, as they add more media or need to replace old drives.

Thanks!
PauHana658
Bruji Friend
Bruji Friend
 
Posts: 19
Joined: Sat Sep 20, 2008 8:43 pm
Location: Kobe, Japan

Re: Globally modify locations of linked files?

Postby Conor » Thu Oct 02, 2008 3:26 pm

There is no fInd and replace in DVDpedia, but we have it on the feature request list. In the meantime you will have to modify the database file directly. It's stored in SQL format and can be accessed using the Terminal program. Read this post for the SQL syntax for replacing a link url how to. Also backup your database file before starting (~/Library/Application Support/DVDpedia/Database.dvdpd). In this case the replace would be '/iPhone media/' for '/Movies/' include the slashes so you don't accidentally catch "Movies" as part of a title or folder.
User avatar
Conor
Top Dog
 
Posts: 5238
Joined: Sat Jul 03, 2004 12:58 pm

Re: Globally modify locations of linked files?

Postby Alexôme » Fri Oct 17, 2008 3:34 pm

Conor wrote:but we have it on the feature request list.


Does this mean that the link path will adapt to a file's location, when it is moved? Right now, in Bookpedia, links become obsolete after a file is moved to a new location in the Finder.
Alexôme
Contributor
Contributor
 
Posts: 9
Joined: Wed Jun 25, 2008 6:23 am
Location: Frechen, Germany

Re: Globally modify locations of linked files?

Postby Conor » Sat Oct 18, 2008 9:15 am

I meant "find and replace" is on the feature request list. To integrate the ability to modify only a part of a several links at once without having to use SQL. But having the links not become obsolete is also on the feature request list, this is a very tough technical problem. Bookpedia would have to register for all the file changes going on and match them against links to see if it needs to update itself, of course it would have to be running or ask the system for all the file changes since the last launch. As you can imagine this can be a lot of changes and work that most users wouldn't require Bookpedia to do. Although Bookpedia could handle all this extra work with aplomb, we would like to keep Bookpedia light and speedy; hence this last feature is not in planned for the immediate future.
User avatar
Conor
Top Dog
 
Posts: 5238
Joined: Sat Jul 03, 2004 12:58 pm

Re: Globally modify locations of linked files?

Postby Alexôme » Mon Oct 20, 2008 10:12 am

Ok, I see. Well, here my thoughts on why keeping links up-to-date could be useful: I consider using Bookpedia to keep metadata about paper documents, that is, to use Bookpedia as a database for filing information. An entry in Bookpedia tells me where a book or a document is, and what the library number is. For example, Book XY is located at my local University, and has the signature 123; or an article is located in paper form in my office in container ABC.

So far so good. But should I digitize an article one day in the future (or find a PDF of it) and discard teh paper version, then I would still like to keep the record in Bookpedia, change it, and use the link feature to open the PDF.

However, if the links break when a file is moved, I guess I'll have to use another app, such as Papers (which has an iTunes-like library). I'd prefer Bookpedia though, because of the many fields about an item. So now I am figuring out if I can import Bookpedia records into Papers...
Alexôme
Contributor
Contributor
 
Posts: 9
Joined: Wed Jun 25, 2008 6:23 am
Location: Frechen, Germany

Re: Globally modify locations of linked files?

Postby Conor » Mon Oct 20, 2008 12:14 pm

If you use the "move" button in the link tabs then Bookpedia acts like Papers. The file is then organized by Bookpedia and is kept inside the Bookpedia data folder and the link will not break. Of course you can still remove the file from that folder and the link will break but no program would be able to handle that. It's not as ease that this is the default mode in Papers and no button is required. For me the ideal solution is to be organized before starting; decide I will keep all documents in a folder called BoopediaPDFs in my documents folder and manage them with Bookpedia, then I have no need to ever move them from that folder.

Papers should be able to handle the CSV or tab delimited export from Bookpedia. Remember to display all the columns for all the information that you would want included in the text file. To take the images and richer data (links) you would need to use the more robust XML (.bookpedia file, it's really a package containing an XML file with all the information and an images folder). However it's unlikely that Papers will be able to handle it without some kind of transformation.
User avatar
Conor
Top Dog
 
Posts: 5238
Joined: Sat Jul 03, 2004 12:58 pm

Re: Globally modify locations of linked files?

Postby sitenoise » Fri Nov 28, 2008 2:03 pm

I always like to bump these threads where folks are talking about using the pedias for metadata, and wanting them to do just a little bit more. It's not because of a shortcoming of the pedias per se, but a natural result from being so user-friendly, well-designed and seeming infinitely configurable. So ... don't lose focus, but don't ignore the fact that you have crafted one of the coolest databases going and ....

... just saying
User avatar
sitenoise
Addicted to Bruji
Addicted to Bruji
 
Posts: 199
Joined: Fri Mar 21, 2008 12:42 pm

Re: Globally modify locations of linked files?

Postby thajeztah » Sat Dec 13, 2008 9:20 am

I might have a solution;

What if the Pedia's would store an -alias- to the linked file inside the Pedia directory instead of storing the physical location in the database? This way renaming, moving the original file will automatically update the alias (the Finder/Mac OS X will do that for you).

I don't have experience with linking files to Pedia, but this might be a solution (maybe add the option to create aliasses automatically from within Pedia)?
thajeztah
Addicted to Bruji
Addicted to Bruji
 
Posts: 105
Joined: Wed Aug 06, 2008 5:55 pm
Location: Netherlands

Re: Globally modify locations of linked files?

Postby Conor » Sun Dec 14, 2008 7:54 am

Thank you for the alias suggestion. Will take a look at it again, but a few OS X version ago when we last tried it would cause a bit of confusion. E.i. it would show the alias instead of playing a movie file kind of issues.
User avatar
Conor
Top Dog
 
Posts: 5238
Joined: Sat Jul 03, 2004 12:58 pm


Return to PediaTalk