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

fill in the narrative tables #29

Merged
merged 15 commits into from
Aug 29, 2016
Merged

fill in the narrative tables #29

merged 15 commits into from
Aug 29, 2016

Conversation

afeld
Copy link
Member

@afeld afeld commented Jul 26, 2016

Closes #28. Builds on #39.

@afeld afeld self-assigned this Jul 26, 2016
@afeld afeld changed the base branch from master to fixture-helper August 28, 2016 01:40
@afeld afeld changed the title [WIP] fill in the narrative tables fill in the narrative tables Aug 28, 2016
@afeld
Copy link
Member Author

afeld commented Aug 28, 2016

It works (kinda)! Preview from running it on cg-compliance:

screen shot 2016-08-28 at 1 37 03 am

The formatting obviously needs some work, but I propose that we take care of that as a follow-up task, since it will likely require some modification to Masonry to provide a better API for the structured data.

@afeld afeld assigned jcscottiii and unassigned afeld Aug 28, 2016
@afeld
Copy link
Member Author

afeld commented Aug 28, 2016

Fixed the newlines!

screen shot 2016-08-28 at 2 35 11 am

}

func fillRow(row xml.Node, data opencontrols.Data, control string, section string) (err error) {
// the row should have one or two cells; either way, the last one is what should be filled
Copy link
Member

@jcscottiii jcscottiii Aug 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment conflicts with the case if there were two cells. (in that case would get cellNodes[1]

@@ -25,3 +27,43 @@ func GenerateXML(wordDoc *docx.Docx) (xmlDoc *xml.XmlDocument, err error) {
bytes := []byte(content)
return ParseXML(bytes)
}

// FillParagraph inserts the given content into the provided docx XML paragraph node. Note that newlines aren't respected - you'll need to create a new paragraph node for each.
Copy link
Member

@jcscottiii jcscottiii Aug 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think FillParagraph and AddMultiLineContent deserve to be in doc-template but that library needs a lot love and care before this would fit there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well that could ^ be said about all the part thats do things directly with these tags.

discussion for another time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally. Thinking most of this package should move over, but would rather think about that separately.

@jcscottiii jcscottiii merged this pull request into fixture-helper Aug 29, 2016
@jcscottiii jcscottiii deleted the narrative branch August 29, 2016 11:21
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

Successfully merging this pull request may close these issues.

2 participants