Commit 3c3b75a
authored
feat/add include_slide_notes parameter (#455)
## Description
* Added `include_slide_notes` parameter, default is `True`. Works for
`.ppt` and `.pptx` file extensions.
* Added two new files in `sample-docs`: `sample-docs/notes.ppt`,
`sample-docs/notes.pptx` that include notes on their slides. This is to
easily test the functionality, as there are no existing PowerPoint files
that include slide notes.
## Testing
```
# using default value (True) returns additional NarrativeText element that contains notes
curl -X 'POST' 'http://localhost:8000/general/v0/general' -H 'accept: application/json' -H 'Content-Type: multipart/form-data' -F 'files=@sample-docs/notes.pptx' -F 'output_format="text/csv"'
# explicit include_slide_notes=True returns additional NarrativeText element that contains notes
curl -X 'POST' 'http://localhost:8000/general/v0/general' -H 'accept: application/json' -H 'Content-Type: multipart/form-data' -F 'files=@sample-docs/notes.pptx' -F 'output_format="text/csv"' -F 'include_slide_notes=True'
# explicit include_slide_notes=False returns no NarrativeText element
curl -X 'POST' 'http://localhost:8000/general/v0/general' -H 'accept: application/json' -H 'Content-Type: multipart/form-data' -F 'files=@sample-docs/notes.pptx' -F 'output_format="text/csv"' -F 'include_slide_notes=False'
```
Same with file `notes.ppt`1 parent 843d68a commit 3c3b75a
File tree
8 files changed
+63
-4
lines changed- prepline_general/api
- models
- sample-docs
- test_general/api
8 files changed
+63
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
| |||
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| |||
649 | 653 | | |
650 | 654 | | |
651 | 655 | | |
652 | | - | |
| 656 | + | |
653 | 657 | | |
654 | 658 | | |
655 | 659 | | |
| |||
664 | 668 | | |
665 | 669 | | |
666 | 670 | | |
667 | | - | |
| 671 | + | |
668 | 672 | | |
669 | 673 | | |
670 | 674 | | |
| |||
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
| 754 | + | |
750 | 755 | | |
751 | 756 | | |
752 | 757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
249 | 261 | | |
250 | 262 | | |
251 | 263 | | |
| |||
273 | 285 | | |
274 | 286 | | |
275 | 287 | | |
| 288 | + | |
276 | 289 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
| 704 | + | |
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
| |||
733 | 734 | | |
734 | 735 | | |
735 | 736 | | |
| 737 | + | |
736 | 738 | | |
737 | 739 | | |
738 | 740 | | |
| |||
1147 | 1149 | | |
1148 | 1150 | | |
1149 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
0 commit comments