# Administering Bookcases

After building bookcases into an information library, you can perform several administrative functions on the bookcases that make up the library without having to rebuild them. Specifically, you can:

- Copy bookcases from another library

- Remove bookcases from a library

- List the bookcases in a library

- Rename bookcases in a library

- Rearrange bookcases in a library

See also Adding a Bookcase to an Existing Library.

## Running dtdocbook2infolib admin

`dtdocbook2infolib admin` is an interactive program that displays a menu from which you select the administrative operation you want to perform. To run the `dtdocbook2infolib admin` command, on the command line type:

    dtdocbook2infolib admin

When you press enter, the following menu appears.

    1) Copy a bookcase from another library
    2) Remove a bookcase
    3) List bookcases in a library
    4) Rename a bookcase
    5) Rearrange bookcases in a library
    6) Exit
    Please enter your choice [1-6]

## Copying Bookcases from Another Library

When you copy a bookcase from another library, `dtdocbook2infolib admin` validates the bookcase you are copying against the bookcases in the destination library. This ensures that no section IDs are duplicated within the library, and that the database versions are compatible with each other.

If the bookcase you want to copy already exists in the destination library, `dtdocbook2infolib admin` asks whether you wish to replace the bookcase.

To copy a bookcase from another library:

1. At a command line, enter `dtdocbook2infolib admin`.

   The following menu appears:

       1) Copy a bookcase from another library
       2) Remove a bookcase
       3) List bookcases in a library
       4) Rename a bookcase
       5) Rearrange bookcases in a library
       6) Exit
       Please enter your choice [1-6]

2. On the command line, enter `1`.

   `dtdocbook2infolib admin` displays:

       Enter the path for the library from which you want to copy a bookcase.
       This can be a relative or absolute path.

3. Enter the path to the information library from which you want to copy a bookcase. For example: `/lit/wolfe`

   `dtdocbook2infolib admin` displays the bookcases available in the library you specified. For example:

       The bookcases available in /lit/wolfe are:

        1) Life [Life Works]
        2) Essays [Essays from Life]
        3) Poems [Collections of Poems]

       Enter the number associated with the bookcase you want to copy.

4. At the prompt, enter the number corresponding to the bookcase you want to copy. `dtdocbook2infolib admin` displays:

       You specified [Life]. Do you really want to copy this bookcase?

5. To copy the bookcase you specified, enter `Y` (you can use an uppercase or lowercase character).

6. Enter the path to the information library to which you want to copy the bookcase. For example: `/lit/destiny`

   `dtdocbook2infolib admin` displays the bookcases available in the library you specified:

       The bookcases available in /lit/destiny are:

        1) Child [School Days]
        2) Reports [Reports from School]

       Bookcases appear in the browser Book List in the order listed here.
       Enter the number corresponding to the position you want bookcase to occupy [1-2].

7. Enter the number corresponding to the position you want the bookcase to occupy.

   If another bookcase already occupies the position you choose, the bookcase you are copying takes its place, and the original bookcase moves down one place in the list.

   `dtdocbook2infolib admin` displays the new order of the bookcases in the library. For example:

       You specified this order for the bookcases:

        1) Child [School Days]
        2) Reports [Reports from School]
        3) Life [Life Works]

       Is this correct? [ynq]

8. To copy the bookcase into this position, enter `Y`. `dtdocbook2infolib admin` saves the addition to the library and returns to the main menu.

## Removing Bookcases from a Library

The procedure for removing a bookcase with `dtdocbook2infolib admin` is similar to the procedure for copying a bookcase into a library. When you remove a bookcase from a library, its database is deleted from the information library.

When you specify the library to work with, `dtdocbook2infolib admin` lists the bookcases found in that library. You simply specify the bookcase to remove. If the information you supply is valid, `dtdocbook2infolib admin` prompts you for confirmation before removing the bookcase you specified.

To remove a bookcase from a library:

1. At a command line, enter `dtdocbook2infolib admin`.

   The following menu appears.

       1) Copy a bookcase from another library
       2) Remove a bookcase
       3) List bookcases in a library
       4) Rename a bookcase
       5) Rearrange bookcases in a library
       6) Exit
       Please enter your choice [1-6]

2. To remove a bookcase, enter `2`.

   `dtdocbook2infolib admin` displays:

       Enter the path for the library from which you want to remove a bookcase.
       This can be a relative or absolute path.

3. Enter the path to the information library from which you want to remove the bookcase. For example: `/lit/wolfe`.

   `dtdocbook2infolib admin` displays the bookcases available in the library you specified:

       The bookcases available in /lit/wolfe are:

       1) Life [Life Works]
       2) Essays [Essays from Life]
       3) Poems [Collections of Poems]

       Enter the number corresponding to the bookcase to remove.

4. At the prompt, enter the number corresponding to the bookcase you want to remove. `dtdocbook2infolib admin` displays:

       You specified [Essays]. Do you really want to remove this bookcase?

5. To remove the bookcase you specified, enter `Y`. `dtdocbook2infolib admin` removes the bookcase and returns to the main menu.

## Listing the Bookcases in a Library

In trying to identify the library to work with, you may want to list the bookcases in a library.

To list bookcases in a library:

1. At a command line, enter `dtdocbook2infolib admin`.

   `dtdocbook2infolib admin` displays:

       1) Copy a bookcase from another library
       2) Remove a bookcase
       3) List bookcases in a library
       4) Rename a bookcase
       5) Rearrange bookcases in a library
       6) Exit
       Please enter your choice [1-6]

2. To list a bookcase, enter `3`.

   `dtdocbook2infolib admin` displays:

       Enter the path for the library for which you want to list bookcases.
       This can be a relative or absolute path.

3. Enter the path to the information library for which you want to list bookcases. For example: `/lit/wolfe`.

   `dtdocbook2infolib admin` displays the bookcases available in the library you specified. For example:

       The bookcases available in /lit/wolfe are:

        1) Life [Life Works]
        2) Essays [Essays from Life]
        3) Poems [Collections of Poems]

4. After listing the bookcases in the information library, `dtdocbook2infolib admin` returns you to the main menu.

## Renaming Bookcases in a Library

You can change the bookcase names that the browser displays in the Information Manager Book List. To rename a bookcase:

1. At a command line, enter `dtdocbook2infolib admin`.

   `dtdocbook2infolib admin` displays:

       1) Copy a bookcase from another library
       2) Remove a bookcase
       3) List bookcases in a library
       4) Rename a bookcase
       5) Rearrange bookcases in a library
       6) Exit
       Please enter your choice [1-6]

2. To rename a bookcase, enter `4`.

   `dtdocbook2infolib admin` displays:

       Enter the path for the library containing the bookcase you want to rename.
       This can be a relative or absolute path.

3. Enter the path to the information library you want to rename. For example: `/lit/wolfe`.

   `dtdocbook2infolib admin` displays the bookcases available in the library you specified:

       The bookcases available in /lit/wolfe are:

        1) Life [Life Works]
        2) Essays [Essays from Life]
        3) Poems [Collections of Poems]

       Enter the number corresponding to the bookcase you want to rename.

4. At the prompt, enter the number corresponding to the bookcase you want to rename. `dtdocbook2infolib admin` displays:

       You specified [Poems]. Do you really want to rename the bookcase?

5. To rename the bookcase you specified, enter `Y`. `dtdocbook2infolib admin` asks you to enter the new title for the bookcase:

       Enter the new title for [Poems].

6. Enter the new title for the bookcase. `dtdocbook2infolib admin` displays the new title:

       You entered [Old Poems]. Is this title correct?

7. To accept the new title, enter `Y`. `dtdocbook2infolib admin` saves the new title and returns to the main menu.

## Rearranging Bookcases in a Library

After you have built a library, you may find that you want to display the bookcases in a different order in the Information Manager Book List. Or, you may have added a bookcase using `dtdocbook2infolib build`, and want to move it to a different position. You can use `dtdocbook2infolib admin` to change the order of bookcases in a library.

To rearrange bookcases within a library:

1. At a command line, enter `dtdocbook2infolib admin`.

   `dtdocbook2infolib admin` displays:

       1) Copy a bookcase from another library
       2) Remove a bookcase
       3) List bookcases in a library
       4) Rename a bookcase
       5) Rearrange bookcases in a library
       6) Exit
       Please enter your choice [1-6]

2. To rearrange bookcases within a library, enter `5`.

   `dtdocbook2infolib admin` displays:

       Enter the path for the library you want to rearrange.
       This can be a relative or absolute path.

3. Enter the path to the information library you want to rearrange. For example: `/lit/wolfe`.

   `dtdocbook2infolib admin` displays the bookcases available in the library you specified:

       The bookcases available in /lit/wolfe are:

       1) Life [Life Works]
       2) Essays [Essays from Life]
       3) Poems [Collections of Poems]

       Enter the number corresponding to the bookcase you want to move.

4. At the prompt, enter the number corresponding to the bookcase you want to move. `dtdocbook2infolib admin` displays:

       You specified [Poems]. Do you really want to move this bookcase?

5. To move the bookcase you specified to a different position in the library, enter `Y`. `dtdocbook2infolib admin` displays the current order of the library without the bookcase you selected to move. For example:

       The order of the bookcase without [Poems] is:

       1) Life [Life Works]
       2) Essays [Essays from Life]

       Bookcases appear in the browser Book List in the order listed here.
       Enter the number corresponding to the position you want bookcase to occupy.

6. Enter the number corresponding to the position you want the bookcase to occupy.

   If another bookcase already occupies the position you choose, the bookcase you are moving takes its place, and the original bookcase moves one place down in the list.

   `dtdocbook2infolib admin` displays the new order of the bookcases in the library. For example:

       You specified this order for the bookcases:

        1) Poems [Collections of Poems]
        2) Life [Life Works]
        3) Essays [Essays from Life]

       Is this correct? [ynq]

7. To accept the rearranged order, enter `Y`. `dtdocbook2infolib admin` saves the new order and returns to the main menu.