Loading a database

Loading a Database

Before you load a database into Philologic, make sure that your text conforms to one of the data specs that Philologic3 can parse. See Texts:Specs for more information.

Once your data is all ready, switch to the directory contain the texts you wish to load. The command to load texts is:

philoload DBNAME [options] filestoload

DBNAME is simply the name that you wish to load the database under. It is used by Philologic internally and must be unique.

filestoload is one or more files that you want to include in this database.

The options are as follows:

SOME OF THESE MAY BE OUTDATED! The text that philoload spits out when run without arguments should also be updated in that case.

    • --files=/path/to/texts/: If you wish to specify a path other than the current directory under which the texts to be loaded are found
    • --mkbibliography=/path/to/extractor: To specify a bibliographic metadata extractor.
    • --bibliography=/path/to/homemadebibliography: If you have a pre-made bibliography, link to it here
    • --loadsql: If you wish to load metadata into MySQL, say so with this flag.
    • --nosqlpass: Denotes that you have no MySQL password.
    • --sqlpass=password: Specify a MySQL password
    • --dontclean: XXX What does this do?
    • --delete: Delete any existing database with the same name
    • --linksourcetexts: Use symlinks for the texts to be loaded, instead of copying them into the database directory
    • --image=/var/philo/IMAGE/: The Philologic IMAGE directory. Most users will not want to specify this unless.
    • --loader=/path/to/textloader: If you are using a custom text loader, specify it here.
    • ----filelist=filelist.txt: If instead of specifying the files you want to load on the command line you wish to point to a text file containg the names of the files you want to load, one per line, you can do it with this flag

Examples

philoload bibliopolis --linksourcetexts --loadsql --sqluser=philologic --sqlpass=philopass --delete --filelist=../files2load

This says that I am going to load a database named bibliopolis, that I want to symlink the sourcetexts rather than copying them, that I will use SQL, that my SQL user is philologic, that my SQL password is philopass, that I want to delete any existing database of the same name, and that I want to specify the files to be loaded in a file named files2load.

The Loading Process

As the databse loads, you will see a lot of arcane symbols and text fly across the screen. If all goes well, none of this will be of any use to you. However, if there are any errors in the loading, it will be instructive to examine the loader log (the location of which will be provided for you by the loading script after a failure).

If all goes well, you will see a "SUCCESS"" message. The script will inform you where the automatically generated search forms have been created (in the web path that you specified upon installation). Go to that location in your browser, attempt a search, and verify that everything is working.

Further Loading

If you like, you can load the Timeseries and FrequencyList packages after your main load have completed. These generate additional MySQL tables which allow you to search for words and display them by frequency and through time. Their forms are not integrated into the standard or WhizBang search forms but are standalones, dropped into the web directory.

To install these packages, go to the system directory for the database of interest, and go into the frequnecies directory. Type the following command:

./makefrequencies DBNAME

where DBNAME is the name of your database.

Philologic will process information about word frequencies in your texts and create MySQL tables of these frequencies. When the script has finished running, it will have furnished you with two forms, placed into your web directory (as configured in philologic.cfg) and called DBNAME.frequencylists and DBNAME.timeseries.html. Edit these forms to suit your needs, or include their content in another form.