Page 1 of 1

DVDpedia: Move Field Data to Another Field

Posted: Sun Jan 08, 2012 2:11 pm
by joel
I would like a way to move the contents of one field to another field for the selected record(s).

Use case:
The "Summary" field is filled with useful information from Amazon regarding bonus features of the disc, but the movie description itself is not good, and IMDB has a better one.

I would want to move the existing "Summary" field data to another field, so that the "Summary" field is blank and can be updated from IMDB.

Another use case would be just changing the way you manage some of your data, changing its structure.

Re: DVDpedia: Move Field Data to Another Field

Posted: Sun Jan 08, 2012 2:49 pm
by sjk
I'm not sure it would be worthwhile enough to implement a new command for this instead of using Cut (or Copy) and Paste between fields in the Edit window.

Re: DVDpedia: Move Field Data to Another Field

Posted: Sun Jan 08, 2012 2:51 pm
by joel
I was thinking of wanting to do this for multiple records at once

Re: DVDpedia: Move Field Data to Another Field

Posted: Sun Jan 08, 2012 3:32 pm
by sjk
Ahh, I see how it might have more general value that way. :)

Re: DVDpedia: Move Field Data to Another Field

Posted: Mon Jan 09, 2012 11:50 am
by Nora
You can move data from one field to another for the whole database (see for example here). Otherwise the multiple edit should work for you, to add the copied data from one field into another field for many entries at once.

Re: DVDpedia: Move Field Data to Another Field

Posted: Mon Jan 09, 2012 7:58 pm
by joel
Nora wrote:Otherwise the multiple edit should work for you, to add the copied data from one field into another field for many entries at once.
I don't think you quite get what I am asking for.
Those options are to move the same data into every record.

As an example:
What I want to do is for every record, move the contents of the field "Summary" to the field "Custom Text 1".

Another way to visualize this (but completely different form a technical perspective) would be to rename the Summary field Custom Text 1, and rename the Custom Text 1 field Summary

Re: DVDpedia: Move Field Data to Another Field

Posted: Tue Jan 10, 2012 9:37 am
by sjk
This functionality sounds like what yutaro's is asking about here:

Transfer data to new custom date field [DVDPedia]

Re: DVDpedia: Move Field Data to Another Field

Posted: Tue Jan 10, 2012 12:28 pm
by Nora
Ignore my comment about the multiple edit, you're correct that this would not work for your case. Do see below that you can use multiple edit to delete the values of a field.
What I want to do is for every record, move the contents of the field "Summary" to the field "Custom Text 1".
That's exactly what's described in this thread, as linked in my previous post. In that particular thread the user is changing the path of his links so maybe that was not the ideal example but take a look at this thread or this one instead. (All of these threads refer to version 4 so you'd have to adjust the name of the database file which has changed with version 5 from Database.pediadata to Database.dvdpd.)

The following would be what you'd have to run in Terminal to move information from Summary into Custom Text 1:

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.dvdpd
update zEntry set zCustomText1 = zSummary;
.exit
Then in DVDpedia use the multiple edit to delete the value of the Summary field for all entries before updating it from whatever source you want. This can be done in the SQL with the command line but we recommend doing it in DVDpedia since it is more obvious what information you're deleting. However if you want to do it all together in SQL, it would then look like this:

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.dvdpd
update zEntry set zCustomText1 = zSummary;
update zEntry set zSummary = NULL;
.exit