Giter Site home page Giter Site logo

swordfish's Issues

UTF-8 support

I am really keen on Swordfish, I'd been searching for such an utility for ages!

However, is there any way how to preserve another languages next to English?

When I am parsing a Czech file, the result includes many errors on diacritical marks places...

I am sorry I am writing my question here, don't now how to do that better. It could be a feature request!

Thanks!

Collapse together tags with identical markup

If an imported Word document includes multiple text runs with identical formatting, it will be rendered with redundant tags by swordfish.

    <w:p w14:paraId="2B8680DD" w14:textId="15414D41" w:rsidR="006A368B" w:rsidRPr="00313672" w:rsidRDefault="000D3167" w:rsidP="006A368B">
        <w:pPr>
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:b/>
                <w:color w:val="222222"/>
            </w:rPr>
        </w:pPr>
        <w:r>
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:b/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:t>ABC</w:t>
        </w:r>
        <w:r w:rsidR="006A368B">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:b/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:t xml:space="preserve">
            </w:t>
        </w:r>
        <w:r w:rsidR="006A368B" w:rsidRPr="00A171DF">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:i/>
                <w:iCs/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:t>123</w:t>
        </w:r>
    </w:p>

becomes

<p><b>ABC</b><b> </b><i>123</i></p>

Headers

I see headers are supported (early stage) but can't reach any result when testing that. I guess it searches and evaluates the paragraph font size in comparison with its surroundings (this does not work for me). In my test file the header is typically marked like:

<w:pPr>
  <w:pStyle w:val="Nadpis1" />

The "Nadpis1" value would change according to the users language of Office. Do you count with this or are you convinced it would be more smart and take the values it probably takes now (sizes)? How to make that working, please?

Swordfish is really inspiring, I will fork it again and try to shape it to produce xml files. Our publishing house would use it for much quicker publication (we are non-profit academic house). That means, you helped a lot with the gem ๐Ÿ‘

Docx "Track Changes" markup

Support needs to be added for Word "track changes" markup, which includes a history of elements that have been inserted, deleted, or moved. Right now any document with changes tracked (that haven't been accepted) will result in incorrect rendered content, such as missing certain text or including text that has been deleted.

Docx Complex Fields

Add support for docx "complex fields"โ€”a series of five or more runs that define a control flow rather than regular text. In particular, this is needed for the "HYPERLINK" field, since that corresponds to a distinct non-plaintext HTML element.

        <w:r w:rsidRPr="00A171DF">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:fldChar w:fldCharType="begin"/>
        </w:r>
        <w:r w:rsidRPr="00A171DF">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:instrText xml:space="preserve"> HYPERLINK "https://docs.google.com/spreadsheet/ccc?key=..." \t "_blank" </w:instrText>
        </w:r>
        <w:r w:rsidRPr="00A171DF">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:fldChar w:fldCharType="separate"/>
        </w:r>
        <w:r w:rsidRPr="00A171DF">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:i/>
                <w:iCs/>
                <w:color w:val="1155CC"/>
                <w:u w:val="single"/>
                <w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/>
            </w:rPr>
            <w:t>here</w:t>
        </w:r>
        <w:r w:rsidRPr="00A171DF">
            <w:rPr>
                <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman" w:cs="Times New Roman"/>
                <w:color w:val="222222"/>
            </w:rPr>
            <w:fldChar w:fldCharType="end"/>
        </w:r>

Write Word Doc

Would it be difficult to add the ability to update an existing document or output a new a word doc built up programmatically in swordfish?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.