Command line execution

GCstar could perform some operations from the command line without launching the whole graphical interface. It could be useful to do these tasks from shell-script or time-initiated jobs. There are features to do importation, exportation and download.

Available options

| Top |

To use all of these features, there is mandatory option, -x or --execute. This will tell GCstar to run in non-interactive mode.

Then there are other options listed below. Some of them could be used in a short or long form. All of them also have a parameter that should follow them. If the parameter for an option contains some white spaces, some quotes should be used (according to your shell conventions).

Available options

Short option Long option Description
-c --collection One of these values to specify the kind of collection to use: GCfilms, GCgames, GCbooks or the name of a user-defined collection.
-w --website The name of a website plugin as it appears in GCstar. The available ones depend on the collection type.
-i --import One of the available import plugins: “Ant Movie Catalog”, CSV, DVDProfiler, GCfilms, “Names list”, .tar.gz, Tellico
-e --export One of the available export plugins: CSV, HTML, SQL, .tar.gz, XML, Tellico. If none is specified, the GCstar native format will be used for output.
-f --fields The path to a file that contains the list of fields to use for plugins that need it. This file may be generated from GCstar’s graphical interface in the dialog window used to select the fields to import/export (e.g. for CSV plugin).
--importprefs Some import plugins have preferences that could be set. The value for this option is a string made of “key⇒value” comma separated.
--exportprefs Some export plugins have preferences that could be set. The value for this option is a string made of “key⇒value” comma separated.
--download Used to specify the text that should be searched on the website indicated by -w
--list-plugins List all the plugins available to download information. You must also specify a collection type to use using -c
-o --output Default behaviour is to output the result on the standard output. With this option, it will be stored in the specified file instead.

After these options, there is the last parameter, a file name. If there is no -i option, it will be considered as a GCstar file. If an import plugin is specified, this file will be imported with this one.

Please note that if the --download is present, the input file will be ignored. The input data will then be information downloaded from the website. Also with this option, the -w option becomes mandatory.


| Top |

Export a book collection to HTML using Shelf template and with “My Books” as the page title. The original collection is in books.gcs while the generated file will be in books.html.

gcstar -x -e HTML --exportprefs “template=>Shelf,title=>My Books” -o books.html books.gcs

Generate a HTML page (movies.html) from an Ant Movie Catalog file (movies.amc). Template used is Tian, the page title will be “My Movies” and the images will have an height of 160 pixels.

gcstar -x -i “Ant Movie Catalog” -e HTML --exportprefs “template=>Tian,title=>My Movies,imgHeight=>160” -o movies.html movies.amc

Search all the video games related to “The legend of Zelda” on GameSpot website. The output is in Tellico format. So this may be used as an external source for data importing in Tellico.

gcstar -x -w GameSpot -c GCgames -e Tellico --download “The legend of Zelda”

Export a movie collection to CSV format. The list of fields to use is in a file which name is fields.

gcstar -x -e CSV -o movies.csv -f fields movies.gcs

en/execution.txt · Last modified: 28/02/2010 23:22 by Tian

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