Reading Configuration information from a text file
How to create a configuration XML file, given a set of batch files? Spire needs to know
- The order in which the batch files must run.
- Which directories the batch files belong in.
- How the batch files are organized into dialogs.
This is enough to create a config.xml file. But this file still requires some editing. Additional information is required:
- The source location(s) of the batch files (the
<Locations> tag).
- Project info in (title, image, helpurl) in the
<Main> tag
- Button info for each batch file (comment_label, button_text, program_name)
Creating a Spire configuration from a text file.
The text file must contain a list of SPIDER batch files, and specify
which directories and dialogs they belong to. Python porgrams and other
non-SPIDER executables are also allowed. The order of the list indicates
the order for running the programs.
- Each item should be on a separate line. Only the first string is used:
anything separated by a space is assumed to be a comment.
- Directories are indicated by the <dir> tag (or start the line with '#').
- Dialogs are indicated by a separating blank line.
- Batch files may have a path, e.g. Alignment/alignsh.spi
- Non-SPIDER programs should be in parentheses
Python programs: if the Python script is a "batch file" (link to Spider Python Library) then do not use parentheses. If it is an independent executable (e.g., graphics tools such as ctfgroup), then it must be enclosed in parentheses.
- Labels for dialog buttons may be included as brief comments on the same
line as the batch file, separated by parentheses, or simply a space.
- Other configuration information may be included, indicated by tags. See
the SPIRE documentation on configuration files. This could include <title>,
<image>, <helpurl>, and <location> tags. Tag information must be on a single line.
example:
<dir>.</dir> top-level project directory
resizevol.spi
# Power_Spectra
power.spi
defocus.spi
(ctfmatch.py)
(ctfgroup) adjust defocus grouping
# Particles
noise get noise file
lfc_pick.spi
pnums.spi
(web) pick first & last good particles
This example has three directories, the project directory, Power_Spectra/ and
Particles/. Each directory is put in a separate dialog. (Show XML file generated from this input)
A directory may be split across dialogs, but you can't have multiple directories
in the same dialog, because a dialog defines a directory to run batch files in.
However you can run batch files in other directories, e.g., ../Alignment/run.spi
Show progressively more complicated examples (and XML generated)
- just a list of batch files : shows order, one big dialog, one directory
- dialog grouping, one directory
- directory grouping
- both plus comments
where's the button in the config window
and please ask the user to save a config when a new one is read in
