#1 2016-12-07 23:35:57

Choromanski
New member
Registered: 2016-12-07
Posts: 2

Importing .csv file through console

I am having a lot of trouble importing a .csv file into gcstar via the console.
This is what I have so far:

Code:

gcstar -x -i CSV -f Episodes --importprefs "sep=>;,charset=>utf8" -o TVEpisodes.gcs TVEpisodes.csv

What am I doing wrong?

Offline

 

#2 2016-12-09 14:08:36

kerenoc
Member
Registered: 2016-03-19
Posts: 97
Website

Re: Importing .csv file through console

According to the manual, it's necessary to tell GCstar the model to be used to create the collection with additional parameters

--collection GCTVepisodes

Hope this helps.

Offline

 

#3 2016-12-11 20:04:25

Choromanski
New member
Registered: 2016-12-07
Posts: 2

Re: Importing .csv file through console

kerenoc wrote:

According to the manual, it's necessary to tell GCstar the model to be used to create the collection with additional parameters

--collection GCTVepisodes

Hope this helps.

I am unable to get this to work, what is the entire format that you would use?

Offline

 

#4 2016-12-12 09:16:35

kerenoc
Member
Registered: 2016-03-19
Posts: 97
Website

Re: Importing .csv file through console

If the import is working using the GUI application, maybe you should check the fields that are used and that should appear in your "Episodes" file?

Offline

 

#5 2016-12-13 18:13:36

kerenoc
Member
Registered: 2016-03-19
Posts: 97
Website

Re: Importing .csv file through console

I succeeded to make the command line import work by modifying the main "gcstar" script.

It was importing the CSV file before reading the file containing the fields to import! Just move the line

Code:

    $execution->setFields($fields) if $fields;

before the line (number 253) containing

Code:

    if ($ARGV[0])

Note that if you're using the Windows binary distribution of gcstar, the "gcstar" script is not used and you won't be able to correct this bug.

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.