Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amiremohamadi/DuckX
C++ library for creating and modifying Microsoft Word (.docx) files
https://github.com/amiremohamadi/DuckX
cpp cpp-library docx docx-files office
Last synced: 28 days ago
JSON representation
C++ library for creating and modifying Microsoft Word (.docx) files
- Host: GitHub
- URL: https://github.com/amiremohamadi/DuckX
- Owner: amiremohamadi
- License: mit
- Created: 2019-01-31T20:10:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-12T12:03:14.000Z (6 months ago)
- Last Synced: 2024-10-25T10:15:23.407Z (about 2 months ago)
- Topics: cpp, cpp-library, docx, docx-files, office
- Language: C++
- Homepage:
- Size: 778 KB
- Stars: 414
- Watchers: 22
- Forks: 109
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- AwesomeCppGameDev - DuckX
README
[![Build Status](https://travis-ci.com/amiremohamadi/DuckX.svg?branch=master)](https://travis-ci.com/amiremohamadi/DuckX)
[![GitHub license](https://img.shields.io/github/license/amiremohamadi/duckx)](https://github.com/amiremohamadi/duckx/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/amiremohamadi/duckx)](https://github.com/amiremohamadi/DuckX/releases)
[![Twitter follow](https://img.shields.io/twitter/follow/amiremohamadi?style=social)](https://twitter.com/amiremohamadi)# DuckX
Create, read and write Microsoft Office Word docx files.
More informations are available in [this](https://duckx.readthedocs.io/en/latest/) documentation.> DuckX was created when I was looking for a C++ library which can properly parse MS Word .docx files, but couldn't find any
## Status ##
- Documents (docx) [Word]
- Read/Write/Edit
- Change document properties## Quick Start
Here's an example of how to use duckx to read a docx file; It opens a docx file named **file.docx** and goes over paragraphs and runs to print them:
```c++
#include
#includeint main() {
duckx::Document doc("file.docx");
doc.open();
for (auto p : doc.paragraphs())
for (auto r : p.runs())
std::cout << r.get_text() << std::endl;
}
```
And compile your file like this:```bash
g++ sample1.cpp -lduckx
```* See other [Examples](https://github.com/amiremohamadi/DuckX/tree/master/samples)
## Install ##
Easy as pie!
#### Compiling
The preferred way is to create a build folder
```bash
git clone https://github.com/amiremohamadi/DuckX.git
cd DuckX
mkdir build
cd build
cmake ..
cmake --build .
```## Requirements ##
- [zip](https://github.com/kuba--/zip)
- [pugixml](https://github.com/zeux/pugixml)### Donation
> Please consider donating to sustain our activities.BITCOIN: bc1qex0wdwp22alnmvncxs3gyj5q5jaucsvpkp4d6z
### Licensing
This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md).