summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-03-22 21:27:39 +0100
committerJan Pokorný <jpokorny@redhat.com>2013-03-22 21:27:39 +0100
commit493f806068e89485d19ccd705b1cd8ad74e1d2e6 (patch)
tree27fa106398f8a205f79a51cd68b6769d6251ef38
parentb8a250e5d31195163cf1a0655ba19b06a70bec24 (diff)
downloadontogen-493f806068e89485d19ccd705b1cd8ad74e1d2e6.tar.gz
ontogen-493f806068e89485d19ccd705b1cd8ad74e1d2e6.tar.xz
ontogen-493f806068e89485d19ccd705b1cd8ad74e1d2e6.zip
Make quickstart/template.py work out of the box
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--ontogen.py4
-rw-r--r--quickstart/README1
l---------quickstart/ontogen1
-rwxr-xr-x[-rw-r--r--]quickstart/template.py4
4 files changed, 6 insertions, 4 deletions
diff --git a/ontogen.py b/ontogen.py
index 75318a0..96a578b 100644
--- a/ontogen.py
+++ b/ontogen.py
@@ -7,7 +7,7 @@ from sys import stdout, stderr
from datetime import date
from textwrap import TextWrapper, dedent
from os import extsep, mkdir, symlink, remove
-from os.path import basename, exists, isdir, islink, splitext
+from os.path import basename, dirname, exists, isdir, islink, join, splitext
from subprocess import call
from shlex import split
#import codecs
@@ -21,7 +21,7 @@ log = logging.getLogger(__name__)
VERSIONSEP = '/'
ONTSEP = '#'
-TEMPLATE_GENSHI = 'ontogen.template'
+TEMPLATE_GENSHI = join(dirname(__file__), 'ontogen.template')
TEMPLATE_XSLT = 'ns-schema.xsl'
TEXT_INDENT = ' '
TW = TextWrapper(initial_indent=TEXT_INDENT, subsequent_indent=TEXT_INDENT)
diff --git a/quickstart/README b/quickstart/README
new file mode 100644
index 0000000..aabaf17
--- /dev/null
+++ b/quickstart/README
@@ -0,0 +1 @@
+The "ontogen" symlink mimics the git submodule within consuming repo.
diff --git a/quickstart/ontogen b/quickstart/ontogen
new file mode 120000
index 0000000..a96aa0e
--- /dev/null
+++ b/quickstart/ontogen
@@ -0,0 +1 @@
+.. \ No newline at end of file
diff --git a/quickstart/template.py b/quickstart/template.py
index e2a1a39..0eaea7f 100644..100755
--- a/quickstart/template.py
+++ b/quickstart/template.py
@@ -4,7 +4,7 @@
from sys import argv
#from genshi.input import XML
-from ontologygen import Property, Class, Example, Ontology, Ontologies
+from ontogen.ontogen import Property, Class, Example, Ontology, Ontologies
BASE = 'http://purl.org/net/foo'
@@ -53,7 +53,7 @@ class baz(bar):
class ex_0_1_schema(Example):
"""Illustrative figure of the vocabulary."""
- image = '0.2.svg'
+ image = '0.1.svg'
class ex_0_1(Example):