Path

7x / documentation / ez publish / technical manual / 4.x / reference / scripts / generic / updateisbn13.php (as of 4.5)


Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

updateisbn13.php (as of 4.5)

Summary

Imports the latest ISBN ranges to the database.

Location

./bin/php/updateisbn13.php/updateisbn13.php (as of 4.5)

Parameters

colors
debug
help
logfiles
no-colors
no-logfiles
quiet
siteaccess

-c, --colors

Use ANSI colors when generating debug output (default).

-d[<option>[,<option2>...]], --debug[=<option>[,<option2>...]]

Output debug information. The following options can be used to control what the debug output should include: "all" (everything), "accumulator" (accumulators), "include" (included files), "timing" (timing points), "error" (errors), "warning" (warnings), "notice" (notices).

-h, --help

Output information about the script and supported parameters.

--logfiles

Generate log files. This parameter must be used together with the debug parameter ("-d" or "--debug"). The log files (for example "warning.log") will be stored in the "var/log" directory of the eZ Publish installation.

--no-colors

Do not use ANSI colors when generating debug output.

--no-logfiles

Do not generate log files (default).

-q, --quiet

Run the script in "quiet" mode. No output will be generated.

-s <siteaccess>, --siteaccess=<siteaccess>

The siteaccess to run the script for. If omitted, the default siteaccess will be used.

Description

This script makes it possible to import the latest ISBN ranges to the database. Without this information, the system may not be able to handle ISBN-13 codes properly (refer to the documentation of the ISBN datatype for more information). Since the calculation rules for ISBN codes can be changed on a monthly basis, you may need to run the script regularly in order to keep the range information in the database up to date.

When running the script, use the "--url" parameter to tell the script where to look for the range file. By default, the database configuration of the default siteaccess will be used. You can use the optional "--siteaccess" parameter to make the script import ranges to the database that is used by a particular siteaccess. In addition, the optional "--db-database", "--db-driver", "--db-host", "--db-user" and "--db-password" parameters make it possible to combine custom database options with the database configuration of the specified (or default) siteaccess.

Examples

Example 1

php bin/php/updateisbn13.php --url=http://www.isbn-international.org/agency?rmxml=1

Import data from isbn international to the database that is used by the default siteaccess.

Example 2

php bin/php/updateisbn13.php --url=http://www.isbn-international.org/agency?rmxml=1 --siteaccess=example

Import data from isbn international to the database that is used by the "example" siteaccess.

Example 3

php bin/php/updateisbn13.php --url=http://www.isbn-international.org/agency?rmxml=1 --siteaccess=example --db-database=test

Import data from isbn international. The script will use the database configuration of the "example" siteaccess but ignore the value of the "Database" directive and use the specified custom database name instead. If the "example" siteaccess makes use of a database called "foo" on local host, the script will import ISBN ranges to the "test" database on localhost.

Example 4

php bin/php/updateisbn13.php --url=http://www.isbn-international.org/agency?rmxml=1 --db-database=test –db-user=root –db-password=secret

Import data from isbn international. The script will use the specified custom database name, user name and password, while the type of the database and the host name will still be fetched from the database configuration of the default siteaccess.

Geir Arne Waaler (10/02/2011 12:28 pm)

Geir Arne Waaler (10/02/2011 1:03 pm)


Comments

There are no comments.