Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Booktype 2.2 for Authors and Publishers

Command Line Admin

If you have shell access to the Booktype server, you can use the command line admin tools to perform functions including the export and import of books, and changing the URLs or titles of books. You can do a lot of damage with these tools, so be careful and always make back-ups!

First, change to the Booktype instance directory, then change to the owner of the files (for example, the www-data user in the case of a Debian or Ubuntu server running Apache). Next, load the Booktype environment variables:

cd /var/www/booktype/instance1/
sudo su www-data
. ./booktype.env

You are now ready to use the command line tools.

Generic options

These options are available for all tools:

  -v VERBOSITY, --verbosity=VERBOSITY
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output

  --settings=SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be

                        A directory to add to the Python path, e.g.

  --traceback           Print traceback on exception

  --version             show program's version number and exit

  -h, --help            show this help message and exit

Running the command: help [command]

prints usage information for any of the following tools.

Editor tools

<book name> takes the same form as the Booktype URL, in lower case with spaces replaced by hyphens. For example, the title "My book" becomes my-book on the command line.


Export book contents as a ZIP file. Only the content of one book version will be exported, and you will not get the book history data.

Usage: bookexport [options] <book name>



Book version, e.g. 1.0


Output filename e.g., or -- for STDOUT.


Renames a book, moves book to a new URL on the Booktype server, or changes book owner.

Usage: bookrename [options] <book name>



Set a new owner of the book. OWNER takes the form of the Booktype user name without spaces, as shown on their profile page, rather than the user's full name.


Set a new book title, where NEW_BOOK_TITLE can contain spaces if enclosed in double quotes, e.g. "My New Book".


Set a new book URL on the Booktype server. This command only affects the part of the URL to the right of the domain name, e.g. 'my-book' in

To move a book between Booktype servers, use the bookimport command instead.


Check links in one or more books.

Usage: brokenlinks [options] <book name> [, <book name>, ...]



Do not check remote URL links.


Do not check local links.


Do not cache network links.


Which host to ignore when checking links. IGNORE_URL takes the form of a URL without quotes, e.g.

User tools


Create a user on the Booktype system. At least the username, email address, full name and password for the new user must be specified.

Usage: createuser [options]



Specifies the username for the new user.


Specifies the email address for the user.


Specifies the full name for the user. If the full name contains a space, double quotes must be used for FULLNAME, e.g. "A.N. Author".


Specifies the login password for the user.


User will have administrator powers. This option grants full control of the Booktype instance, so it should be reserved for trusted persons only.

Report tools


Used to send a report from the Booktype server.

Usage: report [options]



Send email to admin.


The number of days to use when generating the report.


Used to send a weekly report from the Booktype server.

Usage: reportweekly [options]



Send email to admin.


The number of days to use when generating the report.

Import tools


Import one or more books from EPUB files. You can also import a book under a new name.

Usage: bookimport [options] <epub file> [, <epub file>, ...]



Booktype username of the owner of the imported book.


Title of the new book.


URL of the new book on the Booktype server.


If the creation of book chapters or opening the chapter editor stalls, with a blank page and sometimes with a message in a green dialog box, this can be due to problems with the Redis database. The workaround is to use the command:

sudo redis-cli flushall

which deletes all the keys of all the existing Redis databases. It does not affect the book content in the PostgreSQL database.

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.