Sourcefabric Manuals

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

Booktype 1.6 for Authors and Publishers

Command Line

This is some brief information on how to use the command line admin tools for Booktype. Using these tools you can export and import books and change the URLS and titles of books.

You can do a lot of damage with this, so be careful.

Tools help brokenlinks help bookimport help bookexport help bookrename


brokenlinks - check links inside of book(s). brokenlinks command-line my-book brokenlinks --no-remote command_line brokenlinks --ignore-url command_line


bookexport - exports book into booki-zip file. this is not real export, and it does not export historic data. bookexport command-line bookexport --output --book-version 2.2 command-line


bookimport - imports new book from booki-zip file. you can import it
under new name also. bookimport bookimport --owner aerkalov bookimport --new-book-title "New title for Command
line" bookimport --new-book-title "New title for Command
line" --new-book-url commandline


bookrename - renames existing book. bookrename --new-book-title "New title" command-line bookrename --new-book-title "New title" --new-book-url commandline command-line bookrename --owner aerkalov command-line


  1.  there is script in the root. you should read that with "./" before doing any work from the command line, and especially if trying to run any django management command. you should set it up (it sets pythonpath, path and some other things). when running django app, all this things are loaded trough wsgi script, but when using command line you should load it manually (or put it in your profile, and have it loaded every time. but this is not very smart). this is also place where you setup your DJANGO_SETTINGS_MODULE environment variable.
  2. never run anything as root, or god forbid as your user account (or have things installed in your personal /home directory). if booktype is installed to be run as www-data user through apache, then everything must be run as that user. if you use root account, it will work, but it will also screw file permissions on your log files, on your attachment files and etc. also, running things with super user privilege is not very smart. if you go to booktype directory and you see more than one user in "ls -l" result list, you are doing it wrong.
  3. and is result of not having defined DJANGO_SETTINGS_MODULE variable (and not having django/bin in your path). if you know what you are doing and what file you are running, it is ok to use it, but it is much smarter to be 100% sure with DJANGO_SETTINGS_MODULE  and if you have more then 2 installations on the same machine, DJANGO_SETTINGS_MODULE is sane way to work with them. and etc..etc...etc...

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

You should refresh this page.