Scripts¶
scripts/cceh/import.py¶
Import databases from mysql.
This script initializes the postgres database and then imports data from one or more mysql databases.
Note
Make sure to follow the steps in Database Access first.
The source databases are:
a database containing the apparatus of the Editio Critica Maior publication (ECM),
a database containing the Leitzeile, and
optionally a database containing the editorial decisions regarding the priority of the readings (VarGen).
The source tables for Acts are partitioned into 28 chapters. This is a historical incident: The software used when the CBGM was first implemented could not handle big tables. The import script joins partitioned tables into one.
After running this script you should run the scripts/cceh/prepare.py script.
usage: scripts/cceh/import.py [-h] [-v] path/to/file.conf
- path/to/file.conf¶
a .conf file (required)
- -h, --help¶
show this help message and exit
- -v, --verbose¶
increase output verbosity
scripts/cceh/prepare.py¶
Initialize a CBGM database.
This script converts the databases structure used in the production of the ECM into a database structure suitable for doing CBGM. It
normalizes the databases,
removes manuscripts, passages and readings irrelevant to the CBGM,
builds a positive apparatus from the negative apparatus,
reconstructs the
mt
.
Database normalization is the usual process of restructuring your tables so they don’t contain redundant data.
The database must then be purged from all readings that are relevant for the ECM and the Nestle-Aland only, but not for the CBGM, eg. all passages without variants (about 2/3 of the New Testament), all corrections except those by the first hand, and readings that are clearly orthographic errors or differing only by orthgographic convention.
The script then transforms the negative apparatus into a positive apparatus, that is, an apparatus that is defined for all manuscripts at all passages.
Finally the script reconstructs the mt
.
After running this script you should run the scripts/cceh/cbgm.py script.
Ausgangspunkt ist der Apparat mit allen für die Druckfassung notwendigen Informationen. Diese Datenbasis muss für die CBGM bearbeitet werden. Die Ausgangsdaten stellen einen negativen Apparat dar, d.h. die griechischen handschriftlichen Zeugen, die mit dem rekonstruierten Ausgangstext übereinstimmen, werden nicht ausdrücklich aufgelistet. Aufgelistet werden alle Zeugen, die von diesem Text abweichen bzw. Korrekturen oder Alternativlesarten haben. Ziel ist es, einen positiven Apparat zu erhalten. Wir benötigen einen Datensatz pro griechischem handschriftlichen Zeugen erster Hand und variierten Stelle (einschließlich der Lücken). D.h. für jede variierte Stelle liegt die explizite Information vor, ob die Handschrift dem Ausgangstext folgt, einen anderen Text oder gar keinen Text hat, weil z.B. die Seite beschädigt ist. Korrekturen oder Alternativlesarten werden für die CBGM ignoriert.
—ArbeitsablaufCBGMApg_Db.docx
usage: scripts/cceh/prepare.py [-h] [-v] [-r RANGE] path/to/file.conf
- path/to/file.conf¶
a .conf file (required)
- -h, --help¶
show this help message and exit
- -v, --verbose¶
increase output verbosity
- -r <range>, --range <range>¶
range of steps (default: all)
scripts/cceh/cbgm.py¶
Perform the CBGM.
This script
rebuilds the ‘A’ text from the local stemmas,
calculates the pre-coherence similarity of manuscripts, and
calculates the post-coherence ancestrality of manuscripts.
This script updates the tables shown in red in the overview. It also updates the Apparatus table where manuscript ‘A is concerned.
usage: scripts/cceh/cbgm.py [-h] [-v] path/to/file.conf
- path/to/file.conf¶
a .conf file (required)
- -h, --help¶
show this help message and exit
- -v, --verbose¶
increase output verbosity
scripts/cceh/save_edits.py¶
Save the state of the editor tables.
This script saves the tables containing the editorial decisions. It does not save the apparatus tables.
usage: scripts/cceh/save_edits.py [-h] [-v] -o path/to/output.xml
path/to/file.conf
- path/to/file.conf¶
a .conf file (required)
- -h, --help¶
show this help message and exit
- -v, --verbose¶
increase output verbosity
- -o <path/to/output.xml>, --output <path/to/output.xml>¶
the output file (required)
scripts/cceh/load_edits.py¶
Load a saved state of the editor tables.
This script loads the state of the tables with the editorial decisions as saved by the save_edits.py script. It does not touch the apparatus tables.
While loading, it checks for errors and discrepancies, eg. different passage addresses. Passages in the apparatus that are not in the save state are reset to the default of: reading ‘a’ is original and every other reading is derived from ‘a’.
usage: scripts/cceh/load_edits.py [-h] [-v] -i path/to/input.xml
path/to/file.conf
- path/to/file.conf¶
a .conf file (required)
- -h, --help¶
show this help message and exit
- -v, --verbose¶
increase output verbosity
- -i <path/to/input.xml>, --input <path/to/input.xml>¶
the input file (required)
scripts/cceh/mk_users.py¶
Initialize the database for user authentication and authorization.
Creates the tables and inserts the admin user.
usage: scripts/cceh/mk_users.py [-h] -e EMAIL [-u USERNAME] [-p PASSWORD] [-v]
path/to/_global.conf
- path/to/_global.conf¶
path to the _global.conf file (required)
- -h, --help¶
show this help message and exit
- -e <email>, --email <email>¶
email
- -u <username>, --username <username>¶
username
- -p <password>, --password <password>¶
password
- -v, --verbose¶
increase output verbosity