sqimport.pl — Squore import utility
sqimport.pl
[
option
...]
users
[
-P
|
-r
]
sqimport.pl
[
option
...]
groups
[
-m
]
The sqimport.pl script imports CSV data into the Squore database.
The script stops as soon as an error is encountered (SQL constraint violation, invalid input format, etc.), and modifications are discarded.
sqimport.pl
users
[
-P
|
-r
]
This command imports Squore users.
The CSV shall contain these columns (columns are mandatory, unless explicitly specified):
login - the login of the user.
fullname - the full name of the user.
email - the e-mail of the user.
password - the SHA-1 of the user password,
base 64 encoded, or the password in clear if the -P
option has been specified (optional).
department - the department of the user (optional).
Users have additional properties in Squore, like the number of connections, the selected locale, etc. Such properties are set to their default value.
When the -r
is set, this command imports Squore user
profiles instead. The CSV shall contain these columns (columns are mandatory):
login - the login of the user.
profile - the profile of the user.
sqimport.pl
groups
[
-m
]
This command imports Squore groups.
The CSV shall contain this column:
group - the name of the group.
When the -m
option is used, group members are
imported into Squore, and the input file shall have these columns:
group - the name of the group.
login - the login of the group member.
These options are common to all import types.
-h
host
Overrides the database host name.
-p
port
Overrides the database port number.
-d
dbname
Overrides the database name.
-u
user
Overrides the database user name.
-f
file
Set the CSV input file. If not specified, CSV data is read from the standard input.
-s
sep
Set the CSV separator. Defaults to the ';' character.
-n
The CSV file does not contain the header line.
-S
slices
Specifies the subset of columns to use, in the CSV input file, starting from 0. This can be used to reorder input columns as well. Separate column numbers with the ',' character.
-v
Turns on the verbose mode.