File Info/Metadata into CSV

Any questions? Need some help?
Post Reply
jkingaround
Posts: 5
Joined: 27 Sep 2013, 23:20

File Info/Metadata into CSV

Post by jkingaround »

Hey so I stumbled onto this program and I think it's perfect to suit my needs. I'm trying to create a .csv file to import into a MySQL database. I found the http://filebot.net/scripts/mi.groovy script and I'm wondering what the easiest way to search for metadata from IMDB and TVDB and write that to a CSV? I'd probably want 2 .csv files one for movies and one for TV. the info I'd want is the plot, genres, imdb link for movies and then TV just a plot for the show and a plot for the episode. Is this possible? Thanks.
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: File Info/Metadata into CSV

Post by rednoah »

The current script doesn't do any detection so you'll only have filename/mediainfo (not genre, imdb id, etc) data to work with.

Doing all that detection logic to the script won't be easy. Best thing would be to first rename files with filebot, and as long as xattr is enabled the files will be tagged and all the metadata will be readily available later on.
:idea: Please read the FAQ and How to Request Help.
jkingaround
Posts: 5
Joined: 27 Sep 2013, 23:20

Re: File Info/Metadata into CSV

Post by jkingaround »

i'm aware that the script doesn't do any of that. my question is (if this is possible) to make a CSV with the metadata without actually renaming anything?
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: File Info/Metadata into CSV

Post by rednoah »

Not impossible anyway. You can play with the view xattr script if that'll give u some useful information.

So doable, but quite a bit of work.
:idea: Please read the FAQ and How to Request Help.
jkingaround
Posts: 5
Joined: 27 Sep 2013, 23:20

Re: File Info/Metadata into CSV

Post by jkingaround »

Where's the documentation on xattr? I'm just wondering how to print those out to a .csv file
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: File Info/Metadata into CSV

Post by rednoah »

You can take this as a reference:
http://www.filebot.net/forums/viewtopic ... &t=5#p5394

You can learn from this one and other scripts, and then code things yourself and create .csv files the way you like.

PS: If coding is not your thing, then this is not possible for you at this point.
:idea: Please read the FAQ and How to Request Help.
jkingaround
Posts: 5
Joined: 27 Sep 2013, 23:20

Re: File Info/Metadata into CSV

Post by jkingaround »

Thanks for that. I do code which is the reason I'm looking at this as an option but the documentation is less than clear for certain things but i'll see what that does when I get a chance. Thanks.

EDIT: I took a look at it but it seems to only print if the file already has the xattr? where do they originally get set?
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: File Info/Metadata into CSV

Post by rednoah »

xattr metadata gets set when you rename files with filebot. So this will only work for collections that have already been renamed with filebot.
:idea: Please read the FAQ and How to Request Help.
jkingaround
Posts: 5
Joined: 27 Sep 2013, 23:20

Re: File Info/Metadata into CSV

Post by jkingaround »

Alright that's a problem. I dont really need to rename anything as it's already nice and human readable but I'd like to just export that metadata..
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: File Info/Metadata into CSV

Post by rednoah »

Sorry, there's no script for thug the at this point. And it'd be extremely hard.

You could try doing rename(...) calls but then passing in your own dummy rename closure that just does nothing. Chef the sample snippets for how to override the rename action.
:idea: Please read the FAQ and How to Request Help.
Post Reply