How to use the pandoc.core.PANDOC_PATH function in pandoc

To help you get started, we’ve selected a few pandoc 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 HatsuneMiku / googleDriveAccess / setup.py View on Github external
from distutils.core import setup
import os

try:
  import pandoc
  nopd = False
  if os.name != 'nt':
    pandoc.core.PANDOC_PATH = 'pandoc'
  else:
    if 'LOCALAPPDATA' in os.environ: app = os.getenv('LOCALAPPDATA')
    else: app = os.getenv('APPDATA')
    pandoc.core.PANDOC_PATH = '%s/Pandoc/pandoc' % (app, )
except (Exception, ), e:
  nopd = True

PKG_TITLE = 'googleDriveAccess'
mdl = __import__(PKG_TITLE)
PKG_VER = mdl.__version__
PKG_URL = mdl.__url__
AUTHOR = mdl.__author__
AUTHOR_EMAIL = mdl.__author_email__
PKG_KWD = '''\
GAE google app engine client api OAuth2 gmail mail calendar drive googledrive \
recursive upload backup import export apps script geocoding spreadsheet'''
PKG_DSC = '''\
update spreadsheet with OAuth2 and recursive upload to Google Drive \
( supports OAuth2, Calendar, Gmail, geocoding, spreadsheet, etc ) \
and import-export Google Apps Script source code'''
github samuelcolvin / grablib / build.py View on Github external
import os, re
    
print 'generating long_descriptions docs for PyPi...'
import pandoc
pandoc.core.PANDOC_PATH = '/usr/bin/pandoc'
doc = pandoc.Document()
readme_file = 'README.md'
doc.markdown = open(readme_file, 'r').read()
docs_file = 'GrabLib/docs.txt'
open(docs_file,'w').write(doc.rst)
print '%s converted to rst and written to %s' % (readme_file, docs_file)
print 'changing version number'
setup_text = open('setup.py','r').read()
s=re.search("version *= *'(.+?)'", setup_text)
v = s.groups()[0]
print 'setting version to: %s' % v
init_file = 'GrabLib/__init__.py'
init_text = open(init_file, 'r').read()
init_text, subcount = re.subn('__version__ .*', "__version__ = 'v%s'" % v, init_text)
if subcount == 0:
    print 'WARNING: failed to set version in %s' % init_file
github merll / docker-registry-util / setup.py View on Github external
def include_readme():
    try:
        import pandoc
    except ImportError:
        return ''
    pandoc.core.PANDOC_PATH = find_executable('pandoc')
    readme_file = os.path.join(os.path.dirname(__file__), 'README.md')
    doc = pandoc.Document()
    with open(readme_file, 'r') as rf:
        doc.markdown = rf.read().encode()
        return doc.rst.decode()
github merll / docker-map / setup.py View on Github external
def include_readme():
    try:
        import pandoc
    except ImportError:
        return b''
    pandoc.core.PANDOC_PATH = find_executable('pandoc')
    readme_file = os.path.join(os.path.dirname(__file__), 'README.md')
    doc = pandoc.Document()
    with open(readme_file, 'r') as rf:
        doc.markdown = rf.read()
        return doc.rst.decode('utf-8')
github sendgrid / open-source-library-data-collector / fix_README.py View on Github external
import pandoc
import os

pandoc.core.PANDOC_PATH = '/usr/local/bin/pandoc'

doc = pandoc.Document()
doc.markdown = open('README.md').read()
f = open('README.txt','w+')
f.write(doc.rst)
f.close()

pandoc

Pandoc Documents for Python

MIT
Latest version published 3 months ago

Package Health Score

68 / 100
Full package analysis