-
Notifications
You must be signed in to change notification settings - Fork 50
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
CiceroMark<->OOXML transformers #397
Comments
Create a checkbox for this. It will be easier to track.
Do raise this up in the meeting tomorrow :) Since you have created the table, don't forget to link this to the next wiki page you will write. |
Will you also be maintaining the OOXML counterpart? I recommend so. |
Yeah, I will also maintain them as we start writing the transformer for it. |
Rules and helpers for the conversion Complete roundtripping for text and emphasis(CiceroMark->OOXML->CiceroMark) Test for the above Signed-off-by: k-kumar-01 <[email protected]>
Naming changed to improve readability and understandability Files renamed for better understanding Signed-off-by: k-kumar-01 <[email protected]>
Documentation update Signed-off-by: k-kumar-01 <[email protected]>
Declares OOXML as instance variable Signed-off-by: k-kumar-01 <[email protected]>
Variable name changed Spacing improved Signed-off-by: k-kumar-01 <[email protected]>
Remove attribute from <w:i> ooxml tag Signed-off-by: k-kumar-01 <[email protected]>
OOXML spacing changes Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
refactor: formattingg rules - accordproject#397 Signed-off-by: k-kumar-01 <[email protected]>
Heading transformer for CiceroMark->OOXML Roundtrip(CiceroMark <-> OOXML) test for above Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
@algomaster99 @dselman The tests now require these quotation marks in the transformer, as shown in the above image(test failing if no quotation marks). So how to proceed here?
PS: I am not a fan of either approach. |
Where did you get the CiceroMark for testing? If you got it from a latest template, change the variable transformer to enclose variables in |
@algomaster99 |
First of all, that Overall, I don't see why we should be concerned about explicitly stripping or adding |
The main reason was that some variable values had |
@algomaster99 |
Exactly my point :) |
Add helpers and rule Add the transformation logic Add the test for above Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
…roMark (JSON) - #397 (#411) Signed-off-by: k-kumar-01 <[email protected]>
…#412) Signed-off-by: k-kumar-01 <[email protected]>
Softbreak Rule Check for softbreak in transformer and call rule Test for above(acceptance-of-delivery.json) Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
use getClass as helper instead of transformer class function Signed-off-by: k-kumar-01 <[email protected]>
@K-Kumar-01 from now, don't mention issue numbers in every commit you push. As you can see, it has cluttered this PR. I think mentioning the issue number should only be necessary for the PR title as your PRs are squashed anyway. |
@algomaster99 @dselman So from these, can you decide some specifications for the blockquote which we need? Also, for `inline code, I am thinking of this formatting: Thanks in advance:) |
…397 (#418) * feat(markdown-docx): text and emphasis transformer Remove old transformer Rules: EMPHASIS, TEXT, TEXT_STYLES, TEXT_WRAPPER, PARAGRAPH_WRAPPER Tests: Check only for text-and-emphasis using if Signed-off-by: k-kumar-01 <[email protected]> * feat: heading transformer Logic to transform headings Rule: PARAGRAPH_PROPERTIES_RULE Hardcore check the test for heading using condition Signed-off-by: K-Kumar-01 <[email protected]> * feat: variable transformer Logic to transform variables Rules: Variable Rule Conditionally check for tests Signed-off-by: K-Kumar-01 <[email protected]> * feat: softbreak transformer Logic for softbreak transformation Rule: SOFTBREAK_RULE Conditionally exclude the test for strong(file:strong.json) Signed-off-by: K-Kumar-01 <[email protected]> * feat: strong transformer Logic for strong transformation Rule: STRONG_RULE Check for all tests Signed-off-by: K-Kumar-01 <[email protected]> * feat: add headingStyles and relationship specs Signed-off-by: K-Kumar-01 <[email protected]> * refactor(markdown-docx): coding practices Spread operator use inplace of push Define constants as per convention Add test for nesting Signed-off-by: K-Kumar-01 <[email protected]> * refactor: Heading Properties remove argument value from Rule remove the condition to insert runtime properties in transformer Signed-off-by: K-Kumar-01 <[email protected]>
Signed-off-by: K-Kumar-01 <[email protected]> Signed-off-by: Aman Sharma <[email protected]> Co-authored-by: Aman Sharma <[email protected]>
Transformer(CiceroMark<->OOXML) Tests for the same Signed-off-by: K-Kumar-01 <[email protected]>
Signed-off-by: K-Kumar-01 <[email protected]>
Add transformation logic: OOXML <-> CiceroMark Add rules Add test Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: K-Kumar-01 <[email protected]>
transformation logic(OOXML<->CiceroMark) rules for clause tests Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
transformation logic(OOXML<->CiceroMark) rules for clause tests Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
transformation logic: OOXML<->CiceroMark rules: link and link property tests: link and its variants Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
transformation logic:OOXML<->CiceroMark tests for optional update tests for other(xml changes in variable and clause) Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
transformation logic: OOXML<->CiceroMark rules: OPTIONAL_RULE tests Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
Transformation logic(OOXML<->CiceroMark) Tests for formula Update tests(markdown-transform, markdown-cli) Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
Feature Request 🛍️
Incorporating the CiceroMark->OOXML transformer and improving the currently implemented OOXML->CiceroMark transformer.
Use Case
It will allow the conversion of Docx files into CiceroMark JSON and vice versa. In addition, using this
Docx
files can be converted into different other formats likePDF
orHTML
as well.Possible Solution
The transformer for OOXML->CiceroMark is already implemented. It needs to be updated with some entities to allow full transformation.
The transformer for CiceroMark->OOXML is created in
cicero-word-add-in
branch. It needs to be transferred/transported here with some changes to allow the transformation.Detailed Description
Currently, the CiceroMark->OOXML transformer supports the following conversions:
<w:t>
<w:p>Content</w:p>
<w:p/>
<w:r><w:sym></w:r>
<w:i>
<w:sdt>
<w:numPr><w:num w:val={ordered/unordered}/></w:numPr>
<w:t/>
<w:sdt/>
Conversions which are left:
Strong
Code
Link
Image
BlockQuote
CodeBlock
ThematicBreak
Clause
Optional
Conditional
Formula / Ergo expressions
In the left conversions, we need to decide which ones need major importance/priority and which can be given a lower priority. Furthermore, we also need to think about whether all these will be present in the contract (IMO, Code and CodeBlock generally won't occur in the contract)
Entities and their corresponding Ciceromark
Heading
Paragraph
Text
Softbreak
"$class": "org.accordproject.commonmark.Softbreak"
Variable
Link
Image
Thematic Break
Emphasis
Strong
Code
CodeBlock
BlockQuote
Ordered List
Unordered List
ListItem
Conditional
Optional
Clause
Formula
Entities and their corresponding OOXML Tag
Heading
Emphasis
Strong
Text
Paragraph
Softbreak
Variable
The text was updated successfully, but these errors were encountered: