Texttype
NOTE
This option was introduced in Philologic 3V02.
Use
philoload dbname --texttype=[ate|docbook|plaintext] file.ext
Info
Philologic can load several types of files:
- TEI SGML/XML (default)
- ATE HTML
- Docbook
- Plain text
The default is TEI, so if you don't specify anything, that's what we'll assume it will be. If you want to use ATE, Docbook or plain text, you'll need to specify that. There are two ways to do this. First, you may specify which loader and which bibliography extractor you want, as in:
philoload dbname --loader=/path/to/textloader --mkbibliography=/path/to/extractor file.ext
Note that the texttype option will not override any manually specified loader or bibliography extractor you specify on the command line.
However, you can also use a shortcut and put --texttype=type in the command line and the correct loader and bibliography extractor will be chosen for you, based on the following list:
- ate
- loader: xml-sgml-ateloader.plin
- bib: dublin.extract.plin
- docbook
- loader: dbtextload.plin
- bib: dbbiblio.plin
- plaintext
- loader: plaintextload.plin
- bib: plainbiblio.plin
- tei (default)
- loader:xml-sgmloader.plin
- bib: newextract.plin
Also note that after your load, if a texttype flag is provided, the value will not be propagated automatically to the database philo-db.cfg file. This can pose problems if you're using the philo popup notes feature. So be sure to set the $TextType value manually in philo-db.cfg.
Code
The code that does that in philoload looks like this:
if (!$loader) {
if ($texttype == "ate") {
$loader = "$PHILOBUILDDIR/utils/xml-sgml-ateloader.plin";
} elsif ($texttype == "docbook") {
$loader = "$PHILOBUILDDIR/utils/dbtextload.plin";
} elsif ($texttype == "plaintext") {
$loader = "$PHILOBUILDDIR/utils/plaintextload.plin";
} else {
$loader = "$PHILOBUILDDIR/utils/xml-sgmlloader.plin";
}
}
if (!$mkbibliography) {
if ($texttype == "ate") {
$mkbibliography = "$PHILOBUILDDIR/utils/dublin.extract.plin";
} elsif ($texttype == "docbook") {
$mkbibliography = "$PHILOBUILDDIR/utils/dbbiblio.plin";
} elsif ($texttype == "plaintext") {
$mkbibliography = "$PHILOBUILDDIR/utils/plainbiblio.plin";
} else {
$mkbibliography = "$PHILOBUILDDIR/utils/newextract.plin";
}