The psh.exe.config file is an XML file with predefined and custom configuration sections. A "configuration section" is a snippet of XML with a schema meant to store some type of information needed for PersephoneShell to run.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
 
  <!-- Custom section definitions-->
  <configSections>
    <section name="PersephoneShell" type="Ceres.PersephoneShell.Configurations.PersephoneShellSection, Ceres.PersephoneShell" />
  </configSections>
  <!-- Versions of the common language runtime the PersephoneShell supports -->
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
 
  <!-- Connection strings for PersephoneShell-->
  <connectionStrings>
    <clear />
    <add name="ORCL1" providerName="Oracle.ManagedDataAccess.Client"  connectionString="***" />
    <add name="ORCL2" providerName="Oracle.ManagedDataAccess.Client" connectionString="???" />
    <add name="MYSQL" providerName="MySql.Data.MySqlClient" connectionString="---" />
  </connectionStrings>
  <!-- Advanced configurations for PersephoneShell -->
  <PersephoneShell OrganizationCode="PSOFT" PromptFormat="$p$o$g " DeleteOrphanData="true" TempDir="">
    <!--More configurations will go here -->
    <!-- Sets colors for error, warning, stacktrace or prompt among
      Black, Blue, Cyan, DarkBlue, DarkCyan, DarkGray, DarkMagenta, DarkRed, DarkYellow, Gray, Green, Magenta, Red, White and Yellow.
      Error:Red, Warning: Yellow and StackTrace:Cyan is default. -->
    <!--<ConsoleColor Error="DarkCyan" Warning="DarkGray" StackTrace="DarkYellow" Prompt="White" />-->
    <ConsoleColor Error="DarkCyan" Warning="DarkGray" StackTrace="DarkYellow" />
    <!-- StorageMapping: use it if you need to access sequences stored in files on the remote machine.
       Consider that you have choosen to store sequences in the files. Normally you store sequences
       on the machine there Cerberus API server is started, for instance in the "c:\seq" folder.
       Now, to upload new sequences, you will need to either run PersephoneShell on the machine
       where Cerberus is started, or use StorageMapping section. It allows you to replace local path,
       accessible only from Cerberus machine, with network path, accessible from remote machine.
    -->
    <StorageMapping>
      <Filesystem StorageConfig="c:\seq" ReplaceWith="\\cerberus-pc\seq"/>
    </StorageMapping>
  </PersephoneShell>
 </configuration>

In the <connectionStrings> section, PersephoneShell supports named connection strings so that users would not have to type the entire connection string on the command line for each run. Instead, it is possible to just type its name. For example, PersephoneShell can be started with parameter -s ORCL1.

psh -s ORCL1

For security purposes, users can provide the encrypted connection strings similar to those used by the Persephone main application. To encrypt your connection string, use the cipher program in the package. The option -e (shown below) will encrypt and the option -d decrypt the connection strings. The option -c will copy the result to the clipboard.

cipher -e "scott/tiger@localhost:1521/orcl1" -c

The <PersephoneShell> section is designed to customize advanced options in the program. OrganizationCode is the name of organization or institute where the loading process is running. PromptFormat allows you to customize the shell prompt in the interactive mode. Several predefined variables are listed in the table below.

Prompt Format Variables

Variable

Meaning

$p

PS

$g

>

$n

new line

$d

current date

$t

current time

$o

current object

 

If the PromptFormat property is not specified, a default prompt format '$p$o$g ', which corresponds to 'PS> ', will be used. Other characters, besides the predefined variables in the table above, will be printed as is. For example, the prompt format 'Ceres$g ' will display 'Ceres> '.

TempDir overwrites the location of the default temporary disk space defined by the operating system. If the value for TempDir is empty, the default OS temporary partition is used, which sometimes could be too restrictive.

The <ConsoleColor> section is used to customize colors of different types of messages, such as Error, Warning, and StackTrace. Supported colors include Black, Blue, Cyan, DarkBlue, DarkCyan, DarkGray, DarkMagenta, DarkRed, DarkYellow, Gray, Green, Magenta, Red, White, and Yellow. The default color is Red for Error, Yellow for Warning, and Cyan for StackTrace.