Mark generators which should not be shown in the web interface

This commit is contained in:
Florian Festi 2016-07-31 16:36:33 +02:00
parent 77ba187c70
commit b6d84b5c58
5 changed files with 15 additions and 2 deletions

View File

@ -176,6 +176,8 @@ class ArgparseEdgeType:
class Boxes: class Boxes:
"""Main class -- Generator should sub class this """ """Main class -- Generator should sub class this """
webinterface = True
def __init__(self): def __init__(self):
self.formats = formats.Formats() self.formats = formats.Formats()
self.argparser = ArgumentParser(description=self.__doc__) self.argparser = ArgumentParser(description=self.__doc__)

View File

@ -16,8 +16,11 @@
from boxes import * from boxes import *
class Box(Boxes): class BOX(Boxes): # change class name here and below
"""DESCRIPTION""" """DESCRIPTION"""
webinterface = False # Change to make visible in web interface
def __init__(self): def __init__(self):
Boxes.__init__(self) Boxes.__init__(self)
# remove cli params you do not need # remove cli params you do not need
@ -53,7 +56,7 @@ class Box(Boxes):
self.close() self.close()
def main(): def main():
b = Box() b = BOX() # change to class name
b.parseArgs() b.parseArgs()
b.render() b.render()

View File

@ -18,6 +18,8 @@ from boxes import *
class Castle(Boxes): class Castle(Boxes):
webinterface = False
def __init__(self): def __init__(self):
Boxes.__init__(self) Boxes.__init__(self)

View File

@ -56,6 +56,9 @@ class RoundedTriangle(edges.Edge):
return 90 return 90
class Lamp(Boxes): class Lamp(Boxes):
webinterface = False
def __init__(self): def __init__(self):
Boxes.__init__(self) Boxes.__init__(self)

View File

@ -19,6 +19,9 @@ from boxes import *
class Printer(Boxes): class Printer(Boxes):
"""Work in progress""" """Work in progress"""
webinterface = False
def __init__(self, r=250, h=400, d_c=100): def __init__(self, r=250, h=400, d_c=100):
Boxes.__init__(self) Boxes.__init__(self)
self.r = r self.r = r