5. Renaming a document

The $ publican rename command makes it easy for you to rename a document to give it a new title, or to change the name or version of the product to which the document applies. The command accepts up to three options:

--name new_title

changes the title of the document. For example, to rename a document from Server Configuration Guide to Server Deployment Guide, change into the document's root directory and run:

$ publican rename --name "Server Deployment Guide"

Specifically, the command changes the content of the <title> tag in the Article_Info.xml, Book_Info.xml, or Set_Info.xml file, and sets a value for the mainfile parameter in the publican.cfg file so that Publican can still find the root XML node and the entities for the document.

Note that the $ publican rename command does not change any file names. Therefore, the root XML node and the document entities are still located in files named after the original title of the document — Server_Configuration_Guide in the previous example.

--product new_product

changes the name of the product to which the document applies. For example, if the product was previously named ForceRivet but is now called PendantFarm, change into the document's root directory and run:

$ publican rename --product PendantFarm

The command changes the content of the <productname> tag in the Article_Info.xml, Book_Info.xml, or Set_Info.xml file.

--version new_version

changes the product version to which the document applies. For example, if the product version was previously 1.0 but is now 2.0 , change into the document's root directory and run:

$ publican rename --version 2.0

The command changes the content of the <productnumber> tag in the Article_Info.xml, Book_Info.xml, or Set_Info.xml file.

You can combine any combination of these options into a single command. For example:

$ publican rename --name "Server Deployment Guide" --product PendantFarm --version 2.0