def write_citing_rst(_): here = os.path.dirname(__file__) with open(os.path.join(here, 'citing.rst.in'), 'r') as fobj: citing = fobj.read() citing += '\n' + zenodo.format_citations(597016) out = os.path.join(here, 'citing.rst') with open(out, 'w') as f: f.write(citing) logger.info('[zenodo] wrote {0}'.format(out))
def write_citing_rst(app): """Render the ``citing.rst`` file using the Zenodo API """ logger = logging.getLogger('zenodo') citing = SPHINX_DIR / "citing.rst" content = citing.with_suffix(".rst.in").read_text() content += '\n' + zenodo.format_citations(597016) citing.write_text(content) logger.info('[zenodo] wrote {0}'.format(citing))
def write_citing_rst(_): logger = logging.getLogger('zenodo') here = os.path.dirname(__file__) with open(os.path.join(here, 'citing.rst.in'), 'r') as fobj: citing = fobj.read() citing += '\n' + zenodo.format_citations(597016) out = os.path.join(here, 'citing.rst') with open(out, 'w') as f: f.write(citing) logger.info('[zenodo] wrote {0}'.format(out))