diff --git a/docs/Makefile b/docs/Makefile index 9c0af082b..5a86af856 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -48,6 +48,7 @@ help: clean: rm -rf $(BUILDDIR)/* + rm -f api/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @@ -175,3 +176,6 @@ pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +rst: + sphinx-apidoc -f -o api ../lib diff --git a/docs/conf.py b/docs/conf.py index 8623439e5..9394a04e7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Booktype documentation build configuration file, created by -# sphinx-quickstart on Wed Mar 12 17:38:49 2014. +# sphinx-quickstart on Wed Jan 6 15:06:15 2016. # # This file is execfile()d with the current directory set to its # containing dir. @@ -15,6 +15,11 @@ import sys import os +sys.path.append(os.path.dirname(__file__)) +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") + +sys.path.append('../lib') + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -31,7 +36,8 @@ extensions = [ 'booktypedocs', 'sphinx.ext.autodoc', - 'sphinx.ext.extlinks' + 'sphinx.ext.extlinks', + 'sphinx.ext.todo' ] extlinks = {'repo': ('https://github.com/sourcefabric/Booktype/tree/2.0/%s', ' ')} @@ -46,11 +52,11 @@ #source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'contents' +master_doc = 'index' # General information about the project. project = u'Booktype' -copyright = u'2014, Aleksandar Erkalovic' +copyright = u'2016, Aleksandar Erkalović' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -73,7 +79,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build'] +exclude_patterns = ['_build', '**migrations**'] # The reST default role (used for this markup: `text`) to use for all # documents. @@ -200,10 +206,10 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). +# author, documentclass [howto/manual]). latex_documents = [ ('index', 'Booktype.tex', u'Booktype Documentation', - u'Aleksandar Erkalovic', 'manual'), + u'Aleksandar Erkalović', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -233,7 +239,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'booktype', u'Booktype Documentation', - [u'Aleksandar Erkalovic'], 1) + [u'Aleksandar Erkalović'], 1) ] # If true, show URL addresses after external links. @@ -247,7 +253,7 @@ # dir menu entry, description, category) texinfo_documents = [ ('index', 'Booktype', u'Booktype Documentation', - u'Aleksandar Erkalovic', 'Booktype', 'One line description of project.', + u'Aleksandar Erkalović', 'Booktype', 'Booktype is a free, open source platform that produces beautiful, engaging books formatted for print, Amazon, iBooks and almost any ereader within minutes.', 'Miscellaneous'), ] @@ -262,3 +268,46 @@ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + + +# -- Options for Epub output ---------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = u'Booktype' +epub_author = u'Aleksandar Erkalović' +epub_publisher = u'Aleksandar Erkalović' +epub_copyright = u'2016, Aleksandar Erkalović' + +# The language of the text. It defaults to the language option +# or en if the language is not set. +#epub_language = '' + +# The scheme of the identifier. Typical schemes are ISBN or URL. +#epub_scheme = '' + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +#epub_identifier = '' + +# A unique identification for the text. +#epub_uid = '' + +# A tuple containing the cover image and cover page html template filenames. +#epub_cover = () + +# HTML files that should be inserted before the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_pre_files = [] + +# HTML files shat should be inserted after the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_post_files = [] + +# A list of files that should not be packed into the epub file. +#epub_exclude_files = [] + +# The depth of the table of contents in toc.ncx. +#epub_tocdepth = 3 + +# Allow duplicate toc entries. +#epub_tocdup = True diff --git a/docs/settings.py b/docs/settings.py new file mode 100644 index 000000000..79f7dc492 --- /dev/null +++ b/docs/settings.py @@ -0,0 +1,67 @@ +# Django settings for docs project. +# import source code dir +import os +import sys +sys.path.insert(0, os.getcwd()) +sys.path.insert(0, os.path.join(os.getcwd(), os.pardir)) + +SITE_ID = 303 +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +SECRET_KEY = 'enc*ln*vp^o2p1p6of8ip9v5_tt6r#fh2-!-@pl0ur^6ul6e)l' + +COVER_IMAGE_UPLOAD_DIR = 'cover_images/' + +PROFILE_IMAGE_UPLOAD_DIR ='profile_images/' + +BOOKTYPE_URL = 'http://booktype.example.com/' + +STATIC_URL = '{}static/'.format(BOOKTYPE_URL) + +COMPRESS_URL = STATIC_URL + +DATABASES = {"default": { + "NAME": ":memory:", + "ENGINE": "django.db.backends.sqlite3", + "USER": '', + "PASSWORD": '', + "PORT": '', +}} + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.admin', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'compressor', + 'djcelery', + + # list of booki apps + 'booki.editor', + + # needed for translation engine + 'booktype', + + # list of booktype apps + 'booktype.apps.core', + 'booktype.apps.portal', + 'booktype.apps.loadsave', + 'booktype.apps.importer', + 'booktype.apps.convert', + 'booktype.apps.edit', + 'booktype.apps.reader', + 'booktype.apps.account', + 'booktype.apps.themes', + 'booktype.apps.export', + + # to be removed + 'booki.messaging', + + 'sputnik', + 'booktypecontrol' +)