Skip to content

Commit

Permalink
First attempt at getting entry point scripts working.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Jun 19, 2007
1 parent 327a1aa commit 1fab2cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
'zope.interface',
'zope.schema',
],
entry_points = """
[console_scripts]
dtd = z3c.rml.dtd:generate
reference = z3c.rml.rml-reference:main
""",
dependency_links = ['http://download.zope.org/distribution']
)

6 changes: 5 additions & 1 deletion src/z3c/rml/rml-reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def extractExamples(directory):
return examples


if __name__ == '__main__':
def main():
examples = extractExamples(EXAMPLES_DIRECTORY)

template = pagetemplate.RMLPageTemplateFile('rml-reference.pt')
Expand All @@ -247,3 +247,7 @@ def extractExamples(directory):

pdf = template(types=getAttributeTypes(), directives=directives)
open('rml-reference.pdf', 'wb').write(pdf)


if __name__ == '__main__':
main()

0 comments on commit 1fab2cd

Please sign in to comment.