def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.useBinary = options.addWidget(gui.CheckBox("Binary file", False)) self.useExpressions = options.addWidget( gui.CheckBox("Expressions", False)) self.usePoses = options.addWidget(gui.CheckBox("Poses", False))
def __init__(self): Exporter.__init__(self) self.name = "MakeHuman Exchange (mhx2)" self.filter = "MakeHuman Exchange (*.mhx2)" self.fileExtension = "mhx2" self.orderPriority = 80.0 self.useBinary = False
def build(self, options, taskview): Exporter.build(self, options, taskview) stlOptions = [] self.stlAscii = options.addWidget( gui.RadioButton(stlOptions, "Ascii", selected=True)) self.stlBinary = options.addWidget( gui.RadioButton(stlOptions, "Binary"))
def build(self, options, taskview): Exporter.build(self, options, taskview) self.useNormals = options.addWidget(gui.CheckBox("Normals", False)) self.rotate90X = options.addWidget(gui.CheckBox("Z up (Rotate 90 X)", False)) self.rotate90Z = options.addWidget(gui.CheckBox("Face X (Rotate 90 Z)", False)) self.expressions = options.addWidget(gui.CheckBox("Expressions", False)) self.useCustomTargets = options.addWidget(gui.CheckBox("Custom targets", False))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) stlOptions = [] self.stlAscii = options.addWidget(gui.RadioButton(stlOptions, "ASCII", selected=True)) self.stlBinary = options.addWidget(gui.RadioButton(stlOptions, "Binary"))
def do_POST(self): print( "incomming http: ", self.path ) if self.path.startswith("/export"): form = cgi.FieldStorage( fp=self.rfile, headers=self.headers, environ={'REQUEST_METHOD':'POST', 'CONTENT_TYPE':self.headers['Content-Type'], }) userid = form["userid"].value password = form["password"].value self.exporter = Exporter() #self.exporter = FakeLogic() exp = self.exporter exp.login(userid, password) def work(): self.exporter.getLikes() for fname in ["full.json", "neat.json"]: jsonThumbData[fname] = self.exporter.getJson(fname) worker = Thread(target=work) worker.start() self.send_response(200) self.send_header("Content-type", "text/plain") self.end_headers() self.wfile.write(bytes("", "utf-8"))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.hiddenGeom = options.addWidget( gui.CheckBox("Helper geometry", False)) self.facePoseUnits = options.addWidget( gui.CheckBox("Facial pose-units", False)) orients = [] box = options.addWidget(gui.GroupBox("Orientation")) self.yUpFaceZ = box.addWidget( gui.RadioButton(orients, "Y up, face Z", True)) self.yUpFaceX = box.addWidget( gui.RadioButton(orients, "Y up, face X", False)) self.zUpFaceNegY = box.addWidget( gui.RadioButton(orients, "Z up, face -Y", False)) self.zUpFaceX = box.addWidget( gui.RadioButton(orients, "Z up, face X", False)) csyses = [] box = options.addWidget(gui.GroupBox("Bone orientation")) self.localY = box.addWidget( gui.RadioButton(csyses, "Along local Y", True)) self.localX = box.addWidget( gui.RadioButton(csyses, "Along local X", False)) self.localG = box.addWidget( gui.RadioButton(csyses, "Local = Global", False))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) orients = [] self.yUpFaceZ = options.addWidget(gui.RadioButton(orients, "Y up, face Z", True)) self.yUpFaceX = options.addWidget(gui.RadioButton(orients, "Y up, face X", False)) self.zUpFaceNegY = options.addWidget(gui.RadioButton(orients, "Z up, face -Y", False)) self.zUpFaceX = options.addWidget(gui.RadioButton(orients, "Z up, face X", False))
def build(self, options, taskview): Exporter.build(self, options, taskview) self.useNormals = options.addWidget(gui.CheckBox("Normals", False)) self.rotate90X = options.addWidget( gui.CheckBox("Z up (Rotate 90 X)", False)) self.rotate90Z = options.addWidget( gui.CheckBox("Face X (Rotate 90 Z)", False)) self.expressions = options.addWidget(gui.CheckBox( "Expressions", False)) self.useCustomShapes = options.addWidget( gui.CheckBox("Custom shapes", False))
def build(self, options, taskview): Exporter.build(self, options, taskview) #self.expressions = options.addWidget(gui.CheckBox("Expressions", False)) #self.useCustomTargets = options.addWidget(gui.CheckBox("Custom targets", False)) #self.useTPose = options.addWidget(gui.CheckBox("T-pose", False)) orients = [] self.yUpFaceZ = options.addWidget(gui.RadioButton(orients, "Y up, face Z", True)) self.yUpFaceX = options.addWidget(gui.RadioButton(orients, "Y up, face X", False)) self.zUpFaceNegY = options.addWidget(gui.RadioButton(orients, "Z up, face -Y", False)) self.zUpFaceX = options.addWidget(gui.RadioButton(orients, "Z up, face X", False))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) #self.expressions = options.addWidget(gui.CheckBox("Expressions", False)) #self.useCustomTargets = options.addWidget(gui.CheckBox("Custom targets", False)) #self.useTPose = options.addWidget(gui.CheckBox("T-pose", False)) orients = [] self.yUpFaceZ = options.addWidget(gui.RadioButton(orients, "Y up, face Z", True)) self.yUpFaceX = options.addWidget(gui.RadioButton(orients, "Y up, face X", False)) self.zUpFaceNegY = options.addWidget(gui.RadioButton(orients, "Z up, face -Y", False)) self.zUpFaceX = options.addWidget(gui.RadioButton(orients, "Z up, face X", False))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) orients = [] self.yUpFaceZ = options.addWidget( gui.RadioButton(orients, "Y up, face Z", True)) self.yUpFaceX = options.addWidget( gui.RadioButton(orients, "Y up, face X", False)) self.zUpFaceNegY = options.addWidget( gui.RadioButton(orients, "Z up, face -Y", False)) self.zUpFaceX = options.addWidget( gui.RadioButton(orients, "Z up, face X", False))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.hiddenGeom = options.addWidget(gui.CheckBox("Helper geometry", False)) self.facePoseUnits = options.addWidget(gui.CheckBox("Facial pose-units", False)) orients = [] box = options.addWidget(gui.GroupBox("Orientation")) self.yUpFaceZ = box.addWidget(gui.RadioButton(orients, "Y up, face Z", True)) self.yUpFaceX = box.addWidget(gui.RadioButton(orients, "Y up, face X", False)) self.zUpFaceNegY = box.addWidget(gui.RadioButton(orients, "Z up, face -Y", False)) self.zUpFaceX = box.addWidget(gui.RadioButton(orients, "Z up, face X", False)) csyses = [] box = options.addWidget(gui.GroupBox("Bone orientation")) self.localY = box.addWidget(gui.RadioButton(csyses, "Along local Y", True)) self.localX = box.addWidget(gui.RadioButton(csyses, "Along local X", False)) self.localG = box.addWidget(gui.RadioButton(csyses, "Local = Global", False))
def main(): try: lib = Library(conf.library_dir) if conf.action == "clean": cleaner = Cleaner(lib) print("Removing duplicates..."), cleaner.remove_duplicates() print("DONE") cleaner.report() if not conf.test: lib.flush() print("\nTraktor library updated.") else: print("\nTest run. No changes made to the library.") elif conf.action == "export": exporter = Exporter(lib, conf.export_dir) exporter.export() except Exception as e: logger.error(e, exc_info=False)
def ExporterView(request): # check if request is post if not raise Forbidden error if not request.method == 'POST': return HttpResponseForbidden() # try: # set legal types to export types = ['csv', 'xls', 'pdf'] # pass all POST params export_type = request.POST['type'] export_model = signing.loads(request.POST['model']) export_app = signing.loads(request.POST['app']) export_filters = request.POST['filters'] # check if export type is on legal list if export_type not in types: return HttpResponseNotAllowed() # get model object model = get_model(export_app, export_model) filters = json.loads(export_filters) # check if model is exportable if not model._meta.exportable: return HttpResponseNotAllowed() exporter = Exporter(model, filters, request) if export_type == 'xls': response = exporter.xls_exporter() elif export_type == 'pdf': response = exporter.pdf_exporter() elif export_type == 'csv': response = exporter.csv_exporter() return response
def main(): try: lib = Library(conf.library_dir) logger.debug("Starting") if conf.action == "clean": cleaner = Cleaner(lib) print("Removing duplicates..."), cleaner.remove_duplicates() print("DONE") cleaner.report() if not conf.test: lib.flush() print("\nTraktor library updated.") else: print("\nTest run. No changes made to the library.") elif conf.action == "export": exporter = Exporter(lib, conf.export_dir) exporter.export() except Exception as e: logger.error(e, exc_info=False)
def __init__(self): Exporter.__init__(self) self.name = "Wavefront obj" self.filter = "Wavefront (*.obj)" self.fileExtension = "obj" self.orderPriority = 60.0
def build(self, options, taskview): import gui Exporter.build(self, options, taskview)
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.binary = options.addWidget(gui.CheckBox("Binary FBX", True))
def __init__(self): Exporter.__init__(self) self.name = "Stereolithography (stl)" self.filter = "Stereolithography (*.stl)"
def __init__(self): Exporter.__init__(self) self.group = "rig" self.name = "Biovision Hierarchy BVH" self.filter = "Biovision Hierarchy (*.bvh)" self.fileExtension = "bvh"
def __init__(self): Exporter.__init__(self) self.name = "Stereolithography (stl)" self.filter = "Stereolithography (*.stl)" self.fileExtension = "stl" self.orderPriority = 5.0
def build(self, options, taskview): Exporter.build(self, options, taskview) self.expressions = options.addWidget(gui.CheckBox("Expressions", False)) self.useCustomTargets = options.addWidget(gui.CheckBox("Custom targets", False))
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.useNormals = options.addWidget(gui.CheckBox("Normals", False))
if args["--balance"]: if args["<year>"] is None and args["<month>"] is None: accbook.browse_balance() else: if Checkers.isvalid_year(args["<year>"]) and Checkers.isvalid_month(args["<month>"]): accbook.browse_balance(int(args["<year>"]), int(args["<month>"])) else: print("正しい年月を入力してください。") elif args["--delete"]: if args["<id>"] is not None and Checkers.isvalid_id(args["<id>"]): accbook.delete(int(args["<id>"])) else: print("正しいIDを入力してください。") elif args["--export"]: if Checkers.isvalid_year(args["<year>"]) and Checkers.isvalid_month(args["<month>"]): exporter = Exporter() exporter.export_markdown(int(args["<year>"]), int(args["<month>"])) else: print("正しい年月を入力してください。") elif args["--modify"]: if args["<id>"] is not None and Checkers.isvalid_id(args["<id>"]): accbook.modify(int(args["<id>"])) else: print("正しいIDを入力してください。") elif args["--qview"]: q_viewer = QuickViewer() if args["<num>"] is None: q_viewer.view() else: q_viewer.view(int(args["<num>"])) else:
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.binary = options.addWidget(gui.CheckBox("Binary FBX", False))
def __init__(self): Exporter.__init__(self) self.name = "MD5" self.filter = "MD5 (*.md5)" self.fileExtension = "md5"
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.useNormals = options.addWidget(gui.CheckBox("Normals", False)) self.helperGeom = options.addWidget(gui.CheckBox("Helper geometry", False))
def __init__(self): Exporter.__init__(self) self.group = "rig" self.name = "Skeleton (skel)" self.filter = "Skeleton (*.skel)"
def __init__(self): Exporter.__init__(self) self.name = "Wavefront obj" self.filter = "Wavefront (*.obj)"
extractor.scan_folder(input_folder, extracted_info) else: logging.info( "The '{0}' input folder is a file!".format(input_folder)) else: logging.info( "The '{0}' input folder does not exist!".format(input_folder)) if not extracted_info: logging.critical("No information could be extracted.") sys.exit(1) else: exporter = Exporter(basename=args.basename, output_folder=output_folder) if args.consolidate: exporter.export_to_xlsx_consolidated(extracted_info) else: exporter.export_to_xlsx(extracted_info)
def __init__(self): Exporter.__init__(self) self.group = "map" self.name = "Lightmap" self.filter = "PNG (*.png)"
def __init__(self): Exporter.__init__(self) self.name = "Blender exchange (mhx)" self.filter = "Blender Exchange (*.mhx)"
# import openpyxl # wb=openpyxl.Workbook() # ws=wb.create_sheet('今日统计',0) # # for irow in range(100): # ws.append(['%d' % i for i in range(20)]) # wb.save(filename='test.xlsx') from export import Exporter e = Exporter() e.export('2016-10-23')
def __init__(self): Exporter.__init__(self) self.name = "Collada (dae)" self.filter = "Collada (*.dae)"
def __init__(self): Exporter.__init__(self) self.name = "Filmbox (fbx)" self.filter = "Filmbox (*.fbx)" self.fileExtension = "fbx" self.orderPriority = 80.0
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.binary = options.addWidget(gui.CheckBox("Binary FBX", True)) self.hiddenGeom = options.addWidget(gui.CheckBox("Helper geometry", False))
def __init__(self): Exporter.__init__(self) self.group = "rig" self.name = "Skeleton (skel)" self.filter = "Skeleton (*.skel)" self.fileExtension = "skel"
def __init__(self): Exporter.__init__(self) self.name = "Ogre3D" self.filter = "Ogre3D Mesh XML (*.mesh.xml)"
def __init__(self): Exporter.__init__(self) self.name = "Ogre3D" self.filter = "Ogre3D Mesh XML (*.mesh.xml)" self.fileExtension = "mesh.xml" self.orderPriority = 60.0
def __init__(self): Exporter.__init__(self) self.name = "Blender exchange (mhx)" self.filter = "Blender Exchange (*.mhx)" self.fileExtension = "mhx" self.orderPriority = 90.0
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.useNormals = options.addWidget(gui.CheckBox("Normals", False)) self.hiddenGeom = options.addWidget(gui.CheckBox("Helper geometry", False))
def __init__(self): Exporter.__init__(self) self.name = "Collada (dae)" self.filter = "Collada (*.dae)" self.fileExtension = "dae" self.orderPriority = 95.0
def __init__(self): Exporter.__init__(self) self.name = "Filmbox (fbx)" self.filter = "Filmbox (*.fbx)" self.fileExtension = "fbx"
def build(self, options, taskview): import gui Exporter.build(self, options, taskview) self.stlBinary = options.addWidget(gui.CheckBox("Binary STL", False))
class Server(BaseHTTPRequestHandler): def do_GET(self): if self.path == "/": jsonThumbData.clear() self.send_response(200) self.send_header("Content-type", "text/html") self.end_headers() with open("index.html") as infile: index_html = infile.read() self.wfile.write(bytes(index_html, "utf-8")) # uncomment this if you want to put stylesheets etc. in # a directory, e.g. "/assets" # elif self.path.startswith("/assets/"): # path = self.path[1:] # try: # with open(path) as infile: # conts = infile.read() # self.send_response(200) # self.end_headers() # self.wfile.write(bytes(conts, "utf-8")) # except FileNotFoundError: # pass elif (self.path[1:] in ["full.json", "neat.json"]) and self.path[1:] in jsonThumbData.keys(): print("json req", self.path) path = self.path[1:] self.send_response(200) data = jsonThumbData[path] self.send_header("Content-type", "application/json") self.send_header("Content-Disposition", "attachment") self.end_headers() self.wfile.write(bytes(data, "utf-8")) else: print("bad req", self.path) self.send_response(404) self.send_header("Content-type", "text/plain") self.end_headers() self.wfile.write(bytes("", "utf-8")) def do_POST(self): print( "incomming http: ", self.path ) if self.path.startswith("/export"): form = cgi.FieldStorage( fp=self.rfile, headers=self.headers, environ={'REQUEST_METHOD':'POST', 'CONTENT_TYPE':self.headers['Content-Type'], }) userid = form["userid"].value password = form["password"].value self.exporter = Exporter() #self.exporter = FakeLogic() exp = self.exporter exp.login(userid, password) def work(): self.exporter.getLikes() for fname in ["full.json", "neat.json"]: jsonThumbData[fname] = self.exporter.getJson(fname) worker = Thread(target=work) worker.start() self.send_response(200) self.send_header("Content-type", "text/plain") self.end_headers() self.wfile.write(bytes("", "utf-8"))
def upload_cache(mydict): from export import Exporter exporter = Exporter() exporter.connect() exporter.upload_slug("cache/TateModern",mydict)