He creado un flujo de trabajo en Automator que consiste en una sola acción, "Convertir el formato de los documentos de Word" (proporcionada por Microsoft Word). Lo guardé en ~/Documents/convert_word_to_pdf.app
. Puedo ejecutarlo arrastrando un archivo de Word sobre esta aplicación, y me generará un PDF. Sin embargo, no puedo averiguar cómo ejecutarlo a través de la línea de comandos. He intentado ejecutar automator convert_word_to_pdf.app foo.docx
y me sale Unable to open workflow.
. También probé convert_word_to_pdf
y convert_word_to_pdf/document.wflow
como argumentos para automator
con los mismos resultados. ¿Qué me falta aquí?
Respuestas
¿Demasiados anuncios?
Fuzzy Purple Monkey
Puntos
702
Utilice -i
:
automator -i foo.docx ~/Documents/convert_word_to_pdf.app
O si hay varios argumentos:
printf %s\\n foo.docx bar.docx|automator -i - ~/Documents/convert_word_to_pdf.app
Consulte la página de manual:
SYNOPSIS
automator [-v] [-i input] [-D name=value ...] workflow
DESCRIPTION
automator runs the specified workflow. To create or edit a workflow, use
the Automator application.
The following options are available:
-D name=value
Set variable name to value for this run of workflow.
-i input
Set input as the input to workflow If input is - then the con-
tents of standard input is used. The newline character (\n) is
the delimiter for multiple strings.
-v Run in verbose mode.
hjdm
Puntos
18