Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aristotelesbr/docx_cr_converter
Converter .DOCX to many formats
https://github.com/aristotelesbr/docx_cr_converter
crystal docx markdown
Last synced: 27 days ago
JSON representation
Converter .DOCX to many formats
- Host: GitHub
- URL: https://github.com/aristotelesbr/docx_cr_converter
- Owner: aristotelesbr
- License: mit
- Created: 2020-03-07T15:29:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-06-22T14:45:42.000Z (over 1 year ago)
- Last Synced: 2024-08-04T01:06:12.005Z (4 months ago)
- Topics: crystal, docx, markdown
- Language: Crystal
- Size: 144 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - docx_cr_converter - parse DOCX Word (HTML/XML Parsing)
README
[![Crystal CI](https://github.com/aristotelesbr/docx_cr_converter/actions/workflows/crystal.yml/badge.svg)](https://github.com/aristotelesbr/docx_cr_converter/actions/workflows/crystal.yml)
# docx_cr_converter
This tool initially extract text and simple markings from a .DOCX file and convert it to markdow format.
## Instal
Add this to your application's shard.yml:
```yml
development_dependencies:
docx_cr_converter:
github: aristotelesbr/docx_cr_converter
```## Usage
```cr
require "docx_cr_converter"docx = DocxCrConverter::Parser.new("./spec/fixtures/valid.docx")
docx.parseputs docx.document
```Output:
```md
# Lorem ipsum# + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ac faucibus odio.
Vestibulum neque massa, scelerisque sit amet ligula eu, congue molestie mi. Praesent ut varius sem. Nullam at portti
tor arcu, nec lacinia nisi. Ut ac dolor vitae odio interdum condimentum. Vivamus dapibus sodales ex, vitae malesuada
ipsum cursus convallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis, vulputate ac suscipit e
t, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus nisl blandit. Integer lacinia ante ac libero
lobortis imperdiet. Nullam mollis convallis ipsum, ac accumsan nunc vehicula vitae. Nulla eget justo in felis tristi
que fringilla. Morbi sit amet tortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus
sit amet mauris tempus fringilla.Maecenas mauris lectus, lobortis et purus mattis, blandit dictum tellus.
+ Maecenas non lorem quis tellus placerat varius.
+ Nulla facilisi.
+ Aenean congue fringilla justo ut aliquam.
+ Nunc vulputate neque vitae justo facilisis, non condimentum ante sagittis.
+ Morbi viverra semper lorem nec molestie.
+ Maecenas tincidunt est efficitur ligula euismod, sit amet ornare est vulputate.
```## TODO
- [x] Converter `.DOCX`
- [x] `Markdown`
- [ ] `HTML`## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Aristoteles Coutinho](https://github.com/aristotelesbr2014) - creator and maintainer
- [Rafael Pszenny](https://github.com/onliniak/) - Fixed extract