Generate documents via shell commands and locate nested outputs using find.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-shell-doc-gen-and-locate-1fbfbad178f0 ,按照其中的说明把「shell-doc-gen-and-locate」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Enable reliable file creation (e.g., PowerPoint, PDFs) when direct API or library-based generation fails, ensuring the final artifact is located and moved to the working directory regardless of nested output paths.
shell_agent capability is available for executing scripts.If direct tool invocation fails, delegate file creation to a shell-executed script.
generate_presentation.py or make_doc.sh) that produces the file.Do not assume the file is in the current directory. Shell scripts often create outputs in nested folders (e.g., ./workspace/output/, ./build/).
Use the find command to search the workspace recursively.
Example for PowerPoint files:
find . -type f -name "*.pptx"
Example for PDF files:
find . -type f -name "*.pdf"
Filter results by modification time if multiple versions exist (e.g., -mmin -10).
Once the file path is identified:
Copy the file to the root working directory or the expected delivery location.
cp /path/to/nested/file.pptx ./
Verify the file exists and is non-zero size.
find, check stderr of the generation script for path clues../output/filename.pptx).