Documentation Center

contentimporter convert-and-import

contentimporter convert-and-import is used to convert content files, create or modify metadata files, and import them into the Repository.

Synopsis

contentimporter convert-and-import [ -i|--inputinput-directory ] [ -o|--outputoutput-directory ] [ -r|--repository-pathrepository-path ] [ -p|--phasephase ] [ -t|--file-format-typefile-format-type ] [ -g|--reassign-ids ] [ -f|--force ] -c|--client-idclient-id -s|--client-secretclient-secret [ --help ]

Description

Import content files and, if provided, their related metadata files into the Repository. When metadata files are provided they will be modified, otherwise metadata files will be created before importing. Content files can be converted to another document type. By default only DITA content is converted: for example links to reference objects in the Repository are modified, or DITA conditional processing attributes are converted to @ishcondition attribute.

You can find options' descriptions by typing contentimporter convert-and-import --help at a command line.

Options

The options for contentimporter convert-and-import are:

-t or --file-format-type file-format-type
The format type of the files that are going to be imported. (Default: Generic)

Allowed values are:

Generic. Specifies that a file is in the native format.

Repository. Specifies that a file is exported from the Repository in the converted format.

-f or --force
Force to convert and import all files even if the last import was successful. This is equivalent to cleaning the output folder. (Default: false)
--help
Print out a short description for the command.
-i or --input input-directory
The input directory where the sources are located.

Paths that contain spaces must be enclosed in double quotes.

-o or --output output-directory
The output directory where the converted files will be placed.

Paths that contain spaces must be enclosed in double quotes.

-p or --phase phase
The phase to run when converting and importing files. (Default: Both)

Allowed values are:

Both. Specifies that files will be converted and imported.

Convert. Specifies that files will only be converted.

Import. Specifies that files will only be imported. Files have to be converted before they can be imported.

-g or --reassign-ids
Generate new identifiers for topics and maps when converting the sources. (Default: false)
-r or --repository-path repository-path
The location in the Repository where the files are going to be imported.

Paths that contain spaces must be enclosed in double quotes.

-c or --client-id
The authentication client identifier.
-s or --client-secret
The authentication client secret.

Examples

The following command imports content files and their related metadata files into the Repository. First the metadata files in the C:\Import\In directory are modified or created (if they are not provided), then saved in the C:\Import\Out directory. The content files are converted and saved in the C:\Import\Out directory. Next the content and metadata files in the C:\Import\Out directory are imported into the Repository. If the corresponding object for a file does not exist, the object is created in the General/Import folder.

ContentImporter convert-and-import --input C:\Import\In --output C:\Import\Out --repository-path General/Import

The following command imports content files and their related metadata files exported from a Repository into the target Repository. First the metadata files in the C:\Import\In directory are modified or created (if they are not provided), then saved in the C:\Import\Out directory. The content files are converted and saved in the C:\Import\Out directory. Next the content and metadata files in the C:\Import\Out directory are imported into the Repository. New identifiers are assigned to the objects. All objects are created in the General/Import folder.

ContentImporter convert-and-import --input C:\Import\In --output C:\Import\Out --repository-path General/Import --file-format-type Repository --reassign-ids