Some documentation on how to construct a file to import.

### How to create a file to import

TODO

### Column content

Some content fields can be preprocessed specially for the convience of the user. For example it is more portable to specify a user by name or e-mail address than by internal UID.

#### Allowed values

If you can select a value with a set of radio buttons, you can use either the key or the value of the set of options. For example, if the radio buttons read One (with internal key 1), Two (with internal key 2) and Three (with internal key 3) you can use any of following values to select Two:

    2
    Two
    two

#### Book reference

Just like a Node reference, a Book reference, such as the Book of a Book outline, can be specified by NID or Title (case insensitive).

To specify that a page should not be added to a Book outline you can specify <none>. To create a new toplevel book specify <new>.

#### Book page reference

Just like a Node reference, a Book page reference, such as the Parent item of a Book outline, can be specified by NID or Title (case insensitive).

You can not have a book page inside the same book with the same title.

#### Boolean

A Boolean content field, for example Published, can be specified by following True values (case insensitive):

    1
    on
    yes
    true
    On          - translated
    Yes         - translated
    True        - translated

or by following False values (case insensitive):

    0
    off
    no
    false
    Off         - translated
    No          - translated
    False       - translated

#### Date

If you map a Date content field, such as Authored on, you will be presented with the option on how to interpret the data in the file column.

For example, if you specify the Custom date format as m/d/Y, dates need to be in the 12/23/2008 format, while if you specify d/m/Y they need to be in the 23/12/2008 format.

Dates in UNIX timestamp or the ISO format (2008-12-23) will always be accepted.

#### File path

A field that reference a File, such as the CCK FileField, CCK ImageField or Core attachments (of the Upload module), need to contain a filepath relative to the directory in which the files are stored.

You need to manually move the files to the correct location prior doing the import.

For example, if you have an image `butterfly.jpg` that is used in a CCK ImageField field which stores its files in a configured directory `sites/default/files/butterflies` your CSV file needs to contain `butterfly.jpg` as value and you need to manually copy or FTP the image file to `sites/default/files/butterflies/butterfly.jpg`.

#### Input format

An Input format field, for example of the Body, can be specified by ID or Name (case insensitive). For example, on a default Drupal installation, following values will be accepted for Filtered HTML:

    Filtered HTML
    filtered html
    1

#### Node reference

A Node reference, such as the fields defined by the Node reference module, can be specified by NID or Title (case insensitive). For example, a node Hello world! with NID 574 can be specified as:

    Hello world!
    hello world!
    574

#### User reference

A User reference, such as Authored by, can be specified by UID, Username (case insensitive) or E-mail address (case insensitive). For example, a user Joe Doe with e-mail address Joe.Doe@example.org and UID 42 can be specified as:

    Joe Doe
    joe doe
    Joe.Doe@example.org
    joe.doe@example.org
    42

#### Weight

A Weight, such as for Book outline, can be specified as an Integer only. The following are all valid weights:

    -5
    0
    9