Menu

#56 reStructuredText export

closed-fixed
nobody
None
trunk
2014-03-09
2010-02-08
No

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)?

Discussion

  • Anonymous

    Anonymous - 2011-03-24

    I'm working on a bibtex sphinx extension and I've created a doctree backend for pybtex:

    https://bitbucket.org/mtroffaes/sphinx-contrib/src/tip/bibtex/sphinxcontrib/bibtex/backends/doctree.py

    I had to patch the pybtex source to allow backends with non-string rendering. Will try to attach it...

     
  • Anonymous

    Anonymous - 2011-03-24

    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):

     
  • Anonymous

    Anonymous - 2011-03-24
     
  • Densetsu no Ero-Sennin

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

    Can't be converted:

    • _milestone:
    • _priority: 5
     
  • Densetsu no Ero-Sennin

    • status: open --> closed-fixed
    • Version: --> trunk