1

I'm writing documentation in a local file (on a Mac, if that makes any difference), and I want to include 10 .sh files from a separate linux server (as child documents, I would assume) into separate places on my local document.

---- BEGIN documentation.lyx
Here are the 10 bash scripts:

\lstinputlisting{ssh:192.168.1.110:/home/username/menu.sh}
\lstinputlisting{ssh:192.168.1.110:/home/username/script_01.sh}
...
\lstinputlisting{ssh:192.168.1.110:/home/username/script_09.sh}

---- END documentation.lyx

Ideally, when I generate my PDF document from Lyx, I can enter my credentials to retrieve the .sh scripts, and the PDF document appears with the .sh file contents.

I didn't see this capability in my stock version of Lyx, and I've searched for an add-on, but I am a pretty new Lyx user, so maybe I missed something obvious to other experienced Lyx users.

Thank you!

wmeitzen
  • 90
  • 11
  • LyX has no built-in tools to do what you want. Do you have a script that you can use to do the above goals from a .tex file? If so you could call that script after LyX creates a .tex file. You might also be able to do something with an "external template". I highly suggest you read Help > Customization if you're interested in spending time on figuring out a way to do it. – scottkosty Jul 06 '17 at 15:00
  • Another question: is there any filesystem trickery you could do? For example, can you make a hook such that whenever a program requests to read a file `~/menu.sh`, a hook is called which runs a script that retrieves the latest version of the file through ssh. I have no idea if this is possible on the standard filesystems. Please do post an answer to this question if you figure out a solution. I'd be curious. – scottkosty Jul 06 '17 at 15:02
  • Nice to know I didn't miss anything obvious. – wmeitzen Jul 07 '17 at 15:40

0 Answers0