Skip to content

Commit

Permalink
BK-1847 Add dummy settings for Sphinx doc generation, update conf
Browse files Browse the repository at this point in the history
Add ReST option to Makefile, clean any ReST files properly
  • Loading branch information
danielhjames authored and aerkalov committed Aug 1, 2016
1 parent 387a68e commit f4f359f
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 9 deletions.
4 changes: 4 additions & 0 deletions docs/Makefile
Expand Up @@ -48,6 +48,7 @@ help:

clean:
rm -rf $(BUILDDIR)/*
rm -f api/*

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Expand Down Expand Up @@ -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
67 changes: 58 additions & 9 deletions 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.
Expand All @@ -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.
Expand All @@ -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', ' ')}
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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'),
]

Expand All @@ -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
67 changes: 67 additions & 0 deletions 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'
)

0 comments on commit f4f359f

Please sign in to comment.