Git Product home page Git Product logo

booktype-docker's Introduction

Booktype

Booktype makes it easier and quicker for authors, companies and organisations to edit and publish books. It imports DOCX or EPUB files, converts them into single-source HTML for online editing and proofreading, and uses CSS Paged Media to produce good-looking output for print, the open web, and almost any ebook reader, in seconds. Booktype facilitates collaborative, agile production across time zones and borders.

Booktype is built on the Django web framework and many great Python libraries.

The Booktype user interface is being translated into many languages by our community of contributors. Your help with development or translation is always welcome!

Installation

Installation instructions for Booktype on GNU/Linux and OS X can be found in the Booktype user manual.

Files for installation using Docker can be found in the Booktype-docker repository.

More information

How to contribute

  1. Fork the booktype/Booktype repository. Please see GitHub help on forking or use this direct link to fork.
  2. Clone your fork to your local machine.
  3. Create a new local branch.
  4. Run tests and make sure your contribution works correctly.
  5. Create a pull request with details of your new feature, bugfix or other contribution.
  6. Sign and return the contributor agreement paperwork, either for an individual, or an entity such as a company, university or other organisation. This paperwork gives us the right to use your work in Booktype, and makes it clear that you retain ownership of the copyright in your contribution.

Testing

Booktype uses the py.test testing framework with the pytest-django plugin. It makes the testing process easier, and also provides the ability to run ready-made django (unittest) tests.

To run tests:

  1. Open a terminal and activate the virtual environment (Booktype must be installed).
  2. Go to (cd command) instance root (folder with manage.py and pytest.ini file).
  3. Run the py.test command.
  4. If you want pytest to print test coverage information, you should run py.test --cov-report term-missing --cov=path/to/Booktype. You can read more about coverage here: pytest-cov

License

Booktype is licensed under the GNU AGPL license.

booktype-docker's People

Contributors

danielhjames avatar ride90 avatar soroushj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

booktype-docker's Issues

Duplicate Admin error on container reboot

Hello!

Just an FYI, you may get the following error when rebooting your container:

django.db.utils.IntegrityError: duplicate key value violates unique constraint "auth_user_username_key"
DETAIL: Key (username)=(admin) already exists.

Django tries to create another admin account, even though it already did so on first launch.

To fix, you need to edit the following file:
/booktype-docker/prod/web/scripts/manage_py.sh

Change this:
echo 'from django.contrib.auth.models import User; User.objects.create_superuser("admin", "[email protected]", "admin")' | /code/venv/bin/python /code/mybook/manage_dev.py shell

To this:
echo 'from django.contrib.auth.models import User; if not User.objects.filter(username="admin"): User.objects.create_superuser("admin", "[email protected]", "admin")' | /code/venv/bin/python /code/mybook/manage_dev.py shell

This if statement will prevent django from trying to create another admin at every reboot.

I'll submit a pull request for this soon.

Can not fetch index base URL https://pypi.python.org/simple/

Hello,

I am trying a booktype install with docker on Ubuntu 18.04.6 LTS.

The first steps went fine, but at step 22 I get the following error:

Step 22/31 : RUN pip install virtualenv     && virtualenv venv     && . venv/bin/activate     && pip install -r Booktype/requirements/prod.txt     && ./Booktype/scripts/createbooktype --database postgresql ${INSTANCENAME}
 ---> Running in af8f4fa59111
Downloading/unpacking virtualenv
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement virtualenv
Cleaning up...
No distributions at all found for virtualenv
Storing debug log for failure in /root/.pip/pip.log
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install virtualenv     && virtualenv venv     && . venv/bin/activate     && pip install -r Booktype/requirements/prod.txt     && ./Booktype/scripts/createbooktype --database postgresql ${INSTANCENAME}' returned a non-zero code: 1

The mentioned logfile in /root/.pip/pip.log does not exist. I have no idea why the script can not fetch index base URL https://pypi.python.org/simple/ .

Any idea?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.