Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to manipulate .odt file downloaded from Google docs #68

Closed
tddrmllr opened this issue Jun 25, 2015 · 7 comments
Closed

Unable to manipulate .odt file downloaded from Google docs #68

tddrmllr opened this issue Jun 25, 2015 · 7 comments

Comments

@tddrmllr
Copy link

I'm trying to download a Google doc in .odt format, manipulate it with odf-report, then update the Google doc with the modified content.

I'm able to create a .odt file locally (with OpenOffice), manipulate it with odf-report, then upload it to Google just fine. But if I use a .odt file downloaded from Google docs, odf-report doesn't make the changes. Any idea why?

I experienced some trouble with Google spreadsheets in a different context roo-rb/roo#166. Perhaps Google docs has some similar nuances?

Below is a gist that outlines my proof-of-concept implementation. It also has a sample .odt file that was downloaded from Google, and that does not work with odf-report.

https://gist.github.com/tikitikifoofoo/3cef692c7fa7f66a9ffa#file-00test-odt

@atzkey
Copy link

atzkey commented Jul 5, 2015

I confirm this issue. Opening the downloaded file in the OS X's TextEdit and saving it (without making any changes) seems to fix the issue, so there are definitely some quirks with Google docs exporter, even though it generates seemingly valid files.

@frenkel
Copy link

frenkel commented Nov 24, 2015

In my testing I discoved that the Google Docs xml's contain extra text:span items around the brackets, which will result in the tags not being recognized. Saving in LibreOffice merges the tags and fixes the problem. I think the best workaround is a detection of these text:span elements and replacing them as well.

@frenkel
Copy link

frenkel commented Nov 24, 2015

I've created a pull request for this: #76

@sandrods
Copy link
Owner

sandrods commented Jun 2, 2020

Sorry for long time, but I was no able to reproduce your problem. It only happens when you break the golde rule: NEVER edit your placeholders. If you have to chage it, delete and type all over again.

@sandrods sandrods closed this as completed Jun 2, 2020
@frenkel
Copy link

frenkel commented Jun 3, 2020

@sandrods Did you look at the pull request?

@sandrods
Copy link
Owner

sandrods commented Jun 3, 2020

Yes I did, but as I said above, I couldn't confirm the behavior you pointed out. I examined odts downloaded from Google Docs and could not find the issue described.
Can you confirm it is still happening?

@frenkel
Copy link

frenkel commented Jun 4, 2020

Ah I see that Google fixed the problem on their end. But wouldn't it be wise to merge the PR anyways? It can't hurt to ignore empty tags that might be added to the odt by some program that doesn't keep the source clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants