How to use the pypandoc.get_pandoc_formats function in pypandoc

To help you get started, we’ve selected a few pypandoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bebraw / pypandoc / tests.py View on Github external
def test_get_pandoc_formats(self):
        inputs, outputs = pypandoc.get_pandoc_formats()
        self.assertTrue("markdown" in inputs)
        self.assertTrue("json" in inputs)
        self.assertTrue("twiki" in inputs)
        self.assertTrue("markdown" in outputs)
github jbaiter / zotero-cli / zotero_cli / cli.py View on Github external
break
            elif test_resp.status_code == 404:
                click.echo("Invalid WebDAV path, does not exist.")
                config['webdav_path'] = None
            elif test_resp.status_code == 401:
                click.echo("Bad credentials.")
                config['webdav_user'] = None
            else:
                click.echo("Unknown error, please check your settings.")
                click.echo("Server response code was: {}"
                           .format(test_resp.status_code))
                config['webdav_path'] = None
                config['webdav_user'] = None
    config['sync_method'] = sync_method

    markup_formats = pypandoc.get_pandoc_formats()[0]
    config['note_format'] = select(zip(markup_formats, markup_formats),
                                   default=markup_formats.index('markdown'),
                                   prompt="Select markup format for notes")
    save_config(config)
    zot = ZoteroBackend(config['api_key'], config['library_id'], 'user')
    click.echo("Initializing local index...")
    num_synced = zot.synchronize()
    click.echo("Synchronized {} items.".format(num_synced))
github podoc / podoc / podoc / utils.py View on Github external
def get_pandoc_formats():
    import pypandoc
    return pypandoc.get_pandoc_formats()
github raghur / easyblogger / blogger / main.py View on Github external
def parse_args(sysargv):
    pandocInputFormats, pandocOutputFormats = pypandoc.get_pandoc_formats()
    parser = argparse.ArgumentParser(
        prog='easyblogger',
        description="Easily manage posts on Blogger blogs",
        fromfile_prefix_chars='@')
    parser.add_argument(
        "-i",
        "--clientid",
        help="Your API Client id",
        default="132424086208.apps.googleusercontent.com")
    parser.add_argument(
        "-s",
        "--secret",
        help="Your API Client secret",
        default="DKEk2rvDKGDAigx9q9jpkyqI")
    parser.add_argument(
        "-v",