odt

Python — Parsing files (docx, pdf and odt) and converting the content into my data model

旧巷老猫 提交于 2019-12-06 04:31:56
I'm writing an import/export tool for importing docx, pdf, and odt files; in which a book has been written. We already have a tool for the .epub format, and we'd like to extend the functionality beyond that, so users of the site can have more flexibility. So far I've looked at PDFMiner and also found out that docx is just based on the openxml format, so the word/document.xml is essentially the file containing the whole thing, and I can parse it with lxml. The question I have is: I'm hoping to parse the contents of these files, and from that content, extract things like chapter names, images

Converting HTML to odt, doc, docx

丶灬走出姿态 提交于 2019-12-04 19:17:21
问题 Is there an easy way to convert HTML(with CSS styles and embedded images) to ODT, DOCX, DOC from the command line on linux server. I searched a lot but have not found a good option. There was a problem the same way to convert to PDF, decided by wkhtmltopdf. Perhaps there are ways to convert the resulting PDF documents to other formats? 回答1: To convert to odt it's pretty easy after installing pandoc. After the relatively hard part: from odt (or even html ) you can script (Open|Libre)Office via

Django create .odt or .docx documents to download

折月煮酒 提交于 2019-12-04 12:46:40
I need to generate either .odt or .docx files based on the information I have in my database. Let's say I have a model: class Contact(models.Model): first_name = models.CharField() last_name = models.CharField() email = models.EmailField() I want that users are able to generate office document that contains that information and also some other text. I took a look for this example which is using python-docx and it gives me an idea how to generate that document. But I can't figure out where this file is saved or is it even created. In my template I have a link: <a href="{{ contact.generate_docx

how to share odt/doc documents over git

别等时光非礼了梦想. 提交于 2019-12-04 03:10:22
the idea is that i want to share documents over git i thought about using Text Document (looks like docx,odt in functionality ) that can be edited with any text editor (not binary). where to find something like this ? any better solution? Have you considered using LaTeX instead of doc or odt? This way you can edit the documents with any text editor and get good looking results. Better yet: you have proper diffs between revisions (no matter the SCM you use). If you don't like the idea of editing the document in a simple text editor take a look at LyX . It provides a gui for editing documents

Converting HTML to odt, doc, docx

拥有回忆 提交于 2019-12-03 12:35:56
Is there an easy way to convert HTML(with CSS styles and embedded images) to ODT, DOCX, DOC from the command line on linux server. I searched a lot but have not found a good option. There was a problem the same way to convert to PDF, decided by wkhtmltopdf. Perhaps there are ways to convert the resulting PDF documents to other formats? Zsolt Botykai To convert to odt it's pretty easy after installing pandoc . After the relatively hard part: from odt (or even html ) you can script (Open|Libre)Office via e.g. unoconv Or you can like: abiword --to=doc filename.odt Also see this thread , and this

Using variable images with django-webodt

旧街凉风 提交于 2019-11-30 16:06:44
问题 Is anyone using django-webodt? Looking through the documentation, I can't find anything about using images in a document. I want to insert "variable" images (ImageField) in my ODT document. Is this possible? I'm using the OpenOffice backend. 回答1: I don't know if it is a solution for you, I use pod in my projects with nice results, I have never tested to include images but it is documented: Quoting pod doc: Integrating external files or images into the result: the document function The

Using variable images with django-webodt

佐手、 提交于 2019-11-30 16:04:24
Is anyone using django-webodt ? Looking through the documentation, I can't find anything about using images in a document. I want to insert "variable" images (ImageField) in my ODT document. Is this possible? I'm using the OpenOffice backend. I don't know if it is a solution for you, I use pod in my projects with nice results, I have never tested to include images but it is documented: Quoting pod doc : Integrating external files or images into the result: the document function The document function allows you to integrate, into the ODT result, images or files that come from external sources.

How to convert .docx to .odt with Libreoffice on Ubuntu bash

二次信任 提交于 2019-11-30 12:11:15
There is a problem for converting DOCX to PDF using Libreoffice.(in RTL documents) but converting same document saved in ODT format will works fine. Anyone knows how to convert an existing DOCX file to ODT using Ubuntu bash? Then you can use this command directly from command line libreoffice --headless --convert-to odt *.docx You can directly save it to odt format in Libre Office. Click on save as Select ODT as format Name the file Click on ok 来源: https://stackoverflow.com/questions/21845789/how-to-convert-docx-to-odt-with-libreoffice-on-ubuntu-bash

Add styling rules in pandoc tables for odt/docx output (table borders)

我只是一个虾纸丫 提交于 2019-11-29 23:05:42
I'm generating some odt/docx reports via markdown using knitr and pandoc and am now wondering how you'd go about formating tables. Primarily I'm interested in adding rules (at least top, bottom and one below the header, but being able to add arbitrary ones inside the table would be nice too). Running the following example from the pandoc documentation through pandoc (without any special parameters) just yields a "plain" table without any kind of rules/colours/guides (in either -t odt or -t docx ). +---------------+---------------+--------------------+ | Fruit | Price | Advantages | +==========

How to convert .docx to .odt with Libreoffice on Ubuntu bash

为君一笑 提交于 2019-11-29 18:41:00
问题 There is a problem for converting DOCX to PDF using Libreoffice.(in RTL documents) but converting same document saved in ODT format will works fine. Anyone knows how to convert an existing DOCX file to ODT using Ubuntu bash? 回答1: Then you can use this command directly from command line libreoffice --headless --convert-to odt *.docx 回答2: You can directly save it to odt format in Libre Office. Click on save as Select ODT as format Name the file Click on ok 来源: https://stackoverflow.com