Remove main function from generators

Generators are no longer executable on their own. Use scripts/boxes
instead.
This commit is contained in:
Florian Festi 2017-03-19 07:38:30 +01:00
parent bffd732c3f
commit 5b9c8e4d71
39 changed files with 0 additions and 313 deletions

View File

@ -64,10 +64,3 @@ class BOX(Boxes): # change class name here and below
self.close() self.close()
def main():
b = BOX() # change to class name
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -141,11 +141,3 @@ class AngledBox(Boxes):
self.close() self.close()
def main():
b = AngledBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -99,10 +99,3 @@ class Arcade(Boxes):
self.close() self.close()
def main():
b = Arcade() # change to class name
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -142,11 +142,3 @@ class BinTray(Boxes):
self.close() self.close()
def main():
b = BinTray()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/castle.py Executable file → Normal file
View File

@ -46,11 +46,3 @@ class Castle(Boxes):
self.close() self.close()
def main():
c = Castle()
c.parseArgs()
c.render()
if __name__ == '__main__':
main()

8
boxes/generators/closedbox.py Executable file → Normal file
View File

@ -55,11 +55,3 @@ class ClosedBox(Boxes):
self.close() self.close()
def main():
b = ClosedBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -78,10 +78,3 @@ class DisplayShelf(Boxes): # change class name here and below
self.close() self.close()
def main():
b = DisplayShelf() # change to class name
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/drillbox.py Executable file → Normal file
View File

@ -69,11 +69,3 @@ in 0.5mm steps, 3 holes each size"""
self.close() self.close()
def main():
b = DrillBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/flexbox.py Executable file → Normal file
View File

@ -111,11 +111,3 @@ class FlexBox(boxes.Boxes):
self.close() self.close()
def main():
b = FlexBox()
b.parseArgs()
b.render()
if __name__ == "__main__":
main()

8
boxes/generators/flexbox2.py Executable file → Normal file
View File

@ -112,11 +112,3 @@ class FlexBox2(Boxes):
self.close() self.close()
def main():
b = FlexBox2()
b.parseArgs()
b.render()
if __name__ == "__main__":
main()

8
boxes/generators/flexbox3.py Executable file → Normal file
View File

@ -161,11 +161,3 @@ class FlexBox3(Boxes):
self.close() self.close()
def main():
b = FlexBox3() # 100, 40, 100, r=20, h=10, thickness=4.0)
b.parseArgs()
b.render()
if __name__ == "__main__":
main()

View File

@ -106,11 +106,3 @@ class FlexBox4(Boxes):
self.close() self.close()
def main():
b = FlexBox4()
b.parseArgs()
b.render()
if __name__ == "__main__":
main()

8
boxes/generators/flextest.py Executable file → Normal file
View File

@ -46,11 +46,3 @@ class FlexTest(Boxes):
self.close() self.close()
def main():
f = FlexTest()
f.parseArgs()
f.render()
if __name__ == '__main__':
main()

View File

@ -37,11 +37,3 @@ class FlexTest2(Boxes):
self.close() self.close()
def main():
f = FlexTest()
f.parseArgs()
f.render()
if __name__ == '__main__':
main()

8
boxes/generators/folder.py Executable file → Normal file
View File

@ -49,11 +49,3 @@ class Folder(Boxes):
self.close() self.close()
def main():
f = Folder()
f.parseArgs()
f.render()
if __name__ == '__main__':
main()

View File

@ -99,11 +99,3 @@ class GearBox(Boxes):
self.close() self.close()
def main():
b = GearBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -61,11 +61,3 @@ class HingeBox(Boxes):
self.close() self.close()
def main():
b = HingeBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -65,11 +65,3 @@ class IntegratedHingeBox(Boxes):
self.close() self.close()
def main():
b = IntegratedHingeBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -89,11 +89,3 @@ class JigsawPuzzle(Boxes): # change class name here and below
self.close() self.close()
def main():
b = JigsawPuzzle()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/lamp.py Executable file → Normal file
View File

@ -124,11 +124,3 @@ class Lamp(Boxes):
self.close() 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()

8
boxes/generators/magazinefile.py Executable file → Normal file
View File

@ -86,11 +86,3 @@ class MagazinFile(Boxes):
self.close() self.close()
def main():
b = MagazinFile()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

7
boxes/generators/openbox.py Executable file → Normal file
View File

@ -52,10 +52,3 @@ class OpenBox(Boxes):
self.close() self.close()
def main():
b = OpenBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -98,11 +98,3 @@ class OttoBody(Boxes):
self.close() self.close()
def main():
b = OttoBody()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -134,10 +134,3 @@ class OttoLegs(Boxes):
self.foot(60, 40, ly, 30, move="right") self.foot(60, 40, ly, 30, move="right")
self.close() self.close()
def main():
b = OttoLegs()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -108,11 +108,3 @@ class Planetary(Boxes):
self.close() self.close()
def main():
b = Planetary()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -130,10 +130,3 @@ class PoleHook(Boxes): # change class name here and below
self.close() self.close()
def main():
b = PoleHook() # change to class name
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/printer.py Executable file → Normal file
View File

@ -190,11 +190,3 @@ class Printer(Boxes):
self.close() self.close()
def main():
p = Printer()
p.parseArgs()
p.render()
if __name__ == '__main__':
main()

View File

@ -85,11 +85,3 @@ class Pulley(Boxes):
self.close() self.close()
def main():
b = Pulley()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -95,11 +95,3 @@ class RegularBox(Boxes):
self.close() self.close()
def main():
b = RegularBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -60,10 +60,3 @@ class RobotArm(Boxes): # change class name here and below
armcls(self, servoClsA(self), servoClsB(self))(length, move="up") armcls(self, servoClsA(self), servoClsB(self))(length, move="up")
self.close() self.close()
def main():
b = RobotArm()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -334,11 +334,3 @@ class Rotary(Boxes):
self.close() self.close()
def main():
b = Box()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -82,11 +82,3 @@ class RoundedBox(Boxes):
self.close() self.close()
def main():
b = RoundedBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/silverwarebox.py Executable file → Normal file
View File

@ -91,11 +91,3 @@ using flex for rounded corners"""
self.close() self.close()
def main():
b = Silverware()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -168,10 +168,3 @@ class TrafficLight(Boxes): # change class name here and below
self.close() self.close()
def main():
b = TrafficLight() # change to class name
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

8
boxes/generators/trayinsert.py Executable file → Normal file
View File

@ -51,11 +51,3 @@ class TrayInsert(Boxes):
self.close() self.close()
def main():
b = TrayInsert()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

19
boxes/generators/traylayout.py Executable file → Normal file
View File

@ -413,22 +413,3 @@ class TrayLayout2(Layout):
"--layout", action="store", type=str) "--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()

8
boxes/generators/typetray.py Executable file → Normal file
View File

@ -108,11 +108,3 @@ class TypeTray(Boxes):
self.close() self.close()
def main():
b = TypeTray()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

View File

@ -107,10 +107,3 @@ class UBox(_TopEdge, _ChestLid):
self.close() self.close()
def main():
b = UBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()

7
boxes/generators/universalbox.py Executable file → Normal file
View File

@ -66,10 +66,3 @@ class UniversalBox(_TopEdge, _ChestLid):
self.close() self.close()
def main():
b = UniversalBox()
b.parseArgs()
b.render()
if __name__ == '__main__':
main()