plaintextimport − A tool to convert plain text to Emdros MQL
plaintextimport [ options ] [input_filename ...]
plaintextimport is a command-line tool to convert plain text to Emdros MQL for later importing into Emdros.
plaintextimport
supports the following command-line switches:
−−help
show help, then quit
−V , −−version
show version, then quit
−s , −−schema
show MQL schema on stdout, then quit (can be used with -d)
−d , −−dbname dbname
set database name. If used with -s, the string "CREATE DATABASE
−o , −−output filename
dump to file filename. The default is "-", which means "standard output".
−−start-monad monad
The start monad to use. Must be >= 1. The default is 1.
−−start-id_d id_d
The start id_d to use. Must be >= 1. The default is 1.
plaintextimport reads plain text converts the text to MQL statements for later importing into Emdros.
The filenames given after the options on the command line are interpreted as if each of them contains one document, each containing a whitespace-separated string of words. If no filenames are given, the input is read from stdin.
If no -o switch is given, the output is printed on stdout.
If an error occurs, the string "FAILURE" or the string "ERROR" is printed on stderr, along with an error message.
If no error occurs, a string of the form "SUCCESS: next_monad is X next_id_d is Y" is printed on stderr, where X and Y are positive integers denoting the next monad and the next id_d to be used by the next invocation of the program, respectively. This is useful if you’ve got several directories’ worth of documents to import.
The schema can be seen by giving the program -s switch, with an optional -d switch.
A "Document" corresponds to one top-level file.
A "Word" is a single whitespace-separated "string" in a document.
0
Success
1 Wrong usage
2 Connection to backend server could not be established
3 An exception occurred (the type is printed on stderr)
4 Could not open file
5 Database error
6 Compiler error (internal error)
Written Ulrik Sandborg-Petersen (ulrikp@emdros.org).