[Python] Is there a workaround for adding Microsoft Word footnotes dynamically in Python?

Discussão em 'Python' iniciado por Stack, Janeiro 31, 2025.

  1. Stack

    Stack Membro Participativo

    Currently I'm using Python Flask to build an application to generate a formatted document from data stored in sql database. My idea was to detect the footnotes marks in the text and render footnotes on the run:

    text = ''' This is a sample text {{footnotes:Yes it is!}} It's just that. '''
    footnote = text[text.find("{{footnotes:")+12:text.find("}}")]


    However, it seems that python-docx does not offer footnotes manipulation at this very moment.Are there any other packages in Python (or node.js, preferably not for the application would be made from scratch all over again) to add footnotes to .doc file?

    Is it a viable route to first make the document Markdown and then somehow convert it into .docx with footnotes properties?

    Continue reading...

Compartilhe esta Página