Import certain fields from CSV

If you need help on how to use the program
Post Reply
Melmoth
Posts: 32
Joined: 2006-08-21 21:40:11

Import certain fields from CSV

Post by Melmoth »

Hi!

After many attempts to store new IDs for my collection I finally ended up with with this idea:

Can I import certain fields from an Excel generated file like CSV (or else) just like the "get info from Imdb"? Just like creating a "fake" imdb and make AMC import data from there and add this to a bunch of movies?

I don't want to export everything --> edit --> import everything, that led to some strange effects while testing it...

I just want to export fields like "formatted title" and e.g. "framerate", then edit the "frametate" field (using Excel) and make AMC import (via F6) the new "framerate" field according to the "title" field... Is that possible?

Thanks in advance for help and this great program,

Melmoth
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hi,
It is currently not possible with the import system, though I could actually maybe add such option in the next version (it is simple, and as I rewrote the import system I can do that easily).
Anyway, to have this working currently you have to use scripting tool as you suggested. The script for doing that could be quite simple: for each movie processed, search in the CSV file the line containing the right number, then update the required field(s).
Do you have some programming knowledge?
Melmoth
Posts: 32
Joined: 2006-08-21 21:40:11

Post by Melmoth »

Thanks!

Yes, that would be a powerful feature for future releases...!

Concearning your suggestion - I'm not quite sure if I got you... so basically it's possible to write a script that searches values in CSV "tables" according to another value in that file and then updates a (pre)defined field in AMC? That's exactly what I'm looking for (and what I callled "fake" imdb). Did I get you right?

And finally - I could edit scripts if I spend some time understanding it, but my general programming knowledge is close to non-existence...

Thanks for your light-speed reply again,

Melmoth
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Melmoth wrote:Concearning your suggestion - I'm not quite sure if I got you... so basically it's possible to write a script that searches values in CSV "tables" according to another value in that file and then updates a (pre)defined field in AMC? That's exactly what I'm looking for (and what I callled "fake" imdb). Did I get you right?
Yes, you are right. You can load data from a file from within an AMC script.
I use this feature in the [UPDATE SCRIPTS] scriptfile to load a listing of the local script directory and check the files' dates.

Just define a 'TStringList' class variable and import the contents of your file with the 'LoadFromFile' procedure.

It should look similar to this example :


var
Excelcontent : TStringList;

begin
Excelcontent := TStringList.Create;
Excelcontent.LoadFromFile('c:\yourpath\yourlist.csv');
...


Now you can work with this list just like you would do with any website.
You will find some more infos in the 'script files creation' section from the AMC help file.

Melmoth wrote:And finally - I could edit scripts if I spend some time understanding it, but my general programming knowledge is close to non-existence...
... and so was mine. Learning by doing - simply the best way ;)

Good luck.
Post Reply