Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 119
1 change: 1 addition & 0 deletions docs/_static/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
File to keep the empty `_static` directory in version control.
115 changes: 59 additions & 56 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import os # noqa: F401
import sys # noqa: F401

import galley

# 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.
#sys.path.insert(0, os.path.abspath('.'))
#sys.path.insert(0, os.path.abspath('.')) # noqa: E265

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
#needs_sphinx = '1.0' # noqa: E265

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand All @@ -34,57 +37,57 @@
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
#source_encoding = 'utf-8-sig' # noqa: E265

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'Galley'
copyright = u'2013, Russell Keith-Magee'
project = 'Galley'
copyright = '2013, Russell Keith-Magee'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1'
version = '.'.join(str(num) for num in galley.NUM_VERSION[:3] if isinstance(num, int))
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = galley.VERSION

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
#language = None # noqa: E265

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
#today = '' # noqa: E265
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
#today_fmt = '%B %d, %Y' # noqa: E265

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
#default_role = None # noqa: E265

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
#add_function_parentheses = True # noqa: E265

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
#add_module_names = True # noqa: E265

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
#show_authors = False # noqa: E265

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
#modindex_common_prefix = [] # noqa: E265


# -- Options for HTML output ---------------------------------------------------
Expand All @@ -96,26 +99,26 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
#html_theme_options = {} # noqa: E265

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
#html_theme_path = [] # noqa: E265

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
#html_title = None # noqa: E265

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
#html_short_title = None # noqa: E265

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
#html_logo = None # noqa: E265

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
#html_favicon = None # noqa: E265

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -124,44 +127,44 @@

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
#html_last_updated_fmt = '%b %d, %Y' # noqa: E265

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
#html_use_smartypants = True # noqa: E265

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
#html_sidebars = {} # noqa: E265

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
#html_additional_pages = {} # noqa: E265

# If false, no module index is generated.
#html_domain_indices = True
#html_domain_indices = True # noqa: E265

# If false, no index is generated.
#html_use_index = True
#html_use_index = True # noqa: E265

# If true, the index is split into individual pages for each letter.
#html_split_index = False
#html_split_index = False # noqa: E265

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
#html_show_sourcelink = True # noqa: E265

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
#html_show_sphinx = True # noqa: E265

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
#html_show_copyright = True # noqa: E265

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
#html_use_opensearch = '' # noqa: E265

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
#html_file_suffix = None # noqa: E265

# Output file base name for HTML help builder.
htmlhelp_basename = 'galleydoc'
Expand All @@ -170,55 +173,55 @@
# -- Options for LaTeX output --------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper', # noqa: E265

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt', # noqa: E265

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '', # noqa: E265
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'galley.tex', u'Galley Documentation',
u'Russell Keith-Magee', 'manual'),
('index', 'galley.tex', 'Galley Documentation',
'Russell Keith-Magee', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
#latex_logo = None # noqa: E265

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
#latex_use_parts = False # noqa: E265

# If true, show page references after internal links.
#latex_show_pagerefs = False
#latex_show_pagerefs = False # noqa: E265

# If true, show URL addresses after external links.
#latex_show_urls = False
#latex_show_urls = False # noqa: E265

# Documents to append as an appendix to all manuals.
#latex_appendices = []
#latex_appendices = [] # noqa: E265

# If false, no module index is generated.
#latex_domain_indices = True
#latex_domain_indices = True # noqa: E265


# -- Options for manual page output --------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'galley', u'Galley Documentation',
[u'Russell Keith-Magee'], 1)
('index', 'galley', 'Galley Documentation',
['Russell Keith-Magee'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False
#man_show_urls = False # noqa: E265


# -- Options for Texinfo output ------------------------------------------------
Expand All @@ -227,16 +230,16 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'galley', u'Galley Documentation',
u'Russell Keith-Magee', 'Galley', 'GUI tool to assist in drafting documentation.',
('index', 'galley', 'Galley Documentation',
'Russell Keith-Magee', 'Galley', 'GUI tool to assist in drafting documentation.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
#texinfo_appendices = [] # noqa: E265

# If false, no module index is generated.
#texinfo_domain_indices = True
#texinfo_domain_indices = True # noqa: E265

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
#texinfo_show_urls = 'footnote' # noqa: E265
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Problems under Ubuntu/Debian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Deian and Ubuntu's packaging of Python omits the ``idlelib`` library from it's
base packge. If you're using Python 2.7 on Ubuntu 13.04, you can install
base packge. If you're using Python on Ubuntu, you can install
``idlelib`` by running::

$ sudo apt-get install idle-python2.7
$ sudo apt-get update
$ sudo apt-get install idle3

For other versions of Python, Ubuntu and Debian, you'll need to adjust this as
appropriate.
Expand All @@ -31,7 +32,7 @@ Problems under Windows
If you're running Galley in a virtualenv, you'll need to set an
environment variable so that Galley can find the TCL graphics library::

$ set TCL_LIBRARY=c:\Python27\tcl\tcl8.5
$ set TCL_LIBRARY=c:\Python35\tcl\tcl8.6

You'll need to adjust the exact path to reflect your local Python install.
You may find it helpful to put this line in the ``activate.bat`` script
Expand Down
12 changes: 12 additions & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Release History
===============

0.1.1 - In development
----------------------

Drop Python 2 support.

0.1.0 - In development
----------------------

Initial public release.
7 changes: 0 additions & 7 deletions docs/releases.txt

This file was deleted.

15 changes: 11 additions & 4 deletions galley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ def get_git_changeset():
import subprocess

repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
git_log = subprocess.Popen('git log --pretty=format:%ct --quiet -1 HEAD',
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
shell=True, cwd=repo_dir, universal_newlines=True)
git_log = subprocess.Popen(
'git log --pretty=format:%ct --quiet -1 HEAD',
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True,
cwd=repo_dir,
universal_newlines=True
)
timestamp = git_log.communicate()[0]
try:
timestamp = datetime.datetime.utcfromtimestamp(int(timestamp))
Expand Down Expand Up @@ -63,4 +68,6 @@ def part_string(part, i):
s = '.' + s
return s

VERSION = "".join(part_string(nv, i) for i, nv in enumerate(NUM_VERSION))

VERSION = "".join(part_string(nv, i) for i, nv in enumerate(NUM_VERSION))
__version__ = VERSION
12 changes: 7 additions & 5 deletions galley/__main__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
'''
This is the main entry point for the Galley GUI.
'''
from Tkinter import *

import argparse
from tkinter import Tk

from galley import VERSION
from galley.view import MainWindow


def main():
parser = argparse.ArgumentParser(
description='GUI tool to assist in drafting documentation.',
parser = argparse.ArgumentParser(description='GUI tool to assist in drafting documentation.')
parser.add_argument(
'--version',
action='version',
version=VERSION
)

Expand Down Expand Up @@ -39,5 +40,6 @@ def main():
except KeyboardInterrupt:
view.cmd_quit()


if __name__ == '__main__':
main()
main()
Loading