\family typewriter
build-script $$i
\family default
-
+ $$r
\begin_inset Quotes erd
\end_inset
\end_inset
(a program or script) with the name of the Noweb file (normally a file
- in the LyX temp directory).
+ in the LyX temp directory) and the directory path of the original LyX file.
\end_layout
\end_layout
\begin_layout LyX-Code
-notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
+notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
\end_layout
\begin_layout Standard
\family typewriter
-parselog=listerrors
+parselog=$$s/scripts/listerrors
\family default
\begin_inset Quotes erd
program.
\end_layout
-\begin_layout Standard
-The converter code looks in
-\emph on
-MYLYXDIR/scripts
-\emph default
- first, then in
-\emph on
-LIBDIR/scripts
-\emph default
- then on the path for the
-\begin_inset Quotes eld
-\end_inset
-
-listerrors
-\begin_inset Quotes erd
-\end_inset
-
- program.
-\end_layout
-
\begin_layout Standard
The build will normally take place in LyX's temporary directory, so the
files produced by the conversion will be in that directory.
\family default
conversion may produce several files, and so most of these would then be
deleted when LyX was closed.
- The present solution is to use a `copier',
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-See section
-\emph on
-Copiers
-\emph default
- of the
-\emph on
-Customization
-\emph default
- manual for information on these.
-\end_layout
-
-\end_inset
-
- in this case, the
-\family typewriter
-ext_copy.py
-\family default
- script in its default mode, so that the entire contents of the temporary
- directory is copied.
- More will get copied than is needed, to be sure, but nothing will be lost.
- If, however, you know what extensions the generated files will have, this
- can be improved by using the
-\family typewriter
--e
-\family default
- option to
-\family typewriter
-ext_copy
-\family default
-.
- This option takes a comma-separated list of extensions to copy.
- So, for example, if the conversion will generate only files with the extensions
-
-\family typewriter
-.c
-\family default
- and
-\family typewriter
-.h
-\family default
-, then the correct definition would be:
-\end_layout
-
-\begin_layout LyX-Code
-python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
-\end_layout
-
-\begin_layout Standard
-The result will be that only files with these two extensions will be copied
- out.
+ This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
+ the build-script scrap can place the generated files in that location.
\end_layout
\begin_layout Paragraph
\end_inset
[...
- code to extract files ...]
+ code to extract files ...
+ use NOWEB_OUTPUT_DIR here ...]
\begin_inset Newline newline
\end_inset
\begin_inset Quotes eld
\end_inset
-Conversion
+File Handling
\begin_inset Quotes erd
\end_inset
\begin_inset Quotes eld
\end_inset
-literate
+NoWeb
\begin_inset Quotes erd
\end_inset
\begin_inset space ~
\end_inset
-format Set up via the Formats tab, this is where the Noweb-specific pieces
- are set up.
+format Set up via the File Formats tab, this is where the Noweb-specific
+ pieces are set up.
The
\family sans
GUI Name
\family typewriter
build-script $$i
\family default
-
+ $$r
\begin_inset Quotes erd
\end_inset
\family typewriter
-originaldir,parselog=listerrors
+parselog=$$s/scripts/listerrors
\family default
\begin_inset Quotes erd
The output file
\end_layout
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$b The base name (without filename extension) in the LyX temporary directory
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$p The full directory path of the LyX temporary directory
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$r The full pathname to the original LyX file being processed
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$f The filename (without any directory path) of the LyX file.
+\end_layout
+
\begin_layout Labeling
\labelwidthstring 00.00.0000
\begin_inset Flex Code