def make_qr_image(self, context): logging.debug("starting make QRImage...") QRImageName = "qrcode_{}.jpg".format(md5(context)) QRImagePath = os.path.join(self.img_path, QRImageName) logging.debug("QRImagePath is %s" % QRImagePath) if not os.path.exists(QRImagePath): logging.debug("QRImage file not exists,so need make") img = qrcode.make(context, border=1) img.save(QRImagePath) logging.debug("make QRImage ok, this file size is %s" % os.path.getsize(QRImagePath)) else: logging.debug("has cache, use cache image") # Wox输入框可能会遮挡二维码 WoxAPI.hide_app() return self.show_image(QRImagePath)
def copy_clip(self, query): pyperclip.copy(query) WoxAPI.hide_app()
def copy_clip(self, query): #copy to clipboard after pressing enter copy_to_clipboard(query) WoxAPI.hide_app()