Remove main function from generators
Generators are no longer executable on their own. Use scripts/boxes instead.
This commit is contained in:
parent
bffd732c3f
commit
5b9c8e4d71
|
@ -64,10 +64,3 @@ class BOX(Boxes): # change class name here and below
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = BOX() # change to class name
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -141,11 +141,3 @@ class AngledBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = AngledBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -99,10 +99,3 @@ class Arcade(Boxes):
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = Arcade() # change to class name
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -142,11 +142,3 @@ class BinTray(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = BinTray()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -46,11 +46,3 @@ class Castle(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
c = Castle()
|
||||
c.parseArgs()
|
||||
c.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -55,11 +55,3 @@ class ClosedBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = ClosedBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -78,10 +78,3 @@ class DisplayShelf(Boxes): # change class name here and below
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = DisplayShelf() # change to class name
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -69,11 +69,3 @@ in 0.5mm steps, 3 holes each size"""
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = DrillBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -111,11 +111,3 @@ class FlexBox(boxes.Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = FlexBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -112,11 +112,3 @@ class FlexBox2(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = FlexBox2()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -161,11 +161,3 @@ class FlexBox3(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = FlexBox3() # 100, 40, 100, r=20, h=10, thickness=4.0)
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -106,11 +106,3 @@ class FlexBox4(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = FlexBox4()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -46,11 +46,3 @@ class FlexTest(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
f = FlexTest()
|
||||
f.parseArgs()
|
||||
f.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -37,11 +37,3 @@ class FlexTest2(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
f = FlexTest()
|
||||
f.parseArgs()
|
||||
f.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -49,11 +49,3 @@ class Folder(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
f = Folder()
|
||||
f.parseArgs()
|
||||
f.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -99,11 +99,3 @@ class GearBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = GearBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -61,11 +61,3 @@ class HingeBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = HingeBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -65,11 +65,3 @@ class IntegratedHingeBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = IntegratedHingeBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -89,11 +89,3 @@ class JigsawPuzzle(Boxes): # change class name here and below
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = JigsawPuzzle()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -124,11 +124,3 @@ class Lamp(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
l = Lamp()
|
||||
l.parseArgs()
|
||||
l.render(r=4 * 25.4, w=20, x=270, y=150, h=100)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -86,11 +86,3 @@ class MagazinFile(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = MagazinFile()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -52,10 +52,3 @@ class OpenBox(Boxes):
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = OpenBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -98,11 +98,3 @@ class OttoBody(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = OttoBody()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -134,10 +134,3 @@ class OttoLegs(Boxes):
|
|||
self.foot(60, 40, ly, 30, move="right")
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = OttoLegs()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -108,11 +108,3 @@ class Planetary(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = Planetary()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -130,10 +130,3 @@ class PoleHook(Boxes): # change class name here and below
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = PoleHook() # change to class name
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -190,11 +190,3 @@ class Printer(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
p = Printer()
|
||||
p.parseArgs()
|
||||
p.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -85,11 +85,3 @@ class Pulley(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = Pulley()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -95,11 +95,3 @@ class RegularBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = RegularBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -60,10 +60,3 @@ class RobotArm(Boxes): # change class name here and below
|
|||
armcls(self, servoClsA(self), servoClsB(self))(length, move="up")
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = RobotArm()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -334,11 +334,3 @@ class Rotary(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = Box()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -82,11 +82,3 @@ class RoundedBox(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = RoundedBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -91,11 +91,3 @@ using flex for rounded corners"""
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = Silverware()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -168,10 +168,3 @@ class TrafficLight(Boxes): # change class name here and below
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = TrafficLight() # change to class name
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -51,11 +51,3 @@ class TrayInsert(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = TrayInsert()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -413,22 +413,3 @@ class TrayLayout2(Layout):
|
|||
"--layout", action="store", type=str)
|
||||
|
||||
|
||||
def main():
|
||||
l = Layout()
|
||||
l.parseArgs()
|
||||
if l.x and l.y:
|
||||
l.fillDefault(l.x, l.y)
|
||||
if l.output:
|
||||
with open(l.output, "w") as f:
|
||||
f.write(str(l))
|
||||
else:
|
||||
print(l)
|
||||
elif l.input:
|
||||
l.parse(l.input)
|
||||
l.render()
|
||||
else:
|
||||
l.argparser.print_usage()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -108,11 +108,3 @@ class TypeTray(Boxes):
|
|||
self.close()
|
||||
|
||||
|
||||
def main():
|
||||
b = TypeTray()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -107,10 +107,3 @@ class UBox(_TopEdge, _ChestLid):
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = UBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -66,10 +66,3 @@ class UniversalBox(_TopEdge, _ChestLid):
|
|||
|
||||
self.close()
|
||||
|
||||
def main():
|
||||
b = UniversalBox()
|
||||
b.parseArgs()
|
||||
b.render()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue