reStructuredText export

Issue #49 resolved
Former user created an issue

I'd like to see reStructuredText as an export option. Do you think pybtex could be used as bibliographic tool for Docutils (http://docutils.sf.net~)?

Comments (9)

  1. Matthias Troffaes

    Seems like I can't attach a file. Anyway, the patch is trivial, let me paste it here.

    modified file 'pybtex/backends/__init__.py'

    --- pybtex/backends/__init__.py 2011-03-03 14:15:55 +0000 +++ pybtex/backends/__init__.py 2011-03-24 15:31:24 +0000 @​@​ -48,6 +48,10 @​@​

    raise NotImplementedError

    + def render_sequence(self, text): + """Render a sequence of rendered text objects.""" + return "".join(text) + def write_entry(self, label, key, text): raise NotImplementedError

    modified file 'pybtex/richtext.py'

    --- pybtex/richtext.py 2011-01-06 18:14:02 +0000 +++ pybtex/richtext.py 2011-03-24 15:30:30 +0000 @​@​ -125,7 +125,7 @​@​ text.append(backend.format_text(item)) else: text.append(item.render(backend)) - return "".join(text) + return backend.render_sequence(text)

    def enumerate(self): for n, child in enumerate(self):

  2. Andrey Golovizin

    Ticket moved from /p/pybtex/feature-requests/4/

    Can't be converted:

    • _milestone:
    • _priority: 5
  3. Luis Belmar-Letelier

    How with sphinxcontrib-bibtex can we do the equivalent of

    pybtex-format Rnews.bib out.rst
    

    to get restructured text citation in out.rst ?

  4. Luis Belmar-Letelier

    ok but here is not cli in sphinxcontrib-bibtex ;(

    I'm not using sphinx, so does that mean that I have to use the API and create my own script ?

  5. Log in to comment