Use Boxes.description in the cli help and the web interface
This commit is contained in:
parent
3dfd99c68a
commit
1b2f5791bd
|
@ -216,7 +216,10 @@ class Boxes:
|
|||
|
||||
def __init__(self):
|
||||
self.formats = formats.Formats()
|
||||
self.argparser = ArgumentParser(description=self.__doc__)
|
||||
description = self.__doc__
|
||||
if self.description:
|
||||
description += "\n\n" + self.description
|
||||
self.argparser = ArgumentParser(description=description)
|
||||
self.edgesettings = {}
|
||||
self.inkscapefile = None
|
||||
self.argparser._action_groups[1].title = self.__class__.__name__ + " Settings"
|
||||
|
|
|
@ -24,6 +24,7 @@ import time
|
|||
import codecs
|
||||
import mimetypes
|
||||
import re
|
||||
import markdown
|
||||
|
||||
# Python 2 vs Python 3 compat
|
||||
try:
|
||||
|
@ -195,6 +196,10 @@ class BServer:
|
|||
-->
|
||||
<div class="clear"></div>
|
||||
<hr />
|
||||
""")
|
||||
if box.description:
|
||||
result.append(markdown.markdown(box.description))
|
||||
result.append("""
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -211,7 +216,7 @@ class BServer:
|
|||
|
||||
</body>
|
||||
</html>
|
||||
""")
|
||||
""" )
|
||||
return (s.encode("utf-8") for s in result)
|
||||
|
||||
def menu(self):
|
||||
|
|
3
setup.py
3
setup.py
|
@ -23,7 +23,6 @@ class CustomBuildExtCommand(build_py):
|
|||
[i for i in glob.glob(os.path.join("inkex", "*.inx"))]))
|
||||
build_py.run(self)
|
||||
|
||||
|
||||
setup(
|
||||
name='boxes',
|
||||
version='0.1',
|
||||
|
@ -32,7 +31,7 @@ setup(
|
|||
author_email='florian@festi.info',
|
||||
url='https://github.com/florianfesti/boxes',
|
||||
packages=find_packages(),
|
||||
install_requires=['cairocffi==0.8.0'],
|
||||
install_requires=['cairocffi==0.8.0', 'markdown'],
|
||||
scripts=['scripts/boxes', 'scripts/boxesserver'],
|
||||
cmdclass={
|
||||
'build_py': CustomBuildExtCommand,
|
||||
|
|
Loading…
Reference in New Issue