$
publican build
command to create the CSV file for Drupal import. Before running the command, use the cd command to change into the directory where your book is located. For example, if you have a book call "User_Guide" in your home directory, then run the following command.
$
cd User_Guide/
$
publican build --langs en-US --formats=drupal-book
tmp/en-US/drupal-book/
directory.
/tmp/en-US/drupal-book/
directory. This directory contains the following files:
$product-$version-$docname-$lang-$edition.csv
Important — Use version control system
$
publican build --langs en-US --formats=drupal-book
command, you will notice that the xml files in the en-US
directory had been changed. This is because Publican added a 'Conformance'
attribute for every xml tag that has id. This attribute contains a number which is unique across xml files in the book. If you are using a version control system like git for your xml files, then you need to commit the changes so that the number won't get reset when other users run it. These unique numbers are very important, because they are use as the url path in drupal. Besides, Publican also created a database file name max_unique_id.db
in the en-US
directory. This database file is use to track the current maximum unique number in the book, so that Publican can know where you are up to and add a new unique number for your newly created Chapter or Section. Therefore, it is very important to add the database file to the version control and commit it if there is any change. If you add a new section in the xml, don't set the 'Comformance'
attribute yourself as that will make the database outdated. Just leave it for publican to set it.
drupal_author
publican.cfg
file to override it.
Important — Setting Author
drupal_menu_title
drupal_menu_block
"user-guide"
.
Important — Setting menu block
drupal_image_path
"sites/default/files/"
.
/var/www/html/drupal/
directory, then you should copy the module to /var/www/html/drupal/sites/all/modules/
directory. To enable the installed module, login to the Drupal site and go to Administer -> Site building -> Modules . In the Development section, tick the and click button to activate the Node Import Module.
Important — Enable Drupal Core Modules
Permission to install Module
drupal_menu_block
parameter in publican.cfg
.
sites/default/files/imports/
.
import directory
.
import directory
will be assigned ownership to this user.
Important — File Ownership
Book Page content type
is checked.
Procedure 8.1. To import book into Drupal:
import Directory
in the Drupal Server
en-US
directory to the "sites/default/files/"
directory in the Drupal server. This value can be overriden in the publican.cfg
. For more details, please read Section 8.2, “The publican.cfg file”
Warning — Section Chunking