使用 Pandoc 在 shell 终端中创建演示文稿

问题描述 投票:0回答:1

我正在寻找一种自动方法,根据位于同一文件夹中的输入 PNG 图片集合创建 Power Point 演示文稿,遵循从 Linix / Mac OSX 终端使用 Bash 执行的简单算法:

for img in input_folder/*.png; do
some command to add $img to the new page >> ./presentation.pptx 
done

我尝试过使用Pandoc

pandoc -f png -s *.png -t pptx -o presentation.pptx

但软件无法识别输入格式。是否可以将其集成到我的工作流程中以快速对图像进行后处理?

bash powerpoint presentation
1个回答
0
投票

您应该创建一个

pandoc
文档并在其中嵌入图像。

ls *jpg | sed 's/^/![caption](/;s/$/)/' > file
pandoc file  -t pptx -o presentation.ppt

如果您要在脚本中使用它,您将需要一种更强大的方法来创建

pandoc
文件。处理
ls
的输出可能适合快速检查,但不适用于认真的脚本编写。

© www.soinside.com 2019 - 2024. All rights reserved.