def _rich_help(*args): with warnings.catch_warnings(): # ignore warnings about pandoc, nodejs, etc. warnings.filterwarnings('ignore', message='Node.js') output, resources = export_html(_rich_help.__richdoc__, config=Config({ 'CSSHTMLHeaderPreprocessor' : { 'enabled' : False }, 'HTMLExporter' : { 'template_file' : 'basic' } })) # include style in every output; tried it global on import, but if the import is # re-run it's lost because there is no output on a repeat module import output = '''<style> .output .input_prompt, .output .output .output_prompt, .output .output .prompt { display: none; } .output .input_area pre { padding: 0.4em; } </style> ''' + output display(HTML(output))
password = args.password else: raise Exception(err_msg.format("password")) if args.template: tpl = args.template if tpl in ["basicx"]: pathtpl, _ = os.path.split(os.path.abspath(__file__)) pathtpl = os.path.join(pathtpl, "templates", "{}.tpl".format(tpl)) post = """<style>{}</style>\n""".format(CSS_CODE) else: pathtpl = "basic" post = "" if args.nb: post += nbc.export_html(nb=args.nb, template_file=pathtpl, config=c)[0] else: raise Exception(err_msg.format("nb")) if args.title: title = args.title else: raise Exception(err_msg.format("title")) if args.categories: categories = args.categories else: categories = ["Uncategorized"] if args.tags: tags = args.tags
server = xmlrpclib.ServerProxy(args.xmlrpc_url) else: raise Exception(err_msg.format('xmlrpc-url')) if args.user: user = args.user else: raise Exception(err_msg.format('user')) if args.password: password = args.password else: raise Exception(err_msg.format('password')) if args.nb: post = nbc.export_html(nb = args.nb, template_file="basic")[0] else: raise Exception(err_msg.format('nb')) if args.title: title = args.title else: raise Exception(err_msg.format('title')) if args.categories: categories = args.categories else: categories = ['Uncategorized'] if args.tags: tags = args.tags
password = args.password else: raise Exception(err_msg.format('password')) if args.template: tpl = args.template if tpl in ['basicx']: pathtpl, _ = os.path.split(os.path.abspath(__file__)) pathtpl = os.path.join(pathtpl, 'templates', "{}.tpl".format(tpl)) post = """<style>{}</style>\n""".format(CSS_CODE) else: pathtpl = "basic" post = "" if args.nb: post += nbc.export_html(nb=args.nb, template_file=pathtpl, config=c)[0] else: raise Exception(err_msg.format('nb')) if args.title: title = args.title else: raise Exception(err_msg.format('title')) if args.categories: categories = args.categories else: categories = ['Uncategorized'] if args.tags: tags = args.tags