summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README.rst56
-rw-r--r--README.txt43
-rw-r--r--leafymiracle/templates/model.pt7
-rw-r--r--leafymiracle/views.py7
-rw-r--r--leafymiracle/widgets.py22
-rw-r--r--setup.py4
7 files changed, 93 insertions, 47 deletions
diff --git a/.gitignore b/.gitignore
index 8027a99..f2beea2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@ dist
env
*.egg-info
*.swp
+README.pdf
comps
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..576a3ed
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,56 @@
+The auspicious and venerable Leafy Miracle
+==========================================
+
+::
+
+|-----------------------------------------------|
+| _______________ |
+| < leafymiracle! > |
+| --------------- |
+| \ |
+| \ .---. __ |
+| , \ / \ \ |||| |
+| \\\\ |O___O | | \\|||| |
+| \ // | \_/ | | \ / |
+| '--/----/| / | |-' |
+| // // / -----' |
+| // \\ / / |
+| // // / / |
+| // \\ / / |
+| // // / / |
+| /| ' / / |
+| //\___/ / |
+| // ||\ / |
+| \\_ || '---' |
+| /' / \\_.- |
+| / / --| | |
+| '-' | | |
+| '-' |
+|_______________________________________________|
+
+Features
+~~~~~~~~
+
+* Written in Python using the Pyramid web framework
+* SQLAlchemy database model of Categories
+* Interactive graph widget, using ToscaWidgets2 and the JIT
+* Package mouse-over menus linking to downloads, acls, code
+ bugs, builds and updates.
+* Deep linking
+
+Running
+~~~~~~~
+
+::
+
+$ mkvirtualenv --no-site-packages leafymiracle
+$ workon leafymiracle
+$ python setup.py develop
+$ python leafymiracle/populate.py
+$ paster serve development.ini
+
+Authors
+~~~~~~~
+
+* Luke Macken <lmacken@redhat.com>
+* Ralph Bean <ralph.bean@gmail.com>
diff --git a/README.txt b/README.txt
deleted file mode 100644
index bbd5f8c..0000000
--- a/README.txt
+++ /dev/null
@@ -1,43 +0,0 @@
- _______________
-< leafymiracle! >
- ---------------
- \
- \ .---. __
- , \ / \ \ ||||
- \\\\ |O___O | | \\||||
- \ // | \_/ | | \ /
- '--/----/| / | |-'
- // // / -----'
- // \\ / /
- // // / /
- // \\ / /
- // // / /
- /| ' / /
- //\___/ /
- // ||\ /
- \\_ || '---'
- /' / \\_.-
- / / --| |
- '-' | |
- '-'
-
-[ Features ]
-
-* Written in Python using the Pyramid web framework
-* SQLAlchemy database model of Categories
-* Interactive graph widget, using ToscaWidgets2 and the JIT
-* Package mouse-over menus linking to downloads, acls, code
- bugs, builds and updates.
-* Deep linking
-
-[ Running ]
-
-$ virtualenv --no-site-packages env && source env/bin/activate
-$ ./link_in_system_modules.sh
-$ python setup.py develop
-$ python leafymiracle/populate.py
-$ paster serve development.ini
-
-[ Authors ]
-
-* Luke Macken <lmacken@redhat.com>
diff --git a/leafymiracle/templates/model.pt b/leafymiracle/templates/model.pt
index 5b2b348..c8793ec 100644
--- a/leafymiracle/templates/model.pt
+++ b/leafymiracle/templates/model.pt
@@ -1,12 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
- <title>Fedora Comps Visualization, by Luke Macken</title>
+ <title>The auspicious and venerable Leafy Miracle</title>
<link rel="stylesheet" type="text/css" href="static/css/leafy.css"/>
</head>
<body>
+ <div tal:content="structure dialogwidget.display()"></div>
<div class="outer">
- <img class="center" src="static/images/leafy_logo.png" />
+ <a href="javascript:(function(){$('#leafy_dialog').dialog('open');})();">
+ <img class="center" src="static/images/leafy_logo.png" />
+ </a>
</div>
<div class="inner" tal:content="structure jitwidget.display()"></div>
</body>
diff --git a/leafymiracle/views.py b/leafymiracle/views.py
index f1df955..a5e5a28 100644
--- a/leafymiracle/views.py
+++ b/leafymiracle/views.py
@@ -14,11 +14,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from pyramid.httpexceptions import HTTPFound
+from tw2.jqplugins.ui.base import set_ui_theme_name
from widgets import LeafyGraph
+from widgets import LeafyDialog
def view_root(context, request):
return HTTPFound(location='/1')
def view_model(context, request):
+ # TODO -- we need a fedora jquery-ui theme sitting around.
+ set_ui_theme_name('hot-sneaks')
return {'item':context, 'project':'leafymiracle',
- 'jitwidget': LeafyGraph(rootObject=context)}
+ 'jitwidget': LeafyGraph(rootObject=context),
+ 'dialogwidget': LeafyDialog}
diff --git a/leafymiracle/widgets.py b/leafymiracle/widgets.py
index 7816da4..84cae34 100644
--- a/leafymiracle/widgets.py
+++ b/leafymiracle/widgets.py
@@ -14,8 +14,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from tw2.jit import SQLARadialGraph
+from tw2.jqplugins.ui import DialogWidget
+
from tw2.core.resources import JSSymbol
+import docutils.examples
+
from leafymiracle import models
# Using mihmo's mathematically nice colors for fedora.
@@ -64,3 +68,21 @@ class LeafyGraph(SQLARadialGraph):
else
domElement.style.color = '%s';
})""" % (triads[0], triads_dark[0]))
+
+def leafy_readme():
+ """ Ridiculous """
+ root = '/'.join(__file__.split('/')[:-2])
+ fname = root + '/README.rst'
+ f = open(fname, 'r')
+ readme = f.read()
+ f.close()
+ return docutils.examples.html_body(unicode(readme))
+
+class LeafyDialog(DialogWidget):
+ id = 'leafy_dialog'
+ options = {
+ 'title' : 'README.rst',
+ 'autoOpen' : False,
+ 'width' : 1000
+ }
+ value = leafy_readme()
diff --git a/setup.py b/setup.py
index 7e2b45b..7b37a96 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
-README = open(os.path.join(here, 'README.txt')).read()
+README = open(os.path.join(here, 'README.rst')).read()
requires = [
'pyramid',
@@ -13,7 +13,9 @@ requires = [
'WebError',
"formencode",
"tw2.jit>=0.2.8b23",
+ "tw2.jqplugins.ui",
"kitchen",
+ "docutils",
]
if sys.version_info[:3] < (2,5,0):