Skip to content

Commit 08a1cbd

Browse files
committed
chore(docs): add some props to readme
1 parent cba5c4a commit 08a1cbd

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,33 @@ in the root folder of your project. This will download and install the most rece
4444
```js
4545
import Automizer, { modify } from "pptx-automizer"
4646

47-
// First, let's set some preferences
47+
// If you want to track the steps of creation process,
48+
// you can use a custom callback:
49+
const myStatusTracker = (status: StatusTracker) => {
50+
console.log(status.info + ' (' + status.share + '%)');
51+
};
52+
53+
// First, let's set some preferences!
4854
const automizer = new Automizer({
55+
// this is where your template pptx files are coming from:
4956
templateDir: `my/pptx/templates`,
50-
outputDir: `my/pptx/output`
57+
58+
// use a fallback directory for e.g. generic templates:
59+
templateFallbackDir: `my/pptx/fallback-templates`,
60+
61+
// specify the directory to write your final pptx output files:
62+
outputDir: `my/pptx/output`,
63+
64+
// turn this to true if you want to generally use
65+
// Powerpoint's creationIds instead of slide-numbers
66+
// or shape names:
67+
useCreationIds: false,
68+
69+
// truncate root presentation and start with zero slides
70+
removeExistingSlides: true,
71+
72+
// use a callback function to track pptx generation process
73+
statusTracker: myStatusTracker,
5174
})
5275

5376
// Now we can start and load a pptx template.

0 commit comments

Comments
 (0)