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

Already on GitHub? Sign in to your account

Untitled #5

Closed
wants to merge 6 commits into
from

Conversation

Projects
None yet
5 participants

Main changes:

  • Whole document stored in program memory - no writing to template area for adding images, and opened word documents now keep all their styling, images, footers, headers etc.
  • Search and replace now work in headers and footers
Owner

mikemaccana commented Mar 3, 2011

Sorry there were some other changes I'd forgotten to pull in. Would it be possible for you to resolve the conflicts and send another pull? I'm unfortunately a little rushed for time right now.

Merge remote branch 'upstream/master'
Merging upstream diffs in docx.py.

I've merged the changes, looks like they've been added to this pull request.

dhinds commented on f2d7a12 Mar 10, 2011

It looks like your getrelationshiplist() assumes the relationships are in order of rId in the XML? That is not a safe assumption for documents created by Word. Before seeing your patch, yesterday, I had written something like this:

relations = relationships.getchildren()
rels = len(relations) * [None]
for r in relations:
    rId,type,target = r.values()
    n = int(re.search('rId(\\d+)',rId).group(1))
    rels[n-1] = [type,target]
Owner

tomchipchase replied Mar 11, 2011

Thanks for that. I'll see if I can add in your changes later.

I've been comparing tomchipchase's fork with the Mike's repo, and wonder what the general consensus on tcc's work is? I think it's a lot more convenient to use, but it seems to have dead-ended a long time ago.

Is there still interest in tcc's method?

@scanny scanny closed this Mar 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment